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

Function _xsbug_module_

tools/test262/_262.c:283–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void _xsbug_module_(txMachine* the)
284{
285 mxTry(the) {
286 txParser _parser;
287 txParser* parser = &_parser;
288 txParserJump jump;
289 txString name = NULL;
290 txScript* script = NULL;
291 fxInitializeParser(parser, the, the->parserBufferSize, the->parserTableModulo);
292 parser->firstJump = &jump;
293 if (c_setjmp(jump.jmp_buf) == 0) {
294 txStringStream stream;
295 stream.slot = mxArgv(3);
296 stream.offset = 0;
297 stream.size = fxToInteger(the, mxArgv(5)) - 1;
298 parser->path = fxNewParserSymbol(parser, fxToString(the, mxArgv(1)));
299 fxParserTree(parser, &stream, fxStringGetter, mxDebugFlag | mxStrictFlag, &name);
300 fxParserHoist(parser);
301 fxParserBind(parser);
302 script = fxParserCode(parser);
303 }
304 #ifdef mxInstrument
305 if (the->peakParserSize < parser->total)
306 the->peakParserSize = parser->total;
307 #endif
308 fxTerminateParser(parser);
309 if (script) {
310 fxResolveModule(the, mxArgv(0), XS_NO_ID, script, C_NULL, C_NULL);
311 }
312 else {
313 mxSyntaxError("invalid module");
314 }
315 }
316 mxCatch(the) {
317 fxJump(the);
318 }
319}
320
321void _xsbug_script_(txMachine* the)
322{

Callers

nothing calls this directly

Calls 11

fxInitializeParserFunction · 0.85
fxToIntegerFunction · 0.85
fxNewParserSymbolFunction · 0.85
fxToStringFunction · 0.85
fxParserTreeFunction · 0.85
fxParserHoistFunction · 0.85
fxParserBindFunction · 0.85
fxParserCodeFunction · 0.85
fxTerminateParserFunction · 0.85
fxResolveModuleFunction · 0.85
fxJumpFunction · 0.85

Tested by

no test coverage detected