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

Unified Diff: src/code-factory.cc

Issue 2152693002: [stubs] Introduce NonPrimitiveToPrimitive builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 4 years, 5 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.h ('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-factory.cc
diff --git a/src/code-factory.cc b/src/code-factory.cc
index 96b87fe561a23a3ec1963185fd14c38d53d91171..ecae7af688c292ea00c49bf478ba72d96e726376 100644
--- a/src/code-factory.cc
+++ b/src/code-factory.cc
@@ -138,6 +138,12 @@ Callable CodeFactory::InstanceOf(Isolate* isolate) {
// static
+Callable CodeFactory::GetProperty(Isolate* isolate) {
+ GetPropertyStub stub(isolate);
+ return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
+}
+
+// static
Callable CodeFactory::ToBoolean(Isolate* isolate) {
ToBooleanStub stub(isolate);
return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
@@ -196,6 +202,19 @@ Callable CodeFactory::ToObject(Isolate* isolate) {
return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
}
+// static
+Callable CodeFactory::NonPrimitiveToPrimitive(Isolate* isolate,
+ ToPrimitiveHint hint) {
+ return Callable(isolate->builtins()->NonPrimitiveToPrimitive(hint),
+ TypeConversionDescriptor(isolate));
+}
+
+// static
+Callable CodeFactory::OrdinaryToPrimitive(Isolate* isolate,
+ OrdinaryToPrimitiveHint hint) {
+ return Callable(isolate->builtins()->OrdinaryToPrimitive(hint),
+ TypeConversionDescriptor(isolate));
+}
// static
Callable CodeFactory::NumberToString(Isolate* isolate) {
@@ -203,7 +222,6 @@ Callable CodeFactory::NumberToString(Isolate* isolate) {
return Callable(stub.GetCode(), stub.GetCallInterfaceDescriptor());
}
-
// static
Callable CodeFactory::RegExpConstructResult(Isolate* isolate) {
RegExpConstructResultStub stub(isolate);
« no previous file with comments | « src/code-factory.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698