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

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

Issue 2874423003: [csa] Add ToLength and ToString variants with inlined fast checks (Closed)
Patch Set: ToString Created 3 years, 7 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-conversion-gen.cc ('k') | src/builtins/builtins-string-gen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-regexp-gen.cc
diff --git a/src/builtins/builtins-regexp-gen.cc b/src/builtins/builtins-regexp-gen.cc
index 4abd9c8b05ccecb4621314ad33dc5376bd2ed5e8..04a35bd000c92a8b886899629d282ace2256d82b 100644
--- a/src/builtins/builtins-regexp-gen.cc
+++ b/src/builtins/builtins-regexp-gen.cc
@@ -577,8 +577,7 @@ Node* RegExpBuiltinsAssembler::RegExpPrototypeExecBodyWithoutResult(
BIND(&call_tolength);
{
- var_lastindex.Bind(
- CallBuiltin(Builtins::kToLength, context, regexp_lastindex));
+ var_lastindex.Bind(ToLength_Inline(context, regexp_lastindex));
Goto(&next);
}
@@ -1941,7 +1940,7 @@ void RegExpBuiltinsAssembler::RegExpPrototypeMatchBody(Node* const context,
if (is_fastpath) {
CSA_ASSERT(this, TaggedIsPositiveSmi(last_index));
} else {
- last_index = CallBuiltin(Builtins::kToLength, context, last_index);
+ last_index = ToLength_Inline(context, last_index);
}
Node* const new_last_index =
@@ -2809,8 +2808,7 @@ TF_BUILTIN(RegExpReplace, RegExpBuiltinsAssembler) {
// 3. Does ToString({replace_value}) contain '$'?
BIND(&checkreplacestring);
{
- Node* const replace_string =
- CallBuiltin(Builtins::kToString, context, replace_value);
+ Node* const replace_string = ToString_Inline(context, replace_value);
// ToString(replaceValue) could potentially change the shape of the RegExp
// object. Recheck that we are still on the fast path and bail to runtime
@@ -2898,7 +2896,7 @@ TF_BUILTIN(RegExpPrototypeReplace, RegExpBuiltinsAssembler) {
Node* const receiver = maybe_receiver;
// Convert {maybe_string} to a String.
- Node* const string = CallBuiltin(Builtins::kToString, context, maybe_string);
+ Node* const string = ToString_Inline(context, maybe_string);
// Fast-path checks: 1. Is the {receiver} an unmodified JSRegExp instance?
Label stub(this), runtime(this, Label::kDeferred);
« no previous file with comments | « src/builtins/builtins-conversion-gen.cc ('k') | src/builtins/builtins-string-gen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698