| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 return isolate->ReThrow(args[0]); | 81 return isolate->ReThrow(args[0]); |
| 82 } | 82 } |
| 83 | 83 |
| 84 | 84 |
| 85 RUNTIME_FUNCTION(Runtime_ThrowStackOverflow) { | 85 RUNTIME_FUNCTION(Runtime_ThrowStackOverflow) { |
| 86 SealHandleScope shs(isolate); | 86 SealHandleScope shs(isolate); |
| 87 DCHECK_LE(0, args.length()); | 87 DCHECK_LE(0, args.length()); |
| 88 return isolate->StackOverflow(); | 88 return isolate->StackOverflow(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 RUNTIME_FUNCTION(Runtime_ThrowSymbolAsyncIteratorInvalid) { |
| 92 HandleScope scope(isolate); |
| 93 DCHECK_EQ(0, args.length()); |
| 94 THROW_NEW_ERROR_RETURN_FAILURE( |
| 95 isolate, NewTypeError(MessageTemplate::kSymbolAsyncIteratorInvalid)); |
| 96 } |
| 97 |
| 91 RUNTIME_FUNCTION(Runtime_ThrowTypeError) { | 98 RUNTIME_FUNCTION(Runtime_ThrowTypeError) { |
| 92 HandleScope scope(isolate); | 99 HandleScope scope(isolate); |
| 93 DCHECK_LE(1, args.length()); | 100 DCHECK_LE(1, args.length()); |
| 94 CONVERT_SMI_ARG_CHECKED(message_id_smi, 0); | 101 CONVERT_SMI_ARG_CHECKED(message_id_smi, 0); |
| 95 | 102 |
| 96 Handle<Object> undefined = isolate->factory()->undefined_value(); | 103 Handle<Object> undefined = isolate->factory()->undefined_value(); |
| 97 Handle<Object> arg0 = (args.length() > 1) ? args.at(1) : undefined; | 104 Handle<Object> arg0 = (args.length() > 1) ? args.at(1) : undefined; |
| 98 Handle<Object> arg1 = (args.length() > 2) ? args.at(2) : undefined; | 105 Handle<Object> arg1 = (args.length() > 2) ? args.at(2) : undefined; |
| 99 Handle<Object> arg2 = (args.length() > 3) ? args.at(3) : undefined; | 106 Handle<Object> arg2 = (args.length() > 3) ? args.at(3) : undefined; |
| 100 | 107 |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 | 503 |
| 497 RUNTIME_FUNCTION(Runtime_AllowDynamicFunction) { | 504 RUNTIME_FUNCTION(Runtime_AllowDynamicFunction) { |
| 498 HandleScope scope(isolate); | 505 HandleScope scope(isolate); |
| 499 DCHECK_EQ(1, args.length()); | 506 DCHECK_EQ(1, args.length()); |
| 500 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0); | 507 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0); |
| 501 Handle<JSObject> global_proxy(target->global_proxy(), isolate); | 508 Handle<JSObject> global_proxy(target->global_proxy(), isolate); |
| 502 return *isolate->factory()->ToBoolean( | 509 return *isolate->factory()->ToBoolean( |
| 503 Builtins::AllowDynamicFunction(isolate, target, global_proxy)); | 510 Builtins::AllowDynamicFunction(isolate, target, global_proxy)); |
| 504 } | 511 } |
| 505 | 512 |
| 513 RUNTIME_FUNCTION(Runtime_CreateAsyncFromSyncIterator) { |
| 514 // TODO(caitp): split AsyncFromSyncIterator functionality out of |
| 515 // https://codereview.chromium.org/2622833002 |
| 516 UNREACHABLE(); |
| 517 return isolate->heap()->undefined_value(); |
| 518 } |
| 519 |
| 506 } // namespace internal | 520 } // namespace internal |
| 507 } // namespace v8 | 521 } // namespace v8 |
| OLD | NEW |