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

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

Issue 1298603002: [runtime] Unify and fix the strict equality comparison. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index f0c83e0f24a75d11dae06894c6dd52599551d08b..624708714e5ab813a8c21ee66a452cda179e2ca9 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -1461,5 +1461,15 @@ RUNTIME_FUNCTION(Runtime_ToObject) {
isolate, NewTypeError(MessageTemplate::kUndefinedOrNullToObject));
}
+
+RUNTIME_FUNCTION(Runtime_StrictEquals) {
+ SealHandleScope scope(isolate);
+ DCHECK_EQ(2, args.length());
+ CONVERT_ARG_CHECKED(Object, x, 0);
+ CONVERT_ARG_CHECKED(Object, y, 1);
+ // TODO(bmeurer): Change this at some point to return true/false instead.
+ return Smi::FromInt(x->StrictEquals(y) ? EQUAL : NOT_EQUAL);
+}
+
} // namespace internal
} // namespace v8
« src/api.cc ('K') | « src/runtime/runtime.h ('k') | src/runtime/runtime-simd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698