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

Unified Diff: src/builtins/builtins-regexp.cc

Issue 2679063003: Revert of [regexp] Add stub for RegExpExec instead of inlining (Closed)
Patch Set: Created 3 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
« no previous file with comments | « src/builtins/builtins.h ('k') | src/code-factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/builtins/builtins.h ('k') | src/code-factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698