http://codereview.chromium.org/10068010/diff/1/src/regexp.js File src/regexp.js (right):
http://codereview.chromium.org/10068010/diff/1/src/regexp.js#newcode353 src/regexp.js:353: pattern = override[override.length - 3]; I don't think this is correct in all cases. The override has the same format as the parameters to a function argument of String.prototype.replace. I.e., it's [match, captures*, match-position, subject]. So 'pattern' should probably be called 'match', and it should be read as override[0], not override[override.length - 3], in the cases where there are captures. You might want to consider making macros like macro OVERRIDE_MATCH(override) = ((override)[0]); macro OVERRIDE_POS(override) = ((override)[(override).length - 2]); macro OVERRIDE_SUBJECT(override) = ((override)[(override).length - 1]); macro OVERRIDE_CAPTURE(override, index) = ((override)[(index) + 1]); (if for nothing else, it's documentation :) http://codereview.chromium.org/10068010/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
