Author: [email protected]
Date: Tue Jan 27 05:08:06 2009
New Revision: 1174
Modified:
branches/bleeding_edge/tools/js2c.py
Log:
Strip /* */ style comments in js2c. Saves ~17k of binary size.
Review URL: http://codereview.chromium.org/19012
Modified: branches/bleeding_edge/tools/js2c.py
==============================================================================
--- branches/bleeding_edge/tools/js2c.py (original)
+++ branches/bleeding_edge/tools/js2c.py Tue Jan 27 05:08:06 2009
@@ -50,6 +50,7 @@
# Note that we could easily compress the scripts mode but don't
# since we want it to remain readable.
lines = re.sub('//.*\n', '\n', lines) # end-of-line comments
+ lines = re.sub(re.compile(r'/\*.*?\*/', re.DOTALL), '', lines) #
comments.
lines = re.sub('\s+\n+', '\n', lines) # trailing whitespace
return lines
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---