Index: src/runtime/runtime-operators.cc |
diff --git a/src/runtime/runtime-operators.cc b/src/runtime/runtime-operators.cc |
index 02fd0cd33281b62be650733085a10bf7085e9d3e..e55ab7c5423040d8ad8502812ec05606a62b67e8 100644 |
--- a/src/runtime/runtime-operators.cc |
+++ b/src/runtime/runtime-operators.cc |
@@ -140,5 +140,81 @@ RUNTIME_FUNCTION(Runtime_BitwiseXor) { |
return *result; |
} |
+RUNTIME_FUNCTION(Runtime_Equal) { |
+ 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(); |
+ return isolate->heap()->ToBoolean(result.FromJust()); |
+} |
+ |
+RUNTIME_FUNCTION(Runtime_NotEqual) { |
+ 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(); |
+ return isolate->heap()->ToBoolean(!result.FromJust()); |
+} |
+ |
+RUNTIME_FUNCTION(Runtime_StrictEqual) { |
+ 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->StrictEquals(y)); |
+} |
+ |
+RUNTIME_FUNCTION(Runtime_StrictNotEqual) { |
+ 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->StrictEquals(y)); |
+} |
+ |
+RUNTIME_FUNCTION(Runtime_LessThan) { |
+ 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::LessThan(x, y); |
+ if (!result.IsJust()) return isolate->heap()->exception(); |
+ return isolate->heap()->ToBoolean(result.FromJust()); |
+} |
+ |
+RUNTIME_FUNCTION(Runtime_GreaterThan) { |
+ 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::GreaterThan(x, y); |
+ if (!result.IsJust()) return isolate->heap()->exception(); |
+ return isolate->heap()->ToBoolean(result.FromJust()); |
+} |
+ |
+RUNTIME_FUNCTION(Runtime_LessThanOrEqual) { |
+ 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::LessThanOrEqual(x, y); |
+ if (!result.IsJust()) return isolate->heap()->exception(); |
+ return isolate->heap()->ToBoolean(result.FromJust()); |
+} |
+ |
+RUNTIME_FUNCTION(Runtime_GreaterThanOrEqual) { |
+ 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::GreaterThanOrEqual(x, y); |
+ if (!result.IsJust()) return isolate->heap()->exception(); |
+ return isolate->heap()->ToBoolean(result.FromJust()); |
+} |
+ |
} // namespace internal |
} // namespace v8 |