Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 2b12c28ff53cc9150e435b31d0c452a046f26b3c..0b2bd7b0b4141fa513c455b3e6ebfc5b829a3b73 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -1160,6 +1160,24 @@ RUNTIME_FUNCTION(Runtime_StrictEquals) { |
} |
+RUNTIME_FUNCTION(Runtime_SameValue) { |
+ SealHandleScope scope(isolate); |
+ DCHECK_EQ(2, args.length()); |
+ CONVERT_ARG_CHECKED(Object, x, 0); |
+ CONVERT_ARG_CHECKED(Object, y, 1); |
+ return isolate->heap()->ToBoolean(x->SameValue(y)); |
+} |
+ |
+ |
+RUNTIME_FUNCTION(Runtime_SameValueZero) { |
+ SealHandleScope scope(isolate); |
+ DCHECK_EQ(2, args.length()); |
+ CONVERT_ARG_CHECKED(Object, x, 0); |
+ CONVERT_ARG_CHECKED(Object, y, 1); |
+ return isolate->heap()->ToBoolean(x->SameValueZero(y)); |
+} |
+ |
+ |
// TODO(bmeurer): Kill this special wrapper and use TF compatible LessThan, |
// GreaterThan, etc. which return true or false. |
RUNTIME_FUNCTION(Runtime_Compare) { |