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

Unified Diff: src/code-stubs.h

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-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index fce0d6b9488bbb1dcb41caf947a1f322c7570bf0..83b559ff52f7652f3ad70eee33eae640b9fa22d2 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -48,6 +48,8 @@ namespace internal {
V(StubFailureTrampoline) \
V(SubString) \
V(ToNumber) \
+ V(NonNumberToNumber) \
+ V(StringToNumber) \
V(ToLength) \
V(ToString) \
V(ToName) \
@@ -2936,6 +2938,22 @@ class ToNumberStub final : public PlatformCodeStub {
DEFINE_PLATFORM_CODE_STUB(ToNumber, PlatformCodeStub);
};
+class NonNumberToNumberStub final : public PlatformCodeStub {
+ public:
+ explicit NonNumberToNumberStub(Isolate* isolate)
+ : PlatformCodeStub(isolate) {}
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion);
+ DEFINE_PLATFORM_CODE_STUB(NonNumberToNumber, PlatformCodeStub);
+};
+
+class StringToNumberStub final : public PlatformCodeStub {
+ public:
+ explicit StringToNumberStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(TypeConversion);
+ DEFINE_PLATFORM_CODE_STUB(StringToNumber, PlatformCodeStub);
+};
class ToLengthStub final : public PlatformCodeStub {
public:
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698