| 319 | } |
| 320 | |
| 321 | void _xsbug_script_(txMachine* the) |
| 322 | { |
| 323 | txSlot* realm = mxProgram.value.reference->next->value.module.realm; |
| 324 | mxTry(the) { |
| 325 | txParser _parser; |
| 326 | txParser* parser = &_parser; |
| 327 | txParserJump jump; |
| 328 | txString name = NULL; |
| 329 | txScript* script = NULL; |
| 330 | fxInitializeParser(parser, the, the->parserBufferSize, the->parserTableModulo); |
| 331 | parser->firstJump = &jump; |
| 332 | if (c_setjmp(jump.jmp_buf) == 0) { |
| 333 | txStringStream stream; |
| 334 | stream.slot = mxArgv(3); |
| 335 | stream.offset = 0; |
| 336 | stream.size = fxToInteger(the, mxArgv(5)) - 1; |
| 337 | parser->path = fxNewParserSymbol(parser, fxToString(the, mxArgv(1))); |
| 338 | fxParserTree(parser, &stream, fxStringGetter, mxProgramFlag | mxDebugFlag | mxStrictFlag, &name); |
| 339 | fxParserHoist(parser); |
| 340 | fxParserBind(parser); |
| 341 | script = fxParserCode(parser); |
| 342 | } |
| 343 | #ifdef mxInstrument |
| 344 | if (the->peakParserSize < parser->total) |
| 345 | the->peakParserSize = parser->total; |
| 346 | #endif |
| 347 | name = fxNewParserChunk(parser, 8 + parser->path->length); |
| 348 | strcpy(name, "xsbug://"); |
| 349 | strcat(name, parser->path->string); |
| 350 | mxModuleInstanceInternal(mxProgram.value.reference)->value.module.id = fxID(the, name); |
| 351 | fxTerminateParser(parser); |
| 352 | if (xsTest(xsArg(2))) |
| 353 | gxTest262Async = TEST262_ASYNC_WAITING; |
| 354 | fxRunScript(the, script, mxRealmGlobal(realm), C_NULL, mxRealmClosures(realm)->value.reference, C_NULL, mxProgram.value.reference); |
| 355 | mxPop(); |
| 356 | if (gxTest262Async == TEST262_SYNC) |
| 357 | fxBubble(the, 2, "<", 0, "test262"); |
| 358 | } |
| 359 | mxCatch(the) { |
| 360 | mxPush(mxException); |
| 361 | fxBubble(the, 2, fxToString(the, the->stack), 0, "test262"); |
| 362 | mxPop(); |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | void fx_agent_get_safeBroadcast(xsMachine* the) |
| 367 | { |
nothing calls this directly
no test coverage detected