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

Function xs_repl_eval

examples/js/repl/mac/repl.c:62–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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