Commit 89bf4d56 authored by deanm@chromium.org's avatar deanm@chromium.org

Strip /* */ style comments in js2c. Saves ~17k of binary size.

Review URL: http://codereview.chromium.org/19012


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 269763d5
......@@ -50,6 +50,7 @@ def CompressScript(lines):
# 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment