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

Function xs_repl_eval

examples/js/repl/win/repl.c:64–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void xs_repl_eval(txMachine* the)
65{
66 txStringStream aStream;
67 txSlot* realm = mxProgram.value.reference->next->value.module.realm;
68 aStream.slot = mxArgv(0);
69 aStream.offset = 0;
70 aStream.size = c_strlen(fxToString(the, mxArgv(0)));
71 fxRunScript(the, fxParseScript(the, &aStream, fxStringGetter, mxProgramFlag), mxRealmGlobal(realm), C_NULL, mxRealmClosures(realm)->value.reference, C_NULL, mxProgram.value.reference);
72 mxPullSlot(mxResult);
73#ifdef mxInstrument
74 fxSampleInstrumentation(the, 0, NULL);
75#endif
76}
77
78int main(int argc, char* argv[])
79{

Callers

nothing calls this directly

Calls 4

fxToStringFunction · 0.85
fxRunScriptFunction · 0.85
fxSampleInstrumentationFunction · 0.85
fxParseScriptFunction · 0.50

Tested by

no test coverage detected