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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 RUNTIME_FUNCTION(Runtime_ThrowReferenceError) { | 49 RUNTIME_FUNCTION(Runtime_ThrowReferenceError) { |
50 HandleScope scope(isolate); | 50 HandleScope scope(isolate); |
51 DCHECK(args.length() == 1); | 51 DCHECK(args.length() == 1); |
52 CONVERT_ARG_HANDLE_CHECKED(Object, name, 0); | 52 CONVERT_ARG_HANDLE_CHECKED(Object, name, 0); |
53 THROW_NEW_ERROR_RETURN_FAILURE( | 53 THROW_NEW_ERROR_RETURN_FAILURE( |
54 isolate, NewReferenceError("not_defined", HandleVector(&name, 1))); | 54 isolate, NewReferenceError("not_defined", HandleVector(&name, 1))); |
55 } | 55 } |
56 | 56 |
57 | 57 |
58 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { | |
59 HandleScope scope(isolate); | |
60 DCHECK(args.length() == 1); | |
61 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); | |
62 THROW_NEW_ERROR_RETURN_FAILURE( | |
63 isolate, | |
64 NewTypeError("iterator_result_not_an_object", HandleVector(&value, 1))); | |
65 } | |
66 | |
67 | |
68 RUNTIME_FUNCTION(Runtime_PromiseRejectEvent) { | 58 RUNTIME_FUNCTION(Runtime_PromiseRejectEvent) { |
69 DCHECK(args.length() == 3); | 59 DCHECK(args.length() == 3); |
70 HandleScope scope(isolate); | 60 HandleScope scope(isolate); |
71 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); | 61 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
72 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 62 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
73 CONVERT_BOOLEAN_ARG_CHECKED(debug_event, 2); | 63 CONVERT_BOOLEAN_ARG_CHECKED(debug_event, 2); |
74 if (debug_event) isolate->debug()->OnPromiseReject(promise, value); | 64 if (debug_event) isolate->debug()->OnPromiseReject(promise, value); |
75 Handle<Symbol> key = isolate->factory()->promise_has_handler_symbol(); | 65 Handle<Symbol> key = isolate->factory()->promise_has_handler_symbol(); |
76 // Do not report if we actually have a handler. | 66 // Do not report if we actually have a handler. |
77 if (JSObject::GetDataProperty(promise, key)->IsUndefined()) { | 67 if (JSObject::GetDataProperty(promise, key)->IsUndefined()) { |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 306 |
317 RUNTIME_FUNCTION(RuntimeReference_GetFromCache) { | 307 RUNTIME_FUNCTION(RuntimeReference_GetFromCache) { |
318 HandleScope scope(isolate); | 308 HandleScope scope(isolate); |
319 DCHECK(args.length() == 2); | 309 DCHECK(args.length() == 2); |
320 CONVERT_SMI_ARG_CHECKED(id, 0); | 310 CONVERT_SMI_ARG_CHECKED(id, 0); |
321 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); | 311 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); |
322 return __RT_impl_Runtime_GetFromCache(args, isolate); | 312 return __RT_impl_Runtime_GetFromCache(args, isolate); |
323 } | 313 } |
324 } | 314 } |
325 } // namespace v8::internal | 315 } // namespace v8::internal |
OLD | NEW |