DescriptionAdd ES2015 RegExp full subclassing semantics behind a flag
This patch implements ES2015 RegExp subclassing semantics, namely the
hardest part where RegExp.prototype.exec and certain flag getters can
be overridden in order to provide different behavior. This change is
hidden behind a new flag, --harmony-regexp-exec. The flag guards the
behavior by installing entirely different implementations of the
methods which follow the new semantics.
Preliminary performance tests show a 3-4x regression in the Octane
RegExp benchmark. The new code doesn't call out into several fast
paths that the old code supported, so this is expected.
The patch is tested mostly by test262, where most RegExp tests are fixed,
with the exception of deliberate spec violations for web compatibility,
and for the 'sticky' flag, which is not dynamically read by this patch
in all cases but rather statically compiled into the RegExp. The latter
will require a follow-on patch to implement. A small additional set of
tests verifies one particular case, mostly to check whether the flag
mechanism works.
R=adamk,yangguo@chromium.org
LOG=Y
BUG=v8:4602
Committed: https://crrev.com/92a571e5460b7abb53105e13721beeaac7fd085a
Cr-Commit-Position: refs/heads/master@{#35068}
Patch Set 1 #Patch Set 2 : replace #Patch Set 3 : More fixes #Patch Set 4 : regexp subclassing implementation #Patch Set 5 : Some more changes from test262 debugging #Patch Set 6 : Fix a couple more unimportant issues #Patch Set 7 : Rebase (fails a number of test262 tests) #Patch Set 8 : A small fix, and test262 expectations #Patch Set 9 : Rebased again, and a separate flag, with one part split off into https://codereview.chromium.org/1821773003 #Patch Set 10 : rebase #Patch Set 11 : fix formatting #Patch Set 12 : A couple more cleanups #
Total comments: 4
Patch Set 13 : Update bytecode test expectations #
Total comments: 6
Patch Set 14 : Better comments #Patch Set 15 : removed stray edit #
Total comments: 17
Patch Set 16 : rebase #Patch Set 17 : Fixes based on comments #Patch Set 18 : fixups #Patch Set 19 : fix typo #
Total comments: 4
Patch Set 20 : more camelCase #Patch Set 21 : camelCase #
Messages
Total messages: 57 (25 generated)
|