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

Unified Diff: src/code-stubs.cc

Issue 1818923002: [stubs] Split ToNumberStub into reusable subparts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 4 years, 9 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/code-stubs.h ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 0d41f689d9292d4b328e8383088766ff0b4aa318..285bd119a3af103963a5228ea7ca4545d2002cbb 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -599,7 +599,8 @@ void GenerateAbstractRelationalComparison(
// dedicated ToPrimitive(rhs, hint Number) operation, as the
// ToNumber(rhs) will by itself already invoke ToPrimitive with
// a Number hint.
- Callable callable = CodeFactory::ToNumber(assembler->isolate());
+ Callable callable =
+ CodeFactory::NonNumberToNumber(assembler->isolate());
var_rhs.Bind(assembler->CallStub(callable, context, rhs));
assembler->Goto(&loop);
}
@@ -642,7 +643,8 @@ void GenerateAbstractRelationalComparison(
// dedicated ToPrimitive(lhs, hint Number) operation, as the
// ToNumber(lhs) will by itself already invoke ToPrimitive with
// a Number hint.
- Callable callable = CodeFactory::ToNumber(assembler->isolate());
+ Callable callable =
+ CodeFactory::NonNumberToNumber(assembler->isolate());
var_lhs.Bind(assembler->CallStub(callable, context, lhs));
assembler->Goto(&loop);
}
@@ -681,7 +683,8 @@ void GenerateAbstractRelationalComparison(
// dedicated ToPrimitive(rhs, hint Number) operation, as the
// ToNumber(rhs) will by itself already invoke ToPrimitive with
// a Number hint.
- Callable callable = CodeFactory::ToNumber(assembler->isolate());
+ Callable callable =
+ CodeFactory::NonNumberToNumber(assembler->isolate());
var_rhs.Bind(assembler->CallStub(callable, context, rhs));
assembler->Goto(&loop);
}
@@ -1072,7 +1075,8 @@ void GenerateEqual(compiler::CodeStubAssembler* assembler, ResultMode mode) {
assembler->Bind(&if_rhsisstring);
{
// Convert the {rhs} to a Number.
- Callable callable = CodeFactory::ToNumber(assembler->isolate());
+ Callable callable =
+ CodeFactory::StringToNumber(assembler->isolate());
var_rhs.Bind(assembler->CallStub(callable, context, rhs));
assembler->Goto(&loop);
}
@@ -1247,7 +1251,8 @@ void GenerateEqual(compiler::CodeStubAssembler* assembler, ResultMode mode) {
// The {rhs} is a String and the {lhs} is a HeapNumber; we need
// to convert the {rhs} to a Number and compare the output to
// the Number on the {lhs}.
- Callable callable = CodeFactory::ToNumber(assembler->isolate());
+ Callable callable =
+ CodeFactory::StringToNumber(assembler->isolate());
var_rhs.Bind(assembler->CallStub(callable, context, rhs));
assembler->Goto(&loop);
}
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698