| Index: src/builtins/builtins-regexp.cc
|
| diff --git a/src/builtins/builtins-regexp.cc b/src/builtins/builtins-regexp.cc
|
| index f6ca8bb2c16a0c7e16dc537c130b731e5b2735de..4d8340d71ea3853d41bae497daf0b901d1cf36ed 100644
|
| --- a/src/builtins/builtins-regexp.cc
|
| +++ b/src/builtins/builtins-regexp.cc
|
| @@ -338,33 +338,6 @@
|
|
|
| Bind(&out);
|
| return var_result.value();
|
| -}
|
| -
|
| -// Wrapper around RegExpPrototypeExecBody to reduce code duplication.
|
| -TF_BUILTIN(RegExpExecInternalFast, RegExpBuiltinsAssembler) {
|
| - typedef RegExpExecInternalDescriptor Descriptor;
|
| -
|
| - Node* const regexp = Parameter(Descriptor::kReceiver);
|
| - Node* const string = Parameter(Descriptor::kString);
|
| - Node* const context = Parameter(Descriptor::kContext);
|
| -
|
| - CSA_ASSERT(this, HasInstanceType(regexp, JS_REGEXP_TYPE));
|
| - CSA_ASSERT(this, IsString(string));
|
| -
|
| - Return(RegExpPrototypeExecBody(context, regexp, string, true));
|
| -}
|
| -
|
| -// Wrapper around RegExpPrototypeExecBody to reduce code duplication.
|
| -TF_BUILTIN(RegExpExecInternalSlow, RegExpBuiltinsAssembler) {
|
| - typedef RegExpExecInternalDescriptor Descriptor;
|
| -
|
| - Node* const regexp = Parameter(Descriptor::kReceiver);
|
| - Node* const string = Parameter(Descriptor::kString);
|
| - Node* const context = Parameter(Descriptor::kContext);
|
| -
|
| - CSA_ASSERT(this, IsString(string));
|
| -
|
| - Return(RegExpPrototypeExecBody(context, regexp, string, false));
|
| }
|
|
|
| // ES#sec-regexp.prototype.exec
|
| @@ -525,14 +498,16 @@
|
|
|
| Bind(&if_isfastpath);
|
| {
|
| - Callable exec_callable = CodeFactory::RegExpExecInternal(isolate(), true);
|
| - Return(CallStub(exec_callable, context, receiver, string));
|
| + Node* const result =
|
| + RegExpPrototypeExecBody(context, receiver, string, true);
|
| + Return(result);
|
| }
|
|
|
| Bind(&if_isslowpath);
|
| {
|
| - Callable exec_callable = CodeFactory::RegExpExecInternal(isolate(), false);
|
| - Return(CallStub(exec_callable, context, receiver, string));
|
| + Node* const result =
|
| + RegExpPrototypeExecBody(context, receiver, string, false);
|
| + Return(result);
|
| }
|
| }
|
|
|
| @@ -1249,8 +1224,7 @@
|
|
|
| Bind(&if_isfastpath);
|
| {
|
| - Callable exec_callable = CodeFactory::RegExpExecInternal(isolate, true);
|
| - Node* const result = CallStub(exec_callable, context, regexp, string);
|
| + Node* const result = RegExpPrototypeExecBody(context, regexp, string, true);
|
| var_result.Bind(result);
|
| Goto(&out);
|
| }
|
| @@ -1292,8 +1266,8 @@
|
| ThrowIfNotInstanceType(context, regexp, JS_REGEXP_TYPE,
|
| "RegExp.prototype.exec");
|
|
|
| - Callable exec_callable = CodeFactory::RegExpExecInternal(isolate, false);
|
| - Node* const result = CallStub(exec_callable, context, regexp, string);
|
| + Node* const result =
|
| + RegExpPrototypeExecBody(context, regexp, string, false);
|
| var_result.Bind(result);
|
| Goto(&out);
|
| }
|
| @@ -1550,12 +1524,10 @@
|
|
|
| Bind(&if_isnotglobal);
|
| {
|
| - if (is_fastpath) {
|
| - Callable exec_callable = CodeFactory::RegExpExecInternal(isolate, true);
|
| - Return(CallStub(exec_callable, context, regexp, string));
|
| - } else {
|
| - Return(RegExpExec(context, regexp, string));
|
| - }
|
| + Node* const result =
|
| + is_fastpath ? RegExpPrototypeExecBody(context, regexp, string, true)
|
| + : RegExpExec(context, regexp, string);
|
| + Return(result);
|
| }
|
|
|
| Bind(&if_isglobal);
|
|
|