| 581 | #endif |
| 582 | |
| 583 | static void setStepDone(txMachine *the) |
| 584 | { |
| 585 | gSetupPending -= 1; |
| 586 | if (gSetupPending) |
| 587 | return; |
| 588 | |
| 589 | xsBeginHost(the); |
| 590 | #if MODDEF_MAIN_ASYNC |
| 591 | xsVars(2); |
| 592 | xsResult = xsImport(((txPreparation *)xsPreparationAndCreation(NULL))->main); |
| 593 | xsVar(0) = xsNewHostFunction(setStepDoneFulfilled, 1); |
| 594 | xsVar(1) = xsNewHostFunction(setStepDoneRejected, 1); |
| 595 | xsCall2(xsResult, xsID("then"), xsVar(0), xsVar(1)); |
| 596 | #else |
| 597 | xsVars(1); |
| 598 | xsVar(0) = xsImportNow(((txPreparation *)xsPreparationAndCreation(NULL))->main); |
| 599 | xsVar(0) = xsGet(xsVar(0), xsID("default")); |
| 600 | if (xsTest(xsVar(0)) && xsIsInstanceOf(xsVar(0), xsFunctionPrototype)) |
| 601 | xsCallFunction0(xsVar(0), xsGlobal); |
| 602 | #endif |
| 603 | xsEndHost(the); |
| 604 | } |
| 605 | |
| 606 | void modRunMachineSetup(txMachine *the) |
| 607 | { |
no outgoing calls
no test coverage detected