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

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

Issue 2725053007: Reland Migrate Object.prototype.valueOf to CSA (Closed)
Patch Set: Created 3 years, 10 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.h ('k') | src/debug/debug-evaluate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-object.cc
diff --git a/src/builtins/builtins-object.cc b/src/builtins/builtins-object.cc
index af5a42aa64e4e79781226d545d8ed20c630e58c4..668a54b50cb1dba4e25cec9b6f49df5d074bc218 100644
--- a/src/builtins/builtins-object.cc
+++ b/src/builtins/builtins-object.cc
@@ -310,6 +310,17 @@ TF_BUILTIN(ObjectProtoToString, ObjectBuiltinsAssembler) {
}
}
+// ES6 19.3.7 Object.prototype.valueOf
+TF_BUILTIN(ObjectPrototypeValueOf, CodeStubAssembler) {
+ Node* receiver = Parameter(0);
+ Node* context = Parameter(3);
+
+ Callable to_object = CodeFactory::ToObject(isolate());
+ receiver = CallStub(to_object, context, receiver);
+
+ Return(receiver);
+}
+
TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
Node* prototype = Parameter(1);
Node* properties = Parameter(2);
« no previous file with comments | « src/builtins/builtins.h ('k') | src/debug/debug-evaluate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698