Lines Matching refs:Node
19 using compiler::Node;
21 Node* PromiseBuiltinsAssembler::AllocateJSPromise(Node* context) {
22 Node* const native_context = LoadNativeContext(context);
23 Node* const promise_fun =
26 Node* const promise_map =
28 Node* const promise = Allocate(JSPromise::kSizeWithEmbedderFields);
37 void PromiseBuiltinsAssembler::PromiseInit(Node* promise) {
49 Node* PromiseBuiltinsAssembler::AllocateAndInitJSPromise(Node* context) {
53 Node* PromiseBuiltinsAssembler::AllocateAndInitJSPromise(Node* context,
54 Node* parent) {
55 Node* const instance = AllocateJSPromise(context);
67 Node* PromiseBuiltinsAssembler::AllocateAndSetJSPromise(
68 Node* context, v8::Promise::PromiseState status, Node* result) {
71 Node* const instance = AllocateJSPromise(context);
92 std::pair<Node*, Node*>
94 Node* promise, Node* debug_event, Node* native_context) {
95 Node* const promise_context = CreatePromiseResolvingFunctionsContext(
97 Node* const map = LoadContextElement(
99 Node* const resolve_info = LoadContextElement(
102 Node* const resolve =
104 Node* const reject_info = LoadContextElement(
107 Node* const reject =
114 Node* const context = Parameter(Descriptor::kContext);
115 Node* const constructor = Parameter(Descriptor::kConstructor);
116 Node* const debug_event = Parameter(Descriptor::kDebugEvent);
117 Node* const native_context = LoadNativeContext(context);
131 Node* promise =
134 Node* resolve = nullptr;
135 Node* reject = nullptr;
139 Node* capability = Allocate(PromiseCapability::kSize);
152 Node* capability = Allocate(PromiseCapability::kSize);
161 Node* executor_context =
163 Node* executor_info = LoadContextElement(
165 Node* function_map = LoadContextElement(
167 Node* executor = AllocateFunctionWithMapAndContext(
170 Node* promise = ConstructJS(CodeFactory::Construct(isolate()),
174 Node* resolve =
179 Node* reject =
193 Node* PromiseBuiltinsAssembler::CreatePromiseContext(Node* native_context,
197 Node* const context = AllocateInNewSpace(FixedArray::SizeFor(slots));
202 Node* PromiseBuiltinsAssembler::CreatePromiseAllResolveElementContext(
203 Node* promise_capability, Node* native_context) {
207 Node* const array_map = LoadContextElement(
209 Node* const values_array = AllocateJSArray(PACKED_ELEMENTS, array_map,
212 Node* const context =
224 Node* PromiseBuiltinsAssembler::CreatePromiseAllResolveElementFunction(
225 Node* context, TNode<Smi> index, Node* native_context) {
231 Node* const map = LoadContextElement(
233 Node* const resolve_info = LoadContextElement(
235 Node* const resolve =
245 Node* PromiseBuiltinsAssembler::CreatePromiseResolvingFunctionsContext(
246 Node* promise, Node* debug_event, Node* native_context) {
247 Node* const context =
256 Node* PromiseBuiltinsAssembler::CreatePromiseGetCapabilitiesExecutorContext(
257 Node* promise_capability, Node* native_context) {
259 Node* context = CreatePromiseContext(native_context, kContextLength);
265 Node* PromiseBuiltinsAssembler::PromiseHasHandler(Node* promise) {
266 Node* const flags = LoadObjectField(promise, JSPromise::kFlagsOffset);
270 void PromiseBuiltinsAssembler::PromiseSetHasHandler(Node* promise) {
278 Node* PromiseBuiltinsAssembler::IsPromiseStatus(
279 Node* actual, v8::Promise::PromiseState expected) {
283 Node* PromiseBuiltinsAssembler::PromiseStatus(Node* promise) {
291 Node* promise, v8::Promise::PromiseState const status) {
303 void PromiseBuiltinsAssembler::PromiseSetHandledHint(Node* promise) {
313 Node* context, Node* promise, Node* on_fulfilled, Node* on_rejected,
314 Node* result_promise_or_capability) {
325 Node* const status = PromiseStatus(promise);
335 Node* const promise_reactions =
337 Node* const reaction =
371 Node* argument =
373 Node* microtask = AllocatePromiseReactionJobTask(
386 Node* const context = Parameter(Descriptor::kContext);
387 Node* const promise = Parameter(Descriptor::kPromise);
388 Node* const on_fulfilled = Parameter(Descriptor::kOnFulfilled);
389 Node* const on_rejected = Parameter(Descriptor::kOnRejected);
390 Node* const result_promise = Parameter(Descriptor::kResultPromise);
400 Node* PromiseBuiltinsAssembler::AllocatePromiseReaction(
401 Node* next, Node* promise_or_capability, Node* fulfill_handler,
402 Node* reject_handler) {
403 Node* const reaction = Allocate(PromiseReaction::kSize);
416 Node* PromiseBuiltinsAssembler::AllocatePromiseReactionJobTask(
417 Node* map, Node* context, Node* argument, Node* handler,
418 Node* promise_or_capability) {
419 Node* const microtask = Allocate(PromiseReactionJobTask::kSize);
433 Node* PromiseBuiltinsAssembler::AllocatePromiseReactionJobTask(
434 Heap::RootListIndex map_root_index, Node* context, Node* argument,
435 Node* handler, Node* promise_or_capability) {
438 Node* const map = LoadRoot(map_root_index);
443 Node* PromiseBuiltinsAssembler::AllocatePromiseResolveThenableJobTask(
444 Node* promise_to_resolve, Node* then, Node* thenable, Node* context) {
445 Node* const microtask = Allocate(PromiseResolveThenableJobTask::kSize);
461 Node* PromiseBuiltinsAssembler::TriggerPromiseReactions(
462 Node* context, Node* reactions, Node* argument,
475 Node* current = var_current.value();
496 Node* current = var_current.value();
516 Node* handler =
539 Node* PromiseBuiltinsAssembler::InvokeThen(Node* native_context, Node* receiver,
546 Node* const receiver_map = LoadMap(receiver);
556 Node* const then =
558 Node* const result =
568 Node* const then = GetProperty(native_context, receiver,
570 Node* const result = CallJS(
581 Node* PromiseBuiltinsAssembler::InvokeResolve(Node* native_context,
582 Node* constructor, Node* value,
598 Node* const result = CallBuiltin(Builtins::kPromiseResolve, native_context,
608 Node* const resolve =
612 Node* const result = CallJS(
626 Node* native_context, Node* constructor, Label* if_fast, Label* if_slow) {
630 Node* const promise_fun =
637 Node* native_context, Node* promise_map, Label* if_fast, Label* if_slow) {
641 Node* const promise_prototype =
650 Node* native_context, Node* receiver_map, Label* if_fast, Label* if_slow) {
656 Node* const promise_prototype =
664 Node* context, Node* native_context, Node* promise_constructor,
665 Node* executor, Label* if_noaccess) {
676 Node* executor_type = LoadInstanceType(var_executor.value());
690 Node* function_context =
692 Node* native_function_context = LoadNativeContext(function_context);
709 Node* context, Node* condition, const NodeGenerator& object) {
721 Node* context, Node* condition, Node* promise,
736 Node* const reason = Parameter(Descriptor::kReason);
737 Node* const context = Parameter(Descriptor::kContext);
740 Node* const promise = LoadContextElement(context, kPromiseSlot);
744 Node* const already_resolved =
755 Node* const debug_event = LoadContextElement(context, kDebugEventSlot);
768 Node* const resolution = Parameter(Descriptor::kResolution);
769 Node* const context = Parameter(Descriptor::kContext);
772 Node* const promise = LoadContextElement(context, kPromiseSlot);
776 Node* const already_resolved =
798 Node* promise = Parameter(Descriptor::kPromise);
799 Node* reject = Parameter(Descriptor::kReject);
800 Node* exception = Parameter(Descriptor::kException);
801 Node* const context = Parameter(Descriptor::kContext);
816 Node* const executor = Parameter(Descriptor::kExecutor);
817 Node* const new_target = Parameter(Descriptor::kJSNewTarget);
818 Node* const context = Parameter(Descriptor::kContext);
829 Node* const executor_map = LoadMap(executor);
832 Node* const native_context = LoadNativeContext(context);
833 Node* const promise_fun =
835 Node* const is_debug_active = IsDebugActive();
852 Node* const instance = AllocateAndInitJSPromise(context);
860 Node* const instance = constructor_assembler.EmitFastNewObject(
882 Node *resolve, *reject;
886 Node* const maybe_exception = CallJS(
920 Node* const counter_id =
929 Node* const parent = Parameter(Descriptor::kParent);
930 Node* const context = Parameter(Descriptor::kContext);
936 Node* const promise = Parameter(Descriptor::kPromise);
937 Node* const reason = Parameter(Descriptor::kReason);
938 Node* const context = Parameter(Descriptor::kContext);
946 Node* const promise = Parameter(Descriptor::kPromise);
947 Node* const resolution = Parameter(Descriptor::kResolution);
948 Node* const context = Parameter(Descriptor::kContext);
956 Node* const promise = Parameter(Descriptor::kReceiver);
957 Node* const on_fulfilled = Parameter(Descriptor::kOnFulfilled);
958 Node* const on_rejected = Parameter(Descriptor::kOnRejected);
959 Node* const context = Parameter(Descriptor::kContext);
968 Node* const native_context = LoadNativeContext(context);
969 Node* const promise_fun =
971 Node* const promise_map = LoadMap(promise);
976 Node* const constructor =
988 Node* const result_promise = AllocateAndInitJSPromise(context, promise);
996 Node* const debug_event = TrueConstant();
997 Node* const capability = CallBuiltin(Builtins::kNewPromiseCapability,
1049 Node* const receiver = Parameter(Descriptor::kReceiver);
1050 Node* const on_fulfilled = UndefinedConstant();
1051 Node* const on_rejected = Parameter(Descriptor::kOnRejected);
1052 Node* const context = Parameter(Descriptor::kContext);
1055 Node* const native_context = LoadNativeContext(context);
1061 Node* const native_context = Parameter(Descriptor::kContext);
1062 Node* const promise_to_resolve = Parameter(Descriptor::kPromiseToResolve);
1063 Node* const thenable = Parameter(Descriptor::kThenable);
1064 Node* const then = Parameter(Descriptor::kThen);
1080 Node* const promise_then =
1083 Node* const thenable_map = LoadMap(thenable);
1125 Node* resolve = nullptr;
1126 Node* reject = nullptr;
1132 Node* const result = CallJS(
1141 Node* const result = CallJS(
1150 void PromiseBuiltinsAssembler::PromiseReactionJob(Node* context, Node* argument,
1151 Node* handler,
1152 Node* promise_or_capability,
1168 Node* const result = CallJS(
1179 Node* const value = var_handler_result.value();
1196 Node* const resolve = LoadObjectField(promise_or_capability,
1198 Node* const result = CallJS(
1209 Node* const reason = var_handler_result.value();
1229 Node* const reject = LoadObjectField(promise_or_capability,
1231 Node* const result = CallJS(
1254 Node* const context = Parameter(Descriptor::kContext);
1255 Node* const value = Parameter(Descriptor::kValue);
1256 Node* const handler = Parameter(Descriptor::kHandler);
1257 Node* const promise_or_capability =
1266 Node* const context = Parameter(Descriptor::kContext);
1267 Node* const reason = Parameter(Descriptor::kReason);
1268 Node* const handler = Parameter(Descriptor::kHandler);
1269 Node* const promise_or_capability =
1278 Node* receiver = Parameter(Descriptor::kReceiver);
1279 Node* value = Parameter(Descriptor::kValue);
1280 Node* context = Parameter(Descriptor::kContext);
1291 Node* constructor = Parameter(Descriptor::kConstructor);
1292 Node* value = Parameter(Descriptor::kValue);
1293 Node* context = Parameter(Descriptor::kContext);
1297 Node* const native_context = LoadNativeContext(context);
1298 Node* const promise_fun =
1305 Node* const value_map = LoadMap(value);
1312 Node* const promise_prototype =
1328 Node* const value_constructor =
1344 Node* const result = AllocateAndInitJSPromise(context);
1351 Node* const debug_event = TrueConstant();
1352 Node* const capability = CallBuiltin(Builtins::kNewPromiseCapability,
1355 Node* const resolve =
1361 Node* const result =
1370 Node* const resolve = Parameter(Descriptor::kResolve);
1371 Node* const reject = Parameter(Descriptor::kReject);
1372 Node* const context = Parameter(Descriptor::kContext);
1374 Node* const capability = LoadContextElement(context, kCapabilitySlot);
1395 Node* const receiver = Parameter(Descriptor::kReceiver);
1396 Node* const reason = Parameter(Descriptor::kReason);
1397 Node* const context = Parameter(Descriptor::kContext);
1404 Node* const native_context = LoadNativeContext(context);
1406 Node* const promise_fun =
1413 Node* const promise =
1423 Node* const debug_event = TrueConstant();
1424 Node* const capability = CallBuiltin(Builtins::kNewPromiseCapability,
1428 Node* const reject =
1434 Node* const promise =
1440 std::pair<Node*, Node*> PromiseBuiltinsAssembler::CreatePromiseFinallyFunctions(
1441 Node* on_finally, Node* constructor, Node* native_context) {
1442 Node* const promise_context =
1448 Node* const map = LoadContextElement(
1450 Node* const then_finally_info = LoadContextElement(
1452 Node* const then_finally = AllocateFunctionWithMapAndContext(
1454 Node* const catch_finally_info = LoadContextElement(
1456 Node* const catch_finally = AllocateFunctionWithMapAndContext(
1462 Node* const context = Parameter(Descriptor::kContext);
1464 Node* const value = LoadContextElement(context, kValueSlot);
1468 Node* PromiseBuiltinsAssembler::CreateValueThunkFunction(Node* value,
1469 Node* native_context) {
1470 Node* const value_thunk_context = CreatePromiseContext(
1473 Node* const map = LoadContextElement(
1475 Node* const value_thunk_info = LoadContextElement(
1477 Node* const value_thunk = AllocateFunctionWithMapAndContext(
1485 Node* const value = Parameter(Descriptor::kValue);
1486 Node* const context = Parameter(Descriptor::kContext);
1489 Node* const on_finally = LoadContextElement(context, kOnFinallySlot);
1495 Node* const result = CallJS(
1500 Node* const constructor = LoadContextElement(context, kConstructorSlot);
1506 Node* const promise =
1510 Node* const native_context = LoadNativeContext(context);
1511 Node* const value_thunk = CreateValueThunkFunction(value, native_context);
1518 Node* const context = Parameter(Descriptor::kContext);
1520 Node* const reason = LoadContextElement(context, kValueSlot);
1525 Node* PromiseBuiltinsAssembler::CreateThrowerFunction(Node* reason,
1526 Node* native_context) {
1527 Node* const thrower_context = CreatePromiseContext(
1530 Node* const map = LoadContextElement(
1532 Node* const thrower_info = LoadContextElement(
1534 Node* const thrower =
1542 Node* const reason = Parameter(Descriptor::kReason);
1543 Node* const context = Parameter(Descriptor::kContext);
1546 Node* const on_finally = LoadContextElement(context, kOnFinallySlot);
1552 Node* result = CallJS(
1557 Node* const constructor = LoadContextElement(context, kConstructorSlot);
1563 Node* const promise =
1567 Node* const native_context = LoadNativeContext(context);
1568 Node* const thrower = CreateThrowerFunction(reason, native_context);
1578 Node* const receiver = Parameter(Descriptor::kReceiver);
1579 Node* const on_finally = Parameter(Descriptor::kOnFinally);
1580 Node* const context = Parameter(Descriptor::kContext);
1587 Node* const native_context = LoadNativeContext(context);
1588 Node* const promise_fun =
1592 Node* const receiver_map = LoadMap(receiver);
1598 Node* const constructor =
1604 Node* const constructor = var_constructor.value();
1626 Node* then_finally = nullptr;
1627 Node* catch_finally = nullptr;
1652 Node* const promise = Parameter(Descriptor::kPromise);
1653 Node* const value = Parameter(Descriptor::kValue);
1654 Node* const context = Parameter(Descriptor::kContext);
1660 Node* const reactions =
1678 Node* const promise = Parameter(Descriptor::kPromise);
1679 Node* const reason = Parameter(Descriptor::kReason);
1680 Node* const debug_event = Parameter(Descriptor::kDebugEvent);
1681 Node* const context = Parameter(Descriptor::kContext);
1702 Node* reactions =
1724 Node* const promise = Parameter(Descriptor::kPromise);
1725 Node* const resolution = Parameter(Descriptor::kResolution);
1726 Node* const context = Parameter(Descriptor::kContext);
1750 Node* const resolution_map = LoadMap(resolution);
1758 Node* const native_context = LoadNativeContext(context);
1762 Node* const promise_prototype =
1770 Node* const then =
1785 Node* const iterator_result_map =
1794 Node* const then =
1802 Node* const then_map = LoadMap(then);
1812 Node* const task = AllocatePromiseResolveThenableJobTask(
1834 Node* PromiseBuiltinsAssembler::PerformPromiseAll(
1835 Node* context, Node* constructor, Node* capability,
1840 Node* const instrumenting = IsDebugActive();
1841 Node* const native_context = LoadNativeContext(context);
1849 Node* const resolve_element_context =
1862 Node* const fast_iterator_result_map =
1864 Node* const next = iter_assembler.IteratorStep(
1872 Node* const next_value = iter_assembler.IteratorValue(
1877 Node* const next_promise =
1905 Node* const resolve_element_fun = CreatePromiseAllResolveElementFunction(
1910 Node* const then =
1914 Node* const then_call = CallJS(
1941 Node* const result =
1975 Node* const values_array = LoadContextElement(
1977 Node* const old_elements = LoadElements(values_array);
1981 Node* const new_elements =
1996 Node* const resolve =
1998 Node* const values_array = LoadContextElement(
2000 Node* const resolve_call = CallJS(
2011 Node* const promise =
2023 Node* const receiver = Parameter(Descriptor::kReceiver);
2024 Node* const context = Parameter(Descriptor::kContext);
2031 Node* const debug_event = FalseConstant();
2032 Node* const capability = CallBuiltin(Builtins::kNewPromiseCapability, context,
2040 Node* const iterable = Parameter(Descriptor::kIterable);
2049 Node* const result = PerformPromiseAll(
2058 Node* const reject =
2063 Node* const promise =
2186 Node* const receiver = Parameter(Descriptor::kReceiver);
2187 Node* const context = Parameter(Descriptor::kContext);
2194 Node* const debug_event = FalseConstant();
2195 Node* const capability = CallBuiltin(Builtins::kNewPromiseCapability, context,
2198 Node* const resolve =
2200 Node* const reject =
2203 Node* const instrumenting = IsDebugActive();
2214 Node* const iterable = Parameter(Descriptor::kIterable);
2224 Node* const native_context = LoadNativeContext(context);
2225 Node* const fast_iterator_result_map = LoadContextElement(
2231 Node* const next = iter_assembler.IteratorStep(
2239 Node* const next_value =
2244 Node* const next_promise =
2250 Node* const then =
2254 Node* const then_call =
2282 Node* const reject =
2287 Node* const promise =