| 639 | } |
| 640 | |
| 641 | void fxPushPromiseFunctions(txMachine* the, txSlot* promise) |
| 642 | { |
| 643 | txSlot* resolve; |
| 644 | txSlot* reject; |
| 645 | txSlot* object; |
| 646 | txSlot* slot; |
| 647 | resolve = fxNewHostFunction(the, fxResolvePromise, 1, XS_NO_ID, mxResolvePromiseProfileID); |
| 648 | reject = fxNewHostFunction(the, fxRejectPromise, 1, XS_NO_ID, mxRejectPromiseProfileID); |
| 649 | slot = object = fxNewInstance(the); |
| 650 | slot = object->next = fxNewSlot(the); |
| 651 | slot->kind = XS_BOOLEAN_KIND; |
| 652 | slot->value.boolean = 0; |
| 653 | slot = slot->next = fxNewSlot(the); |
| 654 | slot->kind = XS_REFERENCE_KIND; |
| 655 | slot->value.reference = promise; |
| 656 | slot = mxFunctionInstanceHome(resolve); |
| 657 | slot->value.home.object = object; |
| 658 | slot = mxFunctionInstanceHome(reject); |
| 659 | slot->value.home.object = object; |
| 660 | mxPop(); |
| 661 | } |
| 662 | |
| 663 | void fxRejectException(txMachine* the, txSlot* rejectFunction) |
| 664 | { |
no test coverage detected