Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 75d09a8ee70598931332ce4213b161fba036244c..0c6f81306ee7981c98a5d4150aa0e3d8879105e7 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -1478,6 +1478,18 @@ RUNTIME_FUNCTION(Runtime_ToName) { |
} |
+RUNTIME_FUNCTION(Runtime_Equals) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(2, args.length()); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, x, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, y, 1); |
+ Maybe<bool> result = Object::Equals(x, y); |
+ if (!result.IsJust()) return isolate->heap()->exception(); |
+ // TODO(bmeurer): Change this at some point to return true/false instead. |
+ return Smi::FromInt(result.FromJust() ? EQUAL : NOT_EQUAL); |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_StrictEquals) { |
SealHandleScope scope(isolate); |
DCHECK_EQ(2, args.length()); |