UNPKG

pxt-common-packages

Version:
1,175 lines (1,027 loc) 32.9 kB
// total=32845 new=93.49% cached=0.00% other=6.51% (function (ectx) { 'use strict'; const runtime = ectx.runtime; const oops = ectx.oops; const doNothing = ectx.doNothing; const pxsim = ectx.pxsim; const globals = ectx.globals; const maybeYield = ectx.maybeYield; const setupDebugger = ectx.setupDebugger; const isBreakFrame = ectx.isBreakFrame; const breakpoint = ectx.breakpoint; const trace = ectx.trace; const checkStack = ectx.checkStack; const leave = ectx.leave; const checkResumeConsumed = ectx.checkResumeConsumed; const setupResume = ectx.setupResume; const setupLambda = ectx.setupLambda; const checkSubtype = ectx.checkSubtype; const failedCast = ectx.failedCast; const buildResume = ectx.buildResume; const mkVTable = ectx.mkVTable; const bind = ectx.bind; const leaveAccessor = ectx.leaveAccessor; const __this = runtime; const pxtrt = pxsim.pxtrt; let yieldSteps = 1; ectx.setupYield(function() { yieldSteps = 100; }) pxsim.setTitle("net"); pxsim.setConfigData({}, {}); pxtrt.mapKeyNames = [ "" ]; __this.setupPerfCounters([]); const pxsim_Array__getAt = pxsim.Array_.getAt; const pxsim_Array__length = pxsim.Array_.length; const pxsim_Array__mk = pxsim.Array_.mk; const pxsim_Array__push = pxsim.Array_.push; const pxsim_Boolean__bang = pxsim.Boolean_.bang; const pxsim_String__concat = pxsim.String_.concat; const pxsim_String__stringConv = pxsim.String_.stringConv; const pxsim_numops_toBool = pxsim.numops.toBool; const pxsim_numops_toBoolDecr = pxsim.numops.toBoolDecr; const pxsim_pxtcore_mkAction = pxsim.pxtcore.mkAction; const pxsim_pxtcore_mkClassInstance = pxsim.pxtcore.mkClassInstance; const pxsim_pxtrt_ldlocRef = pxsim.pxtrt.ldlocRef; const pxsim_pxtrt_mapGetByString = pxsim.pxtrt.mapGetByString; const pxsim_pxtrt_stclo = pxsim.pxtrt.stclo; const pxsim_pxtrt_stlocRef = pxsim.pxtrt.stlocRef; const pxsim_Boolean_ = pxsim.Boolean_; const pxsim_pxtcore = pxsim.pxtcore; const pxsim_String_ = pxsim.String_; const pxsim_ImageMethods = pxsim.ImageMethods; const pxsim_Array_ = pxsim.Array_; const pxsim_pxtrt = pxsim.pxtrt; const pxsim_numops = pxsim.numops; function _main___P112230(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: globals._intervals___112474 = (undefined); globals._pollEventQueue___112487 = (undefined); globals.RUN_KEY___112670 = ("#run"); globals.SCOPE_KEY___112671 = ("#scope"); s.tmp_0 = settings_initScopes__P112683_mk(s); s.callLocIdx = 13; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } _main___P112230.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"requests.ts","functionName":"<main>","argumentNames":[]} _main___P112230.continuations = [ ] function _main___P112230_mk(s) { checkStack(s.depth); return { parent: s, fn: _main___P112230, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } function settings_initScopes__P112683(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: s.rn___112824 = undefined; s.tmp_1 = settings_runNumber__P112681_mk(s); s.callLocIdx = 10; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; s.tmp_0 = r0; r0 = (s.tmp_0 + 1); s.rn___112824 = (r0); s.tmp_0 = settings_writeNumber__P112689_mk(s); s.tmp_0.arg0 = globals.RUN_KEY___112670; s.tmp_0.arg1 = s.rn___112824; s.callLocIdx = 11; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; r0 = pxsim.control.deviceSerialNumber(); s.tmp_1 = r0; r0 = (s.tmp_1 & 2147483647); s.tmp_0 = r0; r0 = pxsim_pxtcore.seedAddRandom(s.tmp_0); r0 = pxsim_pxtcore.seedAddRandom(s.rn___112824); s.tmp_0 = settings_setScope__P112682_mk(s); r0 = pxsim_pxtcore.programName(); s.tmp_0.arg0 = r0; s.callLocIdx = 12; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } settings_initScopes__P112683.info = {"start":1104,"length":230,"line":41,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"initScopes","argumentNames":[]} function settings_initScopes__P112683_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_initScopes__P112683, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, rn___112824: undefined, } } function settings_setScope__P112682(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: s.currScope___112854 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: r0 = pxsim_String_.length(s.arg0); s.tmp_2 = r0; r0 = (s.tmp_2 > 100); case 2: // jmp value (already in r0) s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } r0 = pxsim_pxtrt.panic(922); case 3: case 4: s.tmp_0 = settings_readString__P112692_mk(s); s.tmp_0.arg0 = globals.SCOPE_KEY___112671; s.callLocIdx = 8; s.pc = 7; return s.tmp_0; case 7: r0 = s.retval; s.currScope___112854 = (r0); r0 = (s.currScope___112854 != s.arg0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 5; continue; } r0 = pxsim.settings._userClean(); s.tmp_0 = settings_writeString__P112687_mk(s); s.tmp_0.arg0 = globals.SCOPE_KEY___112671; s.tmp_0.arg1 = s.arg0; s.callLocIdx = 9; s.pc = 8; return s.tmp_0; case 8: r0 = s.retval; case 5: case 6: r0 = undefined; return leave(s, r0) default: oops() } } } settings_setScope__P112682.info = {"start":826,"length":272,"line":31,"column":4,"endLine":39,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"setScope","argumentNames":["scope"]} function settings_setScope__P112682_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_setScope__P112682, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, currScope___112854: undefined, arg0: undefined, } } function settings_writeString__P112687(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } s.tmp_0 = settings_writeBuffer__P112686_mk(s); s.tmp_0.arg0 = s.arg0; r0 = pxsim.control.createBufferFromUTF8(s.arg1); s.tmp_0.arg1 = r0; s.callLocIdx = 14; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } settings_writeString__P112687.info = {"start":1895,"length":125,"line":75,"column":4,"endLine":77,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeString","argumentNames":["key","value"]} function settings_writeString__P112687_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_writeString__P112687, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, arg1: undefined, } } function settings_writeBuffer__P112686(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = pxsim.settings._set(s.arg0, s.arg1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } r0 = pxsim.settings._userClean(); r0 = pxsim_pxtrt.panic(920); case 1: case 2: r0 = undefined; return leave(s, r0) default: oops() } } } settings_writeBuffer__P112686.info = {"start":1538,"length":290,"line":63,"column":4,"endLine":70,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeBuffer","argumentNames":["key","value"]} function settings_writeBuffer__P112686_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_writeBuffer__P112686, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, arg1: undefined, } } function settings_readString__P112692(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: s.buf___112885 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = pxsim.settings._get(s.arg0); s.buf___112885 = (r0); r0 = pxsim_numops_toBoolDecr(s.buf___112885); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } r0 = undefined; { step = 3; continue; } { step = 2; continue; } case 1: r0 = pxsim.BufferMethods.toString(s.buf___112885); { step = 3; continue; } case 2: r0 = undefined; case 3: return leave(s, r0) default: oops() } } } settings_readString__P112692.info = {"start":2827,"length":177,"line":110,"column":4,"endLine":116,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readString","argumentNames":["key"]} function settings_readString__P112692_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_readString__P112692, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, buf___112885: undefined, arg0: undefined, } } function settings_readBuffer__P112691(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = pxsim.settings._get(s.arg0); return leave(s, r0) default: oops() } } } settings_readBuffer__P112691.info = {"start":2694,"length":72,"line":103,"column":4,"endLine":105,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readBuffer","argumentNames":["key"]} function settings_readBuffer__P112691_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_readBuffer__P112691, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } function settings_writeNumber__P112689(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = pxsim_Array__mk(); s.tmp_0 = r0; r0 = pxsim_Array__push(s.tmp_0, s.arg1); s.tmp_1 = settings_writeBuffer__P112686_mk(s); s.tmp_1.arg0 = s.arg0; s.tmp_2 = msgpack_packNumberArray__P112374_mk(s); s.tmp_2.arg0 = s.tmp_0; s.callLocIdx = 15; s.pc = 2; return s.tmp_2; case 2: r0 = s.retval; s.tmp_1.arg1 = r0; s.callLocIdx = 16; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } settings_writeNumber__P112689.info = {"start":2265,"length":122,"line":89,"column":4,"endLine":91,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeNumber","argumentNames":["key","value"]} function settings_writeNumber__P112689_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_writeNumber__P112689, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, arg0: undefined, arg1: undefined, } } function msgpack_packNumberArray__P112374(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: s.off___112908 = undefined; s.n___112910 = undefined; s.unnamed312___U2 = undefined; s.unnamed313___U3 = undefined; s.buf___112920 = undefined; s.n___112926 = undefined; s.unnamed314___U6 = undefined; s.unnamed315___U7 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } s.off___112908 = (0); s.n___112910 = (undefined); s.unnamed312___U2 = (s.arg0); s.unnamed313___U3 = (0); case 1: s.tmp_0 = r0 = s.unnamed313___U3; r0 = pxsim_Array__length(s.unnamed312___U2); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 2; continue; } r0 = pxsim_Array__getAt(s.unnamed312___U2, s.unnamed313___U3); s.n___112910 = (r0); s.tmp_2 = r0 = s.off___112908; s.tmp_4 = msgpack_packNumberCore__P112372_mk(s); s.tmp_4.arg0 = null; s.tmp_4.arg1 = s.off___112908; s.tmp_4.arg2 = s.n___112910; s.callLocIdx = 5; s.pc = 5; return s.tmp_4; case 5: r0 = s.retval; s.tmp_3 = r0; r0 = (s.tmp_2 + s.tmp_3); s.off___112908 = (r0); r0 = (s.unnamed313___U3 + 1); s.unnamed313___U3 = (r0); { step = 1; continue; } case 2: s.unnamed312___U2 = (undefined); r0 = pxsim.control.createBuffer(s.off___112908); s.buf___112920 = (r0); s.off___112908 = (0); s.n___112926 = (undefined); s.unnamed314___U6 = (s.arg0); s.unnamed315___U7 = (0); case 3: s.tmp_0 = r0 = s.unnamed315___U7; r0 = pxsim_Array__length(s.unnamed314___U6); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 4; continue; } r0 = pxsim_Array__getAt(s.unnamed314___U6, s.unnamed315___U7); s.n___112926 = (r0); s.tmp_2 = r0 = s.off___112908; s.tmp_4 = msgpack_packNumberCore__P112372_mk(s); s.tmp_4.arg0 = s.buf___112920; s.tmp_4.arg1 = s.off___112908; s.tmp_4.arg2 = s.n___112926; s.callLocIdx = 6; s.pc = 6; return s.tmp_4; case 6: r0 = s.retval; s.tmp_3 = r0; r0 = (s.tmp_2 + s.tmp_3); s.off___112908 = (r0); r0 = (s.unnamed315___U7 + 1); s.unnamed315___U7 = (r0); { step = 3; continue; } case 4: s.unnamed314___U6 = (undefined); r0 = s.buf___112920; return leave(s, r0) default: oops() } } } msgpack_packNumberArray__P112374.info = {"start":3427,"length":330,"line":117,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"packNumberArray","argumentNames":["nums"]} function msgpack_packNumberArray__P112374_mk(s) { checkStack(s.depth); return { parent: s, fn: msgpack_packNumberArray__P112374, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, off___112908: undefined, n___112910: undefined, unnamed312___U2: undefined, unnamed313___U3: undefined, buf___112920: undefined, n___112926: undefined, unnamed314___U6: undefined, unnamed315___U7: undefined, arg0: undefined, } } function msgpack_packNumberCore__P112372(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: s.tag___112940 = undefined; s.fmt___112983 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } s.tag___112940 = (203); s.tmp_1 = r0 = s.arg2; r0 = (s.arg2 << 0); s.tmp_2 = r0; r0 = (s.tmp_1 == s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: s.tmp_3 = r0 = s.arg2; r0 = (s.arg2 >>> 0); s.tmp_4 = r0; r0 = (s.tmp_3 == s.tmp_4); case 2: // jmp value (already in r0) s.tmp_5 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_5); if (!r0) { step = 19; continue; } r0 = (-31 <= s.arg2); s.tmp_6 = r0; r0 = pxsim_numops_toBool(s.tmp_6); if (r0) { step = 3; continue; } r0 = s.tmp_6; { step = 4; continue; } case 3: r0 = (s.arg2 <= 127); case 4: // jmp value (already in r0) s.tmp_7 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_7); if (!r0) { step = 7; continue; } r0 = pxsim_numops_toBoolDecr(s.arg0); if (!r0) { step = 5; continue; } r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.arg2); case 5: case 6: r0 = 1; { step = 23; continue; } { step = 18; continue; } case 7: r0 = (0 <= s.arg2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 12; continue; } r0 = (s.arg2 <= 255); s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 8; continue; } s.tag___112940 = (204); { step = 11; continue; } case 8: r0 = (s.arg2 <= 65535); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } s.tag___112940 = (205); { step = 10; continue; } case 9: s.tag___112940 = (206); case 10: case 11: { step = 17; continue; } case 12: r0 = (-127 <= s.arg2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 13; continue; } s.tag___112940 = (208); { step = 16; continue; } case 13: r0 = (-32767 <= s.arg2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 14; continue; } s.tag___112940 = (209); { step = 15; continue; } case 14: s.tag___112940 = (210); case 15: case 16: case 17: case 18: case 19: case 20: s.tmp_0 = msgpack_tagFormat__P112371_mk(s); s.tmp_0.arg0 = s.tag___112940; s.callLocIdx = 1; s.pc = 24; return s.tmp_0; case 24: r0 = s.retval; s.fmt___112983 = (r0); r0 = pxsim_numops_toBoolDecr(s.arg0); if (!r0) { step = 21; continue; } r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.tag___112940); s.tmp_0 = r0 = s.arg0; s.tmp_1 = r0 = s.fmt___112983; r0 = (s.arg1 + 1); s.tmp_2 = r0; r0 = pxsim.BufferMethods.setNumber(s.tmp_0, s.tmp_1, s.tmp_2, s.arg2); case 21: case 22: s.tmp_1 = pins_sizeOf__P112364_mk(s); s.tmp_1.arg0 = s.fmt___112983; s.callLocIdx = 2; s.pc = 25; return s.tmp_1; case 25: r0 = s.retval; s.tmp_0 = r0; r0 = (s.tmp_0 + 1); case 23: return leave(s, r0) default: oops() } } } msgpack_packNumberCore__P112372.info = {"start":1632,"length":951,"line":56,"column":4,"endLine":86,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"packNumberCore","argumentNames":["buf","offset","num"]} function msgpack_packNumberCore__P112372_mk(s) { checkStack(s.depth); return { parent: s, fn: msgpack_packNumberCore__P112372, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, tag___112940: undefined, fmt___112983: undefined, arg0: undefined, arg1: undefined, arg2: undefined, } } function pins_sizeOf__P112364(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } s.tmp_0 = Buffer_sizeOfNumberFormat__P112400_mk(s); s.tmp_0.arg0 = s.arg0; s.callLocIdx = 0; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; return leave(s, r0) default: oops() } } } pins_sizeOf__P112364.info = {"start":42,"length":101,"line":2,"column":4,"endLine":4,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOf","argumentNames":["format"]} function pins_sizeOf__P112364_mk(s) { checkStack(s.depth); return { parent: s, fn: pins_sizeOf__P112364, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, } } function Buffer_sizeOfNumberFormat__P112400(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } s.tmp_0 = r0 = s.arg0; r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); if (r0) { step = 1; continue; } r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); if (r0) { step = 2; continue; } r0 = pxsim_pxtcore.switch_eq(6, s.tmp_0); if (r0) { step = 3; continue; } r0 = pxsim_pxtcore.switch_eq(7, s.tmp_0); if (r0) { step = 4; continue; } r0 = pxsim_pxtcore.switch_eq(3, s.tmp_0); if (r0) { step = 5; continue; } r0 = pxsim_pxtcore.switch_eq(4, s.tmp_0); if (r0) { step = 6; continue; } r0 = pxsim_pxtcore.switch_eq(8, s.tmp_0); if (r0) { step = 7; continue; } r0 = pxsim_pxtcore.switch_eq(9, s.tmp_0); if (r0) { step = 8; continue; } r0 = pxsim_pxtcore.switch_eq(5, s.tmp_0); if (r0) { step = 9; continue; } r0 = pxsim_pxtcore.switch_eq(10, s.tmp_0); if (r0) { step = 10; continue; } r0 = pxsim_pxtcore.switch_eq(12, s.tmp_0); if (r0) { step = 11; continue; } r0 = pxsim_pxtcore.switch_eq(11, s.tmp_0); if (r0) { step = 12; continue; } r0 = pxsim_pxtcore.switch_eq(15, s.tmp_0); if (r0) { step = 13; continue; } r0 = pxsim_pxtcore.switch_eq(13, s.tmp_0); if (r0) { step = 14; continue; } r0 = pxsim_pxtcore.switch_eq(16, s.tmp_0); if (r0) { step = 15; continue; } r0 = pxsim_pxtcore.switch_eq(14, s.tmp_0); if (r0) { step = 16; continue; } r0 = s.tmp_0; { step = 17; continue; } case 1: case 2: case 3: case 4: r0 = 1; { step = 18; continue; } case 5: case 6: case 7: case 8: r0 = 2; { step = 18; continue; } case 9: case 10: case 11: case 12: case 13: case 14: r0 = 4; { step = 18; continue; } case 15: case 16: r0 = 8; { step = 18; continue; } case 17: r0 = 0; case 18: return leave(s, r0) default: oops() } } } Buffer_sizeOfNumberFormat__P112400.info = {"start":14912,"length":856,"line":508,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOfNumberFormat","argumentNames":["format"]} function Buffer_sizeOfNumberFormat__P112400_mk(s) { checkStack(s.depth); return { parent: s, fn: Buffer_sizeOfNumberFormat__P112400, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, } } function msgpack_tagFormat__P112371(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } s.tmp_0 = r0 = s.arg0; r0 = pxsim_pxtcore.switch_eq(203, s.tmp_0); if (r0) { step = 1; continue; } r0 = pxsim_pxtcore.switch_eq(204, s.tmp_0); if (r0) { step = 2; continue; } r0 = pxsim_pxtcore.switch_eq(205, s.tmp_0); if (r0) { step = 3; continue; } r0 = pxsim_pxtcore.switch_eq(206, s.tmp_0); if (r0) { step = 4; continue; } r0 = pxsim_pxtcore.switch_eq(208, s.tmp_0); if (r0) { step = 5; continue; } r0 = pxsim_pxtcore.switch_eq(209, s.tmp_0); if (r0) { step = 6; continue; } r0 = pxsim_pxtcore.switch_eq(210, s.tmp_0); if (r0) { step = 7; continue; } r0 = s.tmp_0; { step = 8; continue; } case 1: r0 = 16; { step = 9; continue; } case 2: r0 = 7; { step = 9; continue; } case 3: r0 = 9; { step = 9; continue; } case 4: r0 = 12; { step = 9; continue; } case 5: r0 = 6; { step = 9; continue; } case 6: r0 = 8; { step = 9; continue; } case 7: r0 = 10; { step = 9; continue; } case 8: r0 = null; { step = 9; continue; } r0 = undefined; case 9: return leave(s, r0) default: oops() } } } msgpack_tagFormat__P112371.info = {"start":1145,"length":481,"line":42,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"tagFormat","argumentNames":["tag"]} function msgpack_tagFormat__P112371_mk(s) { checkStack(s.depth); return { parent: s, fn: msgpack_tagFormat__P112371, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, } } function settings_runNumber__P112681(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: s.tmp_1 = settings_readNumber__P112694_mk(s); s.tmp_1.arg0 = globals.RUN_KEY___112670; s.callLocIdx = 7; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: r0 = 0; case 2: // jmp value (already in r0) s.tmp_2 = r0; r0 = s.tmp_2; return leave(s, r0) default: oops() } } } settings_runNumber__P112681.info = {"start":745,"length":75,"line":27,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"runNumber","argumentNames":[]} function settings_runNumber__P112681_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_runNumber__P112681, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, } } function settings_readNumber__P112694(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: s.buf___113059 = undefined; s.nums___113066 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = pxsim.settings._get(s.arg0); s.buf___113059 = (r0); r0 = pxsim_numops_toBoolDecr(s.buf___113059); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } r0 = undefined; { step = 7; continue; } { step = 6; continue; } case 1: s.tmp_2 = msgpack_unpackNumberArray__P112373_mk(s); s.tmp_2.arg0 = s.buf___113059; s.tmp_2.arg1 = 0; s.callLocIdx = 19; s.pc = 8; return s.tmp_2; case 8: r0 = s.retval; s.nums___113066 = (r0); s.tmp_0 = r0 = s.nums___113066; r0 = pxsim_numops_toBool(s.tmp_0); if (r0) { step = 2; continue; } r0 = s.tmp_0; { step = 3; continue; } case 2: r0 = pxsim_Array__length(s.nums___113066); s.tmp_1 = r0; r0 = (s.tmp_1 >= 1); case 3: // jmp value (already in r0) s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 4; continue; } r0 = pxsim_Array__getAt(s.nums___113066, 0); { step = 7; continue; } case 4: case 5: r0 = undefined; { step = 7; continue; } case 6: r0 = undefined; case 7: return leave(s, r0) default: oops() } } } settings_readNumber__P112694.info = {"start":3283,"length":313,"line":131,"column":4,"endLine":141,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readNumber","argumentNames":["key"]} function settings_readNumber__P112694_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_readNumber__P112694, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, buf___113059: undefined, nums___113066: undefined, arg0: undefined, } } function msgpack_unpackNumberArray__P112373(s) { let r0 = s.r0, step = s.pc; s.pc = -1; while (true) { if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; switch (step) { case 0: s.res___113080 = undefined; s.fmt___113088 = undefined; s.v___113097 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = pxsim_Array__mk(); s.res___113080 = (r0); case 1: s.tmp_1 = r0 = s.arg1; r0 = pxsim.BufferMethods.length(s.arg0); s.tmp_2 = r0; r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 10; continue; } s.tmp_3 = r0 = s.arg1; r0 = (s.tmp_3 + 1); s.arg1 = (r0); s.tmp_4 = msgpack_tagFormat__P112371_mk(s); r0 = pxsim.BufferMethods.getByte(s.arg0, s.tmp_3); s.tmp_4.arg0 = r0; s.callLocIdx = 3; s.pc = 12; return s.tmp_4; case 12: r0 = s.retval; s.fmt___113088 = (r0); r0 = (s.fmt___113088 === null); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 6; continue; } s.tmp_1 = r0 = s.arg0; r0 = (s.arg1 - 1); s.tmp_2 = r0; r0 = pxsim.BufferMethods.getNumber(s.tmp_1, 6, s.tmp_2); s.v___113097 = (r0); r0 = (-31 <= s.v___113097); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); if (r0) { step = 2; continue; } r0 = s.tmp_0; { step = 3; continue; } case 2: r0 = (s.v___113097 <= 127); case 3: // jmp value (already in r0) s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 4; continue; } r0 = pxsim_Array__push(s.res___113080, s.v___113097); { step = 5; continue; } case 4: r0 = null; { step = 11; continue; } case 5: { step = 7; continue; } case 6: s.tmp_0 = r0 = s.res___113080; r0 = pxsim.BufferMethods.getNumber(s.arg0, s.fmt___113088, s.arg1); s.tmp_1 = r0; r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); s.tmp_0 = r0 = s.arg1; s.tmp_2 = pins_sizeOf__P112364_mk(s); s.tmp_2.arg0 = s.fmt___113088; s.callLocIdx = 4; s.pc = 13; return s.tmp_2; case 13: r0 = s.retval; s.tmp_1 = r0; r0 = (s.tmp_0 + s.tmp_1); s.arg1 = (r0); case 7: case 8: r0 = pxsim.BufferMethods.getByte(s.arg0, s.arg1); s.tmp_1 = r0; r0 = (s.tmp_1 === 193); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } r0 = (s.arg1 + 1); s.arg1 = (r0); { step = 8; continue; } case 9: { step = 1; continue; } case 10: r0 = s.res___113080; case 11: return leave(s, r0) default: oops() } } } msgpack_unpackNumberArray__P112373.info = {"start":2650,"length":669,"line":91,"column":4,"endLine":111,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"unpackNumberArray","argumentNames":["buf","offset"]} function msgpack_unpackNumberArray__P112373_mk(s) { checkStack(s.depth); return { parent: s, fn: msgpack_unpackNumberArray__P112373, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, res___113080: undefined, fmt___113088: undefined, v___113097: undefined, arg0: undefined, arg1: undefined, } } const breakpoints = setupDebugger(1, []) return _main___P112230 })