Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: tools/js2c.py

Issue 28184: Avoids allocating a JSArray of capture information on each non-global... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/runtime.cc ('K') | « test/mjsunit/regexp-string-methods.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/js2c.py
===================================================================
--- tools/js2c.py (revision 1374)
+++ tools/js2c.py (working copy)
@@ -104,7 +104,7 @@
def ExpandMacros(lines, macros):
for name, macro in macros.items():
- start = lines.find(name, 0)
+ start = lines.find(name + '(', 0)
while start != -1:
# Scan over the arguments
assert lines[start + len(name)] == '('
@@ -132,7 +132,7 @@
result = macro.expand(mapping)
# Replace the occurrence of the macro with the expansion
lines = lines[:start] + result + lines[end:]
- start = lines.find(name, end)
+ start = lines.find(name + '(', end)
return lines
class TextMacro:
« src/runtime.cc ('K') | « test/mjsunit/regexp-string-methods.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698