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

Unified Diff: src/builtins.cc

Issue 1695743003: [builtins] Support SameValue and SameValueZero via runtime functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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.h ('k') | src/js/array.js » ('j') | src/js/v8natives.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 1c596503ef86e95bf3b6e3054ade3c484ae4a661..daaa5be112c89be3ecb01102626766030d616148 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -1803,6 +1803,16 @@ BUILTIN(ObjectGetOwnPropertySymbols) {
}
+// ES#sec-object.is Object.is ( value1, value2 )
+BUILTIN(ObjectIs) {
+ SealHandleScope shs(isolate);
+ DCHECK_EQ(3, args.length());
+ Object* value1 = args[1];
Michael Starzinger 2016/02/17 09:44:21 nit: Even with the sealed handle scope, we should
Benedikt Meurer 2016/02/17 10:20:26 Done.
+ Object* value2 = args[2];
+ return isolate->heap()->ToBoolean(value1->SameValue(value2));
+}
+
+
// ES6 section 19.1.2.11 Object.isExtensible ( O )
BUILTIN(ObjectIsExtensible) {
HandleScope scope(isolate);
« no previous file with comments | « src/builtins.h ('k') | src/js/array.js » ('j') | src/js/v8natives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698