| 548 | } |
| 549 | |
| 550 | void fx_runScript(xsMachine* the) |
| 551 | { |
| 552 | txSlot* realm = mxProgram.value.reference->next->value.module.realm; |
| 553 | char path[C_PATH_MAX]; |
| 554 | txUnsigned flags = mxProgramFlag | mxDebugFlag; |
| 555 | if (!c_realpath(fxToString(the, mxArgv(0)), path)) |
| 556 | xsURIError("file not found"); |
| 557 | txScript* script = fxLoadScript(the, path, flags); |
| 558 | mxModuleInstanceInternal(mxProgram.value.reference)->value.module.id = fxID(the, path); |
| 559 | fxRunScript(the, script, mxRealmGlobal(realm), C_NULL, mxRealmClosures(realm)->value.reference, C_NULL, mxProgram.value.reference); |
| 560 | mxPullSlot(mxResult); |
| 561 | } |
| 562 | |
| 563 | /* $262 */ |
| 564 |
nothing calls this directly
no test coverage detected