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

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

Issue 2364473006: [stubs] Extract ToInteger to CodeStubAssembler (Closed)
Patch Set: Created 4 years, 3 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-sharedarraybuffer.cc ('k') | src/code-stub-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-string.cc
diff --git a/src/builtins/builtins-string.cc b/src/builtins/builtins-string.cc
index 640e425d23e47b6678af913a5da40d04ab055dc5..72de75357ff1b15c9acc545a13f8ebdeb263b703 100644
--- a/src/builtins/builtins-string.cc
+++ b/src/builtins/builtins-string.cc
@@ -318,8 +318,7 @@ void Builtins::Generate_StringPrototypeCharAt(CodeStubAssembler* assembler) {
assembler->Bind(&if_positionisnotsmi);
{
// Convert the {position} to an Integer via the ToIntegerStub.
- Callable callable = CodeFactory::ToInteger(assembler->isolate());
- Node* index = assembler->CallStub(callable, context, position);
+ Node* index = assembler->ToInteger(context, position);
// Check if the resulting {index} is now a Smi.
Label if_indexissmi(assembler, Label::kDeferred),
@@ -413,8 +412,7 @@ void Builtins::Generate_StringPrototypeCharCodeAt(
assembler->Bind(&if_positionisnotsmi);
{
// Convert the {position} to an Integer via the ToIntegerStub.
- Callable callable = CodeFactory::ToInteger(assembler->isolate());
- Node* index = assembler->CallStub(callable, context, position);
+ Node* index = assembler->ToInteger(context, position);
// Check if the resulting {index} is now a Smi.
Label if_indexissmi(assembler, Label::kDeferred),
« no previous file with comments | « src/builtins/builtins-sharedarraybuffer.cc ('k') | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698