OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/builtins/builtins-promise.h" | 5 #include "src/builtins/builtins-promise.h" |
6 #include "src/builtins/builtins-constructor.h" | 6 #include "src/builtins/builtins-constructor.h" |
7 #include "src/builtins/builtins-utils.h" | 7 #include "src/builtins/builtins-utils.h" |
8 #include "src/builtins/builtins.h" | 8 #include "src/builtins/builtins.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stub-assembler.h" | 10 #include "src/code-stub-assembler.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 Node* PromiseBuiltinsAssembler::AllocateAndInitJSPromise(Node* context) { | 35 Node* PromiseBuiltinsAssembler::AllocateAndInitJSPromise(Node* context) { |
36 return AllocateAndInitJSPromise(context, UndefinedConstant()); | 36 return AllocateAndInitJSPromise(context, UndefinedConstant()); |
37 } | 37 } |
38 | 38 |
39 Node* PromiseBuiltinsAssembler::AllocateAndInitJSPromise(Node* context, | 39 Node* PromiseBuiltinsAssembler::AllocateAndInitJSPromise(Node* context, |
40 Node* parent) { | 40 Node* parent) { |
41 Node* const instance = AllocateJSPromise(context); | 41 Node* const instance = AllocateJSPromise(context); |
42 PromiseInit(instance); | 42 PromiseInit(instance); |
43 | 43 |
44 Label out(this); | 44 Label out(this); |
45 GotoUnless(IsPromiseHookEnabled(), &out); | 45 GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &out); |
46 CallRuntime(Runtime::kPromiseHookInit, context, instance, parent); | 46 CallRuntime(Runtime::kPromiseHookInit, context, instance, parent); |
47 Goto(&out); | 47 Goto(&out); |
48 | 48 |
49 Bind(&out); | 49 Bind(&out); |
50 return instance; | 50 return instance; |
51 } | 51 } |
52 | 52 |
53 Node* PromiseBuiltinsAssembler::AllocateAndSetJSPromise(Node* context, | 53 Node* PromiseBuiltinsAssembler::AllocateAndSetJSPromise(Node* context, |
54 Node* status, | 54 Node* status, |
55 Node* result) { | 55 Node* result) { |
56 CSA_ASSERT(this, TaggedIsSmi(status)); | 56 CSA_ASSERT(this, TaggedIsSmi(status)); |
57 | 57 |
58 Node* const instance = AllocateJSPromise(context); | 58 Node* const instance = AllocateJSPromise(context); |
59 | 59 |
60 StoreObjectFieldNoWriteBarrier(instance, JSPromise::kStatusOffset, status); | 60 StoreObjectFieldNoWriteBarrier(instance, JSPromise::kStatusOffset, status); |
61 StoreObjectFieldNoWriteBarrier(instance, JSPromise::kResultOffset, result); | 61 StoreObjectFieldNoWriteBarrier(instance, JSPromise::kResultOffset, result); |
62 StoreObjectFieldNoWriteBarrier(instance, JSPromise::kFlagsOffset, | 62 StoreObjectFieldNoWriteBarrier(instance, JSPromise::kFlagsOffset, |
63 SmiConstant(0)); | 63 SmiConstant(0)); |
64 | 64 |
65 Label out(this); | 65 Label out(this); |
66 GotoUnless(IsPromiseHookEnabled(), &out); | 66 GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &out); |
67 CallRuntime(Runtime::kPromiseHookInit, context, instance, | 67 CallRuntime(Runtime::kPromiseHookInit, context, instance, |
68 UndefinedConstant()); | 68 UndefinedConstant()); |
69 Goto(&out); | 69 Goto(&out); |
70 | 70 |
71 Bind(&out); | 71 Bind(&out); |
72 return instance; | 72 return instance; |
73 } | 73 } |
74 | 74 |
75 std::pair<Node*, Node*> | 75 std::pair<Node*, Node*> |
76 PromiseBuiltinsAssembler::CreatePromiseResolvingFunctions( | 76 PromiseBuiltinsAssembler::CreatePromiseResolvingFunctions( |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 capability, JSPromiseCapability::kPromiseOffset, promise); | 127 capability, JSPromiseCapability::kPromiseOffset, promise); |
128 | 128 |
129 Node* resolve = nullptr; | 129 Node* resolve = nullptr; |
130 Node* reject = nullptr; | 130 Node* reject = nullptr; |
131 | 131 |
132 std::tie(resolve, reject) = | 132 std::tie(resolve, reject) = |
133 CreatePromiseResolvingFunctions(promise, debug_event, native_context); | 133 CreatePromiseResolvingFunctions(promise, debug_event, native_context); |
134 StoreObjectField(capability, JSPromiseCapability::kResolveOffset, resolve); | 134 StoreObjectField(capability, JSPromiseCapability::kResolveOffset, resolve); |
135 StoreObjectField(capability, JSPromiseCapability::kRejectOffset, reject); | 135 StoreObjectField(capability, JSPromiseCapability::kRejectOffset, reject); |
136 | 136 |
137 GotoUnless(IsPromiseHookEnabled(), &out); | 137 GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &out); |
138 CallRuntime(Runtime::kPromiseHookInit, context, promise, | 138 CallRuntime(Runtime::kPromiseHookInit, context, promise, |
139 UndefinedConstant()); | 139 UndefinedConstant()); |
140 Goto(&out); | 140 Goto(&out); |
141 } | 141 } |
142 | 142 |
143 Bind(&if_custom_promise); | 143 Bind(&if_custom_promise); |
144 { | 144 { |
145 Label if_notcallable(this, Label::kDeferred); | 145 Label if_notcallable(this, Label::kDeferred); |
146 Node* executor_context = | 146 Node* executor_context = |
147 CreatePromiseGetCapabilitiesExecutorContext(capability, native_context); | 147 CreatePromiseGetCapabilitiesExecutorContext(capability, native_context); |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 { | 568 { |
569 Label reject(this); | 569 Label reject(this); |
570 Node* const result = LoadObjectField(promise, JSPromise::kResultOffset); | 570 Node* const result = LoadObjectField(promise, JSPromise::kResultOffset); |
571 GotoUnless(WordEqual(status, SmiConstant(v8::Promise::kFulfilled)), | 571 GotoUnless(WordEqual(status, SmiConstant(v8::Promise::kFulfilled)), |
572 &reject); | 572 &reject); |
573 | 573 |
574 Node* info = AllocatePromiseReactionJobInfo( | 574 Node* info = AllocatePromiseReactionJobInfo( |
575 result, var_on_resolve.value(), deferred_promise, deferred_on_resolve, | 575 result, var_on_resolve.value(), deferred_promise, deferred_on_resolve, |
576 deferred_on_reject, context); | 576 deferred_on_reject, context); |
577 // TODO(gsathya): Move this to TF | 577 // TODO(gsathya): Move this to TF |
578 CallRuntime(Runtime::kEnqueuePromiseReactionJob, context, promise, info, | 578 CallRuntime(Runtime::kEnqueuePromiseReactionJob, context, info); |
579 SmiConstant(v8::Promise::kFulfilled)); | |
580 Goto(&out); | 579 Goto(&out); |
581 | 580 |
582 Bind(&reject); | 581 Bind(&reject); |
583 { | 582 { |
584 Node* const has_handler = PromiseHasHandler(promise); | 583 Node* const has_handler = PromiseHasHandler(promise); |
585 Label enqueue(this); | 584 Label enqueue(this); |
586 | 585 |
587 // TODO(gsathya): Fold these runtime calls and move to TF. | 586 // TODO(gsathya): Fold these runtime calls and move to TF. |
588 GotoIf(has_handler, &enqueue); | 587 GotoIf(has_handler, &enqueue); |
589 CallRuntime(Runtime::kPromiseRevokeReject, context, promise); | 588 CallRuntime(Runtime::kPromiseRevokeReject, context, promise); |
590 Goto(&enqueue); | 589 Goto(&enqueue); |
591 | 590 |
592 Bind(&enqueue); | 591 Bind(&enqueue); |
593 { | 592 { |
594 Node* info = AllocatePromiseReactionJobInfo( | 593 Node* info = AllocatePromiseReactionJobInfo( |
595 result, var_on_reject.value(), deferred_promise, | 594 result, var_on_reject.value(), deferred_promise, |
596 deferred_on_resolve, deferred_on_reject, context); | 595 deferred_on_resolve, deferred_on_reject, context); |
597 // TODO(gsathya): Move this to TF | 596 // TODO(gsathya): Move this to TF |
598 CallRuntime(Runtime::kEnqueuePromiseReactionJob, context, promise, | 597 CallRuntime(Runtime::kEnqueuePromiseReactionJob, context, info); |
599 info, SmiConstant(v8::Promise::kRejected)); | |
600 Goto(&out); | 598 Goto(&out); |
601 } | 599 } |
602 } | 600 } |
603 } | 601 } |
604 } | 602 } |
605 | 603 |
606 Bind(&out); | 604 Bind(&out); |
607 PromiseSetHasHandler(promise); | 605 PromiseSetHasHandler(promise); |
608 return deferred_promise; | 606 return deferred_promise; |
609 } | 607 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 StoreMapNoWriteBarrier(info, | 654 StoreMapNoWriteBarrier(info, |
657 Heap::kPromiseResolveThenableJobInfoMapRootIndex); | 655 Heap::kPromiseResolveThenableJobInfoMapRootIndex); |
658 StoreObjectFieldNoWriteBarrier( | 656 StoreObjectFieldNoWriteBarrier( |
659 info, PromiseResolveThenableJobInfo::kThenableOffset, thenable); | 657 info, PromiseResolveThenableJobInfo::kThenableOffset, thenable); |
660 StoreObjectFieldNoWriteBarrier( | 658 StoreObjectFieldNoWriteBarrier( |
661 info, PromiseResolveThenableJobInfo::kThenOffset, then); | 659 info, PromiseResolveThenableJobInfo::kThenOffset, then); |
662 StoreObjectFieldNoWriteBarrier( | 660 StoreObjectFieldNoWriteBarrier( |
663 info, PromiseResolveThenableJobInfo::kResolveOffset, resolve); | 661 info, PromiseResolveThenableJobInfo::kResolveOffset, resolve); |
664 StoreObjectFieldNoWriteBarrier( | 662 StoreObjectFieldNoWriteBarrier( |
665 info, PromiseResolveThenableJobInfo::kRejectOffset, reject); | 663 info, PromiseResolveThenableJobInfo::kRejectOffset, reject); |
666 StoreObjectFieldNoWriteBarrier(info, | |
667 PromiseResolveThenableJobInfo::kDebugIdOffset, | |
668 SmiConstant(kDebugPromiseNoID)); | |
669 StoreObjectFieldNoWriteBarrier( | 664 StoreObjectFieldNoWriteBarrier( |
670 info, PromiseResolveThenableJobInfo::kContextOffset, context); | 665 info, PromiseResolveThenableJobInfo::kContextOffset, context); |
671 return info; | 666 return info; |
672 } | 667 } |
673 | 668 |
674 void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context, | 669 void PromiseBuiltinsAssembler::InternalResolvePromise(Node* context, |
675 Node* promise, | 670 Node* promise, |
676 Node* result) { | 671 Node* result) { |
677 Isolate* isolate = this->isolate(); | 672 Isolate* isolate = this->isolate(); |
678 | 673 |
679 Variable var_reason(this, MachineRepresentation::kTagged), | 674 Variable var_reason(this, MachineRepresentation::kTagged), |
680 var_then(this, MachineRepresentation::kTagged); | 675 var_then(this, MachineRepresentation::kTagged); |
681 | 676 |
682 Label do_enqueue(this), fulfill(this), if_cycle(this, Label::kDeferred), | 677 Label do_enqueue(this), fulfill(this), if_cycle(this, Label::kDeferred), |
683 if_rejectpromise(this, Label::kDeferred), out(this); | 678 if_rejectpromise(this, Label::kDeferred), out(this); |
684 | 679 |
685 Label cycle_check(this); | 680 Label cycle_check(this); |
686 GotoUnless(IsPromiseHookEnabled(), &cycle_check); | 681 GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &cycle_check); |
687 CallRuntime(Runtime::kPromiseHookResolve, context, promise); | 682 CallRuntime(Runtime::kPromiseHookResolve, context, promise); |
688 Goto(&cycle_check); | 683 Goto(&cycle_check); |
689 | 684 |
690 Bind(&cycle_check); | 685 Bind(&cycle_check); |
691 // 6. If SameValue(resolution, promise) is true, then | 686 // 6. If SameValue(resolution, promise) is true, then |
692 GotoIf(SameValue(promise, result, context), &if_cycle); | 687 GotoIf(SameValue(promise, result, context), &if_cycle); |
693 | 688 |
694 // 7. If Type(resolution) is not Object, then | 689 // 7. If Type(resolution) is not Object, then |
695 GotoIf(TaggedIsSmi(result), &fulfill); | 690 GotoIf(TaggedIsSmi(result), &fulfill); |
696 GotoUnless(IsJSReceiver(result), &fulfill); | 691 GotoUnless(IsJSReceiver(result), &fulfill); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 Node* reject = nullptr; | 781 Node* reject = nullptr; |
787 std::tie(resolve, reject) = CreatePromiseResolvingFunctions( | 782 std::tie(resolve, reject) = CreatePromiseResolvingFunctions( |
788 promise, FalseConstant(), native_context); | 783 promise, FalseConstant(), native_context); |
789 | 784 |
790 Node* const info = AllocatePromiseResolveThenableJobInfo( | 785 Node* const info = AllocatePromiseResolveThenableJobInfo( |
791 result, var_then.value(), resolve, reject, context); | 786 result, var_then.value(), resolve, reject, context); |
792 | 787 |
793 Label enqueue(this); | 788 Label enqueue(this); |
794 GotoUnless(IsDebugActive(), &enqueue); | 789 GotoUnless(IsDebugActive(), &enqueue); |
795 | 790 |
796 Node* const debug_id = | |
797 CallRuntime(Runtime::kDebugNextAsyncTaskId, context, promise); | |
798 StoreObjectField(info, PromiseResolveThenableJobInfo::kDebugIdOffset, | |
799 debug_id); | |
800 | |
801 GotoIf(TaggedIsSmi(result), &enqueue); | 791 GotoIf(TaggedIsSmi(result), &enqueue); |
802 GotoUnless(HasInstanceType(result, JS_PROMISE_TYPE), &enqueue); | 792 GotoUnless(HasInstanceType(result, JS_PROMISE_TYPE), &enqueue); |
803 | 793 |
804 // Mark the dependency of the new promise on the resolution | 794 // Mark the dependency of the new promise on the resolution |
805 Node* const key = | 795 Node* const key = |
806 HeapConstant(isolate->factory()->promise_handled_by_symbol()); | 796 HeapConstant(isolate->factory()->promise_handled_by_symbol()); |
807 CallRuntime(Runtime::kSetProperty, context, result, key, promise, | 797 CallRuntime(Runtime::kSetProperty, context, result, key, promise, |
808 SmiConstant(STRICT)); | 798 SmiConstant(STRICT)); |
809 Goto(&enqueue); | 799 Goto(&enqueue); |
810 | 800 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 | 853 |
864 Node* const deferred_on_resolve = | 854 Node* const deferred_on_resolve = |
865 LoadObjectField(promise, JSPromise::kDeferredOnResolveOffset); | 855 LoadObjectField(promise, JSPromise::kDeferredOnResolveOffset); |
866 Node* const deferred_on_reject = | 856 Node* const deferred_on_reject = |
867 LoadObjectField(promise, JSPromise::kDeferredOnRejectOffset); | 857 LoadObjectField(promise, JSPromise::kDeferredOnRejectOffset); |
868 | 858 |
869 Node* const info = AllocatePromiseReactionJobInfo( | 859 Node* const info = AllocatePromiseReactionJobInfo( |
870 result, tasks, deferred_promise, deferred_on_resolve, deferred_on_reject, | 860 result, tasks, deferred_promise, deferred_on_resolve, deferred_on_reject, |
871 context); | 861 context); |
872 | 862 |
873 CallRuntime(Runtime::kEnqueuePromiseReactionJob, context, promise, info, | 863 CallRuntime(Runtime::kEnqueuePromiseReactionJob, context, info); |
874 status_smi); | |
875 Goto(&debug_async_event_enqueue_recurring); | 864 Goto(&debug_async_event_enqueue_recurring); |
876 | 865 |
877 Bind(&debug_async_event_enqueue_recurring); | 866 Bind(&debug_async_event_enqueue_recurring); |
878 { | 867 { |
879 GotoUnless(IsDebugActive(), &do_promisereset); | 868 GotoUnless(IsDebugActive(), &do_promisereset); |
880 CallRuntime(Runtime::kDebugAsyncEventEnqueueRecurring, context, promise, | 869 CallRuntime(Runtime::kDebugAsyncEventEnqueueRecurring, context, promise, |
881 status_smi); | 870 status_smi); |
882 Goto(&do_promisereset); | 871 Goto(&do_promisereset); |
883 } | 872 } |
884 | 873 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 if (debug_event) { | 956 if (debug_event) { |
968 GotoUnless(IsDebugActive(), &run_promise_hook); | 957 GotoUnless(IsDebugActive(), &run_promise_hook); |
969 CallRuntime(Runtime::kDebugPromiseReject, context, promise, value); | 958 CallRuntime(Runtime::kDebugPromiseReject, context, promise, value); |
970 Goto(&run_promise_hook); | 959 Goto(&run_promise_hook); |
971 } else { | 960 } else { |
972 Goto(&run_promise_hook); | 961 Goto(&run_promise_hook); |
973 } | 962 } |
974 | 963 |
975 Bind(&run_promise_hook); | 964 Bind(&run_promise_hook); |
976 { | 965 { |
977 GotoUnless(IsPromiseHookEnabled(), &report_unhandledpromise); | 966 GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &report_unhandledpromise); |
978 CallRuntime(Runtime::kPromiseHookResolve, context, promise); | 967 CallRuntime(Runtime::kPromiseHookResolve, context, promise); |
979 Goto(&report_unhandledpromise); | 968 Goto(&report_unhandledpromise); |
980 } | 969 } |
981 | 970 |
982 Bind(&report_unhandledpromise); | 971 Bind(&report_unhandledpromise); |
983 { | 972 { |
984 GotoIf(PromiseHasHandler(promise), &fulfill); | 973 GotoIf(PromiseHasHandler(promise), &fulfill); |
985 CallRuntime(Runtime::kReportPromiseReject, context, promise, value); | 974 CallRuntime(Runtime::kReportPromiseReject, context, promise, value); |
986 Goto(&fulfill); | 975 Goto(&fulfill); |
987 } | 976 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 } | 1056 } |
1068 | 1057 |
1069 Bind(&if_targetismodified); | 1058 Bind(&if_targetismodified); |
1070 { | 1059 { |
1071 ConstructorBuiltinsAssembler constructor_assembler(this->state()); | 1060 ConstructorBuiltinsAssembler constructor_assembler(this->state()); |
1072 Node* const instance = constructor_assembler.EmitFastNewObject( | 1061 Node* const instance = constructor_assembler.EmitFastNewObject( |
1073 context, promise_fun, new_target); | 1062 context, promise_fun, new_target); |
1074 PromiseInit(instance); | 1063 PromiseInit(instance); |
1075 var_result.Bind(instance); | 1064 var_result.Bind(instance); |
1076 | 1065 |
1077 GotoUnless(IsPromiseHookEnabled(), &debug_push); | 1066 GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &debug_push); |
1078 CallRuntime(Runtime::kPromiseHookInit, context, instance, | 1067 CallRuntime(Runtime::kPromiseHookInit, context, instance, |
1079 UndefinedConstant()); | 1068 UndefinedConstant()); |
1080 Goto(&debug_push); | 1069 Goto(&debug_push); |
1081 } | 1070 } |
1082 | 1071 |
1083 Bind(&debug_push); | 1072 Bind(&debug_push); |
1084 { | 1073 { |
1085 GotoUnless(is_debug_active, &run_executor); | 1074 GotoUnless(is_debug_active, &run_executor); |
1086 CallRuntime(Runtime::kDebugPushPromise, context, var_result.value()); | 1075 CallRuntime(Runtime::kDebugPushPromise, context, var_result.value()); |
1087 Goto(&run_executor); | 1076 Goto(&run_executor); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 Node* const is_debug_active = IsDebugActive(); | 1251 Node* const is_debug_active = IsDebugActive(); |
1263 Label run_handler(this), if_rejectpromise(this), promisehook_before(this), | 1252 Label run_handler(this), if_rejectpromise(this), promisehook_before(this), |
1264 promisehook_after(this), debug_pop(this); | 1253 promisehook_after(this), debug_pop(this); |
1265 | 1254 |
1266 GotoUnless(is_debug_active, &promisehook_before); | 1255 GotoUnless(is_debug_active, &promisehook_before); |
1267 CallRuntime(Runtime::kDebugPushPromise, context, deferred_promise); | 1256 CallRuntime(Runtime::kDebugPushPromise, context, deferred_promise); |
1268 Goto(&promisehook_before); | 1257 Goto(&promisehook_before); |
1269 | 1258 |
1270 Bind(&promisehook_before); | 1259 Bind(&promisehook_before); |
1271 { | 1260 { |
1272 GotoUnless(IsPromiseHookEnabled(), &run_handler); | 1261 GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &run_handler); |
1273 CallRuntime(Runtime::kPromiseHookBefore, context, deferred_promise); | 1262 CallRuntime(Runtime::kPromiseHookBefore, context, deferred_promise); |
1274 Goto(&run_handler); | 1263 Goto(&run_handler); |
1275 } | 1264 } |
1276 | 1265 |
1277 Bind(&run_handler); | 1266 Bind(&run_handler); |
1278 { | 1267 { |
1279 Callable call_callable = CodeFactory::Call(isolate); | 1268 Callable call_callable = CodeFactory::Call(isolate); |
1280 Node* const result = | 1269 Node* const result = |
1281 CallJS(call_callable, context, handler, UndefinedConstant(), value); | 1270 CallJS(call_callable, context, handler, UndefinedConstant(), value); |
1282 | 1271 |
(...skipping 20 matching lines...) Expand all Loading... |
1303 Bind(&if_rejectpromise); | 1292 Bind(&if_rejectpromise); |
1304 { | 1293 { |
1305 Callable promise_handle_reject = CodeFactory::PromiseHandleReject(isolate); | 1294 Callable promise_handle_reject = CodeFactory::PromiseHandleReject(isolate); |
1306 CallStub(promise_handle_reject, context, deferred_promise, | 1295 CallStub(promise_handle_reject, context, deferred_promise, |
1307 deferred_on_reject, var_reason.value()); | 1296 deferred_on_reject, var_reason.value()); |
1308 Goto(&promisehook_after); | 1297 Goto(&promisehook_after); |
1309 } | 1298 } |
1310 | 1299 |
1311 Bind(&promisehook_after); | 1300 Bind(&promisehook_after); |
1312 { | 1301 { |
1313 GotoUnless(IsPromiseHookEnabled(), &debug_pop); | 1302 GotoUnless(IsPromiseHookEnabledOrDebugIsActive(), &debug_pop); |
1314 CallRuntime(Runtime::kPromiseHookAfter, context, deferred_promise); | 1303 CallRuntime(Runtime::kPromiseHookAfter, context, deferred_promise); |
1315 Goto(&debug_pop); | 1304 Goto(&debug_pop); |
1316 } | 1305 } |
1317 | 1306 |
1318 Bind(&debug_pop); | 1307 Bind(&debug_pop); |
1319 { | 1308 { |
1320 Label out(this); | 1309 Label out(this); |
1321 | 1310 |
1322 GotoUnless(is_debug_active, &out); | 1311 GotoUnless(is_debug_active, &out); |
1323 CallRuntime(Runtime::kDebugPopPromise, context); | 1312 CallRuntime(Runtime::kDebugPopPromise, context); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1537 Node* const reason = Parameter(2); | 1526 Node* const reason = Parameter(2); |
1538 Node* const debug_event = Parameter(3); | 1527 Node* const debug_event = Parameter(3); |
1539 Node* const context = Parameter(6); | 1528 Node* const context = Parameter(6); |
1540 | 1529 |
1541 InternalPromiseReject(context, promise, reason, debug_event); | 1530 InternalPromiseReject(context, promise, reason, debug_event); |
1542 Return(UndefinedConstant()); | 1531 Return(UndefinedConstant()); |
1543 } | 1532 } |
1544 | 1533 |
1545 } // namespace internal | 1534 } // namespace internal |
1546 } // namespace v8 | 1535 } // namespace v8 |
OLD | NEW |