UNPKG

pxt-common-packages

Version:
1,175 lines (1,027 loc) 32.9 kB
// total=32842 new=93.48% cached=0.00% other=6.52% (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("mqtt"); 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___P134207(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___134451 = (undefined); globals._pollEventQueue___134464 = (undefined); globals.RUN_KEY___134647 = ("#run"); globals.SCOPE_KEY___134648 = ("#scope"); s.tmp_0 = settings_initScopes__P134660_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___P134207.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"mqtt.ts","functionName":"<main>","argumentNames":[]} _main___P134207.continuations = [ ] function _main___P134207_mk(s) { checkStack(s.depth); return { parent: s, fn: _main___P134207, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } function settings_initScopes__P134660(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___134845 = undefined; s.tmp_1 = settings_runNumber__P134658_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___134845 = (r0); s.tmp_0 = settings_writeNumber__P134666_mk(s); s.tmp_0.arg0 = globals.RUN_KEY___134647; s.tmp_0.arg1 = s.rn___134845; 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___134845); s.tmp_0 = settings_setScope__P134659_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__P134660.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__P134660_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_initScopes__P134660, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, rn___134845: undefined, } } function settings_setScope__P134659(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___134875 = 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__P134669_mk(s); s.tmp_0.arg0 = globals.SCOPE_KEY___134648; s.callLocIdx = 8; s.pc = 7; return s.tmp_0; case 7: r0 = s.retval; s.currScope___134875 = (r0); r0 = (s.currScope___134875 != 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__P134664_mk(s); s.tmp_0.arg0 = globals.SCOPE_KEY___134648; 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__P134659.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__P134659_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_setScope__P134659, 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___134875: undefined, arg0: undefined, } } function settings_writeString__P134664(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__P134663_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__P134664.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__P134664_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_writeString__P134664, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, arg1: undefined, } } function settings_writeBuffer__P134663(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__P134663.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__P134663_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_writeBuffer__P134663, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, arg1: undefined, } } function settings_readString__P134669(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___134906 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = pxsim.settings._get(s.arg0); s.buf___134906 = (r0); r0 = pxsim_numops_toBoolDecr(s.buf___134906); 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___134906); { step = 3; continue; } case 2: r0 = undefined; case 3: return leave(s, r0) default: oops() } } } settings_readString__P134669.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__P134669_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_readString__P134669, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, buf___134906: undefined, arg0: undefined, } } function settings_readBuffer__P134668(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__P134668.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__P134668_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_readBuffer__P134668, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } function settings_writeNumber__P134666(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__P134663_mk(s); s.tmp_1.arg0 = s.arg0; s.tmp_2 = msgpack_packNumberArray__P134351_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__P134666.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__P134666_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_writeNumber__P134666, 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__P134351(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___134929 = undefined; s.n___134931 = undefined; s.unnamed424___U2 = undefined; s.unnamed425___U3 = undefined; s.buf___134941 = undefined; s.n___134947 = undefined; s.unnamed426___U6 = undefined; s.unnamed427___U7 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } s.off___134929 = (0); s.n___134931 = (undefined); s.unnamed424___U2 = (s.arg0); s.unnamed425___U3 = (0); case 1: s.tmp_0 = r0 = s.unnamed425___U3; r0 = pxsim_Array__length(s.unnamed424___U2); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 2; continue; } r0 = pxsim_Array__getAt(s.unnamed424___U2, s.unnamed425___U3); s.n___134931 = (r0); s.tmp_2 = r0 = s.off___134929; s.tmp_4 = msgpack_packNumberCore__P134349_mk(s); s.tmp_4.arg0 = null; s.tmp_4.arg1 = s.off___134929; s.tmp_4.arg2 = s.n___134931; 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___134929 = (r0); r0 = (s.unnamed425___U3 + 1); s.unnamed425___U3 = (r0); { step = 1; continue; } case 2: s.unnamed424___U2 = (undefined); r0 = pxsim.control.createBuffer(s.off___134929); s.buf___134941 = (r0); s.off___134929 = (0); s.n___134947 = (undefined); s.unnamed426___U6 = (s.arg0); s.unnamed427___U7 = (0); case 3: s.tmp_0 = r0 = s.unnamed427___U7; r0 = pxsim_Array__length(s.unnamed426___U6); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 4; continue; } r0 = pxsim_Array__getAt(s.unnamed426___U6, s.unnamed427___U7); s.n___134947 = (r0); s.tmp_2 = r0 = s.off___134929; s.tmp_4 = msgpack_packNumberCore__P134349_mk(s); s.tmp_4.arg0 = s.buf___134941; s.tmp_4.arg1 = s.off___134929; s.tmp_4.arg2 = s.n___134947; 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___134929 = (r0); r0 = (s.unnamed427___U7 + 1); s.unnamed427___U7 = (r0); { step = 3; continue; } case 4: s.unnamed426___U6 = (undefined); r0 = s.buf___134941; return leave(s, r0) default: oops() } } } msgpack_packNumberArray__P134351.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__P134351_mk(s) { checkStack(s.depth); return { parent: s, fn: msgpack_packNumberArray__P134351, 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___134929: undefined, n___134931: undefined, unnamed424___U2: undefined, unnamed425___U3: undefined, buf___134941: undefined, n___134947: undefined, unnamed426___U6: undefined, unnamed427___U7: undefined, arg0: undefined, } } function msgpack_packNumberCore__P134349(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___134961 = undefined; s.fmt___135004 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } s.tag___134961 = (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___134961 = (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___134961 = (205); { step = 10; continue; } case 9: s.tag___134961 = (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___134961 = (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___134961 = (209); { step = 15; continue; } case 14: s.tag___134961 = (210); case 15: case 16: case 17: case 18: case 19: case 20: s.tmp_0 = msgpack_tagFormat__P134348_mk(s); s.tmp_0.arg0 = s.tag___134961; s.callLocIdx = 1; s.pc = 24; return s.tmp_0; case 24: r0 = s.retval; s.fmt___135004 = (r0); r0 = pxsim_numops_toBoolDecr(s.arg0); if (!r0) { step = 21; continue; } r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.tag___134961); s.tmp_0 = r0 = s.arg0; s.tmp_1 = r0 = s.fmt___135004; 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__P134341_mk(s); s.tmp_1.arg0 = s.fmt___135004; 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__P134349.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__P134349_mk(s) { checkStack(s.depth); return { parent: s, fn: msgpack_packNumberCore__P134349, 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___134961: undefined, fmt___135004: undefined, arg0: undefined, arg1: undefined, arg2: undefined, } } function pins_sizeOf__P134341(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__P134377_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__P134341.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__P134341_mk(s) { checkStack(s.depth); return { parent: s, fn: pins_sizeOf__P134341, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, } } function Buffer_sizeOfNumberFormat__P134377(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__P134377.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__P134377_mk(s) { checkStack(s.depth); return { parent: s, fn: Buffer_sizeOfNumberFormat__P134377, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, } } function msgpack_tagFormat__P134348(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__P134348.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__P134348_mk(s) { checkStack(s.depth); return { parent: s, fn: msgpack_tagFormat__P134348, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, } } function settings_runNumber__P134658(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__P134671_mk(s); s.tmp_1.arg0 = globals.RUN_KEY___134647; 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__P134658.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__P134658_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_runNumber__P134658, 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__P134671(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___135080 = undefined; s.nums___135087 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = pxsim.settings._get(s.arg0); s.buf___135080 = (r0); r0 = pxsim_numops_toBoolDecr(s.buf___135080); 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__P134350_mk(s); s.tmp_2.arg0 = s.buf___135080; s.tmp_2.arg1 = 0; s.callLocIdx = 19; s.pc = 8; return s.tmp_2; case 8: r0 = s.retval; s.nums___135087 = (r0); s.tmp_0 = r0 = s.nums___135087; 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___135087); 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___135087, 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__P134671.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__P134671_mk(s) { checkStack(s.depth); return { parent: s, fn: settings_readNumber__P134671, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, buf___135080: undefined, nums___135087: undefined, arg0: undefined, } } function msgpack_unpackNumberArray__P134350(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___135101 = undefined; s.fmt___135109 = undefined; s.v___135118 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = pxsim_Array__mk(); s.res___135101 = (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__P134348_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___135109 = (r0); r0 = (s.fmt___135109 === 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___135118 = (r0); r0 = (-31 <= s.v___135118); 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___135118 <= 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___135101, s.v___135118); { step = 5; continue; } case 4: r0 = null; { step = 11; continue; } case 5: { step = 7; continue; } case 6: s.tmp_0 = r0 = s.res___135101; r0 = pxsim.BufferMethods.getNumber(s.arg0, s.fmt___135109, 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__P134341_mk(s); s.tmp_2.arg0 = s.fmt___135109; 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___135101; case 11: return leave(s, r0) default: oops() } } } msgpack_unpackNumberArray__P134350.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__P134350_mk(s) { checkStack(s.depth); return { parent: s, fn: msgpack_unpackNumberArray__P134350, 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___135101: undefined, fmt___135109: undefined, v___135118: undefined, arg0: undefined, arg1: undefined, } } const breakpoints = setupDebugger(1, []) return _main___P134207 })