Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index cd2a0b9b9b1cf37f35846aedd5062d856b0c9638..f2283b8090764d9bfeaaa31d1333e5f98c0e9cec 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -92,7 +92,7 @@ RUNTIME_FUNCTION(Runtime_ReThrow) { |
RUNTIME_FUNCTION(Runtime_ThrowStackOverflow) { |
SealHandleScope shs(isolate); |
- DCHECK_EQ(0, args.length()); |
+ DCHECK_LE(0, args.length()); |
return isolate->StackOverflow(); |
} |
@@ -179,6 +179,16 @@ RUNTIME_FUNCTION(Runtime_ThrowStrongModeImplicitConversion) { |
} |
+RUNTIME_FUNCTION(Runtime_ThrowApplyNonFunction) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(1, args.length()); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
+ Handle<String> type = Object::TypeOf(isolate, object); |
+ THROW_NEW_ERROR_RETURN_FAILURE( |
+ isolate, NewTypeError(MessageTemplate::kApplyNonFunction, object, type)); |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_PromiseRejectEvent) { |
DCHECK(args.length() == 3); |
HandleScope scope(isolate); |
@@ -437,5 +447,18 @@ RUNTIME_FUNCTION(Runtime_ThrowConstructedNonConstructable) { |
isolate, NewTypeError(MessageTemplate::kNotConstructor, callsite)); |
} |
+ |
+// ES6 section 7.3.17 CreateListFromArrayLike (obj) |
+RUNTIME_FUNCTION(Runtime_CreateListFromArrayLike) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(1, args.length()); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
+ Handle<FixedArray> result; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
+ isolate, result, |
+ Object::CreateListFromArrayLike(isolate, object, ElementTypes::kAll)); |
+ return *result; |
+} |
+ |
} // namespace internal |
} // namespace v8 |