Commit 4e7571a5 authored by jgruber's avatar jgruber Committed by Commit bot

[regexp] Migrate @@match to TurboFan

Microbenchmarks show a 4x improvement on the fast path and 2.5x improvement on
the slow path when compared to the CPP builtin implementation.

Compared to the old JS implementation, the fast path is 20% faster and the slow
path 35% slower.

BUG=v8:5339,v8:5562

Review-Url: https://codereview.chromium.org/2527963002
Cr-Commit-Position: refs/heads/master@{#41338}
parent 9c0e2a67
......@@ -1857,7 +1857,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
{
Handle<JSFunction> fun = SimpleCreateFunction(
isolate, factory->InternalizeUtf8String("[Symbol.match]"),
Builtins::kRegExpPrototypeMatch, 1, false);
Builtins::kRegExpPrototypeMatch, 1, true);
InstallFunction(prototype, fun, factory->match_symbol(), DONT_ENUM);
}
......
This diff is collapsed.
......@@ -605,7 +605,7 @@ namespace internal {
TFJ(RegExpPrototypeFlagsGetter, 0) \
TFJ(RegExpPrototypeGlobalGetter, 0) \
TFJ(RegExpPrototypeIgnoreCaseGetter, 0) \
CPP(RegExpPrototypeMatch) \
TFJ(RegExpPrototypeMatch, 1) \
TFJ(RegExpPrototypeMultilineGetter, 0) \
TFJ(RegExpPrototypeReplace, 2) \
TFJ(RegExpPrototypeSearch, 1) \
......
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