MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fx_AsyncDisposableStack

Function fx_AsyncDisposableStack

xs/sources/xsError.c:724–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722 return C_NULL;
723}
724void fx_AsyncDisposableStack(txMachine* the)
725{
726 txSlot* instance;
727 txSlot* property;
728 txSlot* function;
729 txSlot* home;
730 if (!mxHasTarget)
731 mxTypeError("call: AsyncDisposableStack");
732 mxPushSlot(mxTarget);
733 fxGetPrototypeFromConstructor(the, &mxAsyncDisposableStackPrototype);
734 instance = fxNewSlot(the);
735 instance->kind = XS_INSTANCE_KIND;
736 instance->value.instance.garbage = C_NULL;
737 instance->value.instance.prototype = the->stack->value.reference;
738 the->stack->kind = XS_REFERENCE_KIND;
739 the->stack->value.reference = instance;
740 mxPullSlot(mxResult);
741 property = instance->next = fxNewSlot(the);
742 property->flag = XS_INTERNAL_FLAG;
743 property->kind = XS_ASYNC_DISPOSABLE_STACK_KIND;
744 property->value.disposableStack.stack = C_NULL;
745 property->value.disposableStack.disposed = 0;
746
747 property = fxNextUndefinedProperty(the, property, XS_NO_ID, XS_INTERNAL_FLAG);
748 function = fxNewHostFunction(the, fxAsyncDisposableStackResolve, 1, XS_NO_ID, mxAsyncGeneratorResolveYieldProfileID);
749 home = mxFunctionInstanceHome(function);
750 home->value.home.object = instance;
751 property = fxNextSlotProperty(the, property, the->stack, XS_NO_ID, XS_INTERNAL_FLAG);
752 mxPop();
753 function = fxNewHostFunction(the, fxAsyncDisposableStackReject, 1, XS_NO_ID, mxAsyncGeneratorRejectYieldProfileID);
754 home = mxFunctionInstanceHome(function);
755 home->value.home.object = instance;
756 property = fxNextSlotProperty(the, property, the->stack, XS_NO_ID, XS_INTERNAL_FLAG);
757 mxPop();
758 property = fxNextUndefinedProperty(the, property, XS_NO_ID, XS_INTERNAL_FLAG);
759 property = fxNextUndefinedProperty(the, property, XS_NO_ID, XS_INTERNAL_FLAG);
760}
761
762void fx_AsyncDisposableStack_prototype_get_disposed(txMachine* the)
763{

Callers

nothing calls this directly

Calls 5

fxNewSlotFunction · 0.85
fxNextUndefinedPropertyFunction · 0.85
fxNewHostFunctionFunction · 0.85
fxNextSlotPropertyFunction · 0.85

Tested by

no test coverage detected