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

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: Address bug in SameValue and SameValueZero for SIMD types. 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') | no next file with comments »
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 677cfdd8aa9d90f6cc2864cda4ad15a18cfcef0f..2c00330584330b696ebf25a736a808a0fe483b62 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -1814,6 +1814,16 @@ BUILTIN(ObjectGetOwnPropertySymbols) {
}
+// ES#sec-object.is Object.is ( value1, value2 )
+BUILTIN(ObjectIs) {
+ SealHandleScope shs(isolate);
+ DCHECK_EQ(3, args.length());
+ Handle<Object> value1 = args.at<Object>(1);
+ Handle<Object> value2 = args.at<Object>(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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698