UNPKG

jsx

Version:

a faster, safer, easier JavaScript

1,836 lines (1,571 loc) 784 kB
#!/usr/bin/env node // generatedy by JSX compiler 0.9.28 (2013-05-05 17:21:27 +0900; 27a1644e9b3800f8387a38410af80d18da43ba0d) var JSX = {}; (function (JSX) { /** * extends the class */ function $__jsx_extend(derivations, base) { var ctor = function () {}; ctor.prototype = base.prototype; var proto = new ctor(); for (var i in derivations) { derivations[i].prototype = proto; } } /** * copies the implementations from source interface to target */ function $__jsx_merge_interface(target, source) { for (var k in source.prototype) if (source.prototype.hasOwnProperty(k)) target.prototype[k] = source.prototype[k]; } /** * defers the initialization of the property */ function $__jsx_lazy_init(obj, prop, func) { function reset(obj, prop, value) { delete obj[prop]; obj[prop] = value; return value; } Object.defineProperty(obj, prop, { get: function () { return reset(obj, prop, func()); }, set: function (v) { reset(obj, prop, v); }, enumerable: true, configurable: true }); } /** * sideeffect().a /= b */ function $__jsx_div_assign(obj, prop, divisor) { return obj[prop] = (obj[prop] / divisor) | 0; } /* * global functions, renamed to avoid conflict with local variable names */ var $__jsx_parseInt = parseInt; var $__jsx_parseFloat = parseFloat; var $__jsx_isNaN = isNaN; var $__jsx_isFinite = isFinite; var $__jsx_encodeURIComponent = encodeURIComponent; var $__jsx_decodeURIComponent = decodeURIComponent; var $__jsx_encodeURI = encodeURI; var $__jsx_decodeURI = decodeURI; var $__jsx_ObjectToString = Object.prototype.toString; var $__jsx_ObjectHasOwnProperty = Object.prototype.hasOwnProperty; /* * profiler object, initialized afterwards */ function $__jsx_profiler() { } /* * public interface to JSX code */ JSX.require = function (path) { var m = $__jsx_classMap[path]; return m !== undefined ? m : null; }; JSX.profilerIsRunning = function () { return $__jsx_profiler.getResults != null; }; JSX.getProfileResults = function () { return ($__jsx_profiler.getResults || function () { return {}; })(); }; JSX.postProfileResults = function (url, cb) { if ($__jsx_profiler.postResults == null) throw new Error("profiler has not been turned on"); return $__jsx_profiler.postResults(url, cb); }; JSX.resetProfileResults = function () { if ($__jsx_profiler.resetResults == null) throw new Error("profiler has not been turned on"); return $__jsx_profiler.resetResults(); }; JSX.DEBUG = true; function g_StopIteration() { Error.call(this); }; $__jsx_extend([g_StopIteration], Error); function CompilationServer(parentPlatform) { this._requestSequence = 0; this._pidFile = ""; this._portFile = ""; this._httpd = null; this._timer = null; this._platform = parentPlatform; this._home = process.env.JSX_HOME || (process.env.HOME || process.env.USERPROFILE) + "/.jsx"; if (! parentPlatform.fileExists$S(this._home)) { parentPlatform.mkpath$S(this._home); } this._pidFile = this._home + "/pid"; this._portFile = this._home + "/port"; }; $__jsx_extend([CompilationServer], Object); function CompilationServer$start$LPlatform$I(platform, port) { var server; server = new CompilationServer(platform); server._httpd = node.http.createServer((function (request, response) { server.handleRequest$LServerRequest$LServerResponse$(request, response); })); server._httpd.listen(port); platform.save$USS(server._pidFile, process.pid + ""); platform.save$USS(server._portFile, port + ""); console.info("%s [%s] listen http://localhost:%s/", new Date().toISOString(), process.pid, port); server._timer = Timer$setTimeout$F$V$N((function () { server.shutdown$S("timeout"); }), CompilationServer.LIFE); process.on("SIGTERM", (function () { server.shutdown$S("SIGTERM"); })); process.on("SIGINT", (function () { server.shutdown$S("SIGINT"); })); if (CompilationServer.AUTO_SHUTDOWN) { node.fs.watch(node.__filename, ({ persistent: false }), (function (event, filename) { server.shutdown$S(event); })); } return 0; }; CompilationServer.start$LPlatform$I = CompilationServer$start$LPlatform$I; CompilationServer.prototype.shutdown$S = function (reason) { try { node.fs.unlinkSync(this._portFile); } catch ($__jsx_catch_0) { if ($__jsx_catch_0 instanceof Error) { } else { throw $__jsx_catch_0; } } try { node.fs.unlinkSync(this._pidFile); } catch ($__jsx_catch_0) { if ($__jsx_catch_0 instanceof Error) { } else { throw $__jsx_catch_0; } } Timer$clearTimeout$LTimerHandle$(this._timer); this._httpd.close(); console.info("%s [%s] shutdown by %s, handled %s requests", new Date().toISOString(), process.pid, reason, this._requestSequence); }; CompilationServer.prototype.handleRequest$LServerRequest$LServerResponse$ = function (request, response) { var $this = this; var startTime; var id; var c; var matched; var query; var inputData; startTime = new Date(); id = ++ this._requestSequence; Timer$clearTimeout$LTimerHandle$(this._timer); this._timer = Timer$setTimeout$F$V$N((function () { $this.shutdown$S("timeout"); }), CompilationServer.LIFE); if (request.method === "GET") { console.info("%s #%s start %s", startTime.toISOString(), id, request.url); this.handleGET$NLDate$LServerRequest$LServerResponse$(id, startTime, request, response); return; } c = new CompilationServerPlatform(this._platform.getRoot$(), id, request, response); matched = request.url.match(/\?(.*)/); if (! (matched && matched[1])) { c.error$S("invalid request to compilation server"); this.finishRequest$NLDate$LServerResponse$NX(id, startTime, response, 400, c.getContents$()); return; } query = $__jsx_decodeURIComponent(matched[1]); console.info("%s #%s start %s", startTime.toISOString(), id, query.replace(/\n/g, "\\n")); inputData = ""; request.on("data", (function (chunk) { inputData += chunk + ""; })); request.on("end", (function () { var args; if (inputData) { c.setFileContent$SS("-", inputData); } try { args = JSON.parse(query); c.setStatusCode$N(JSXCommand$main$LPlatform$AS(c, args)); } catch ($__jsx_catch_0) { if ($__jsx_catch_0 instanceof Error) { console.error("%s #%s %s", startTime.toISOString(), id, $__jsx_catch_0.stack); c.error$S($__jsx_catch_0.stack); } else { throw $__jsx_catch_0; } } $this.finishRequest$NLDate$LServerResponse$NX(id, startTime, response, 200, c.getContents$()); })); request.on("close", (function () { c.error$S("the connecion is unexpectedly closed.\n"); $this.finishRequest$NLDate$LServerResponse$NX(id, startTime, response, 500, c.getContents$()); })); }; CompilationServer.prototype.handleGET$NLDate$LServerRequest$LServerResponse$ = function (id, startTime, request, response) { this.finishRequest$NLDate$LServerResponse$NX(id, startTime, response, 200, ({ version_string: Meta.VERSION_STRING, version_number: Meta.VERSION_NUMBER, last_commit_hash: Meta.LAST_COMMIT_HASH, last_commit_date: Meta.LAST_COMMIT_DATE, status: true })); }; CompilationServer.prototype.finishRequest$NLDate$LServerResponse$NX = function (id, startTime, response, statusCode, data) { var content; var headers; var now; var elapsed; content = JSON.stringify(data); headers = ({ "Content-Type": "application/json", "Content-Length": Buffer.byteLength(content, "utf-8") + "", "Cache-Control": "no-cache" }); response.writeHead(statusCode, headers); response.end(content, "utf-8"); now = new Date(); elapsed = now.getTime() - startTime.getTime(); console.info("%s #%s finish, elapsed %s [ms]", now.toISOString(), id, elapsed); }; function _Main() { }; $__jsx_extend([_Main], Object); function _Main$main$AS(args) { var exitCode; var stdoutIsFlushed; var stderrIsFlushed; var exitIfFlushed; exitCode = JSXCommand$main$LPlatform$AS(new NodePlatform(), NodePlatform$getEnvOpts$().concat(args)); if (exitCode === 0) { return; } stdoutIsFlushed = process.stdout.write(""); stderrIsFlushed = process.stderr.write(""); exitIfFlushed = (function (data) { if (stdoutIsFlushed && stderrIsFlushed) { process.exit(exitCode); } }); if (! stdoutIsFlushed) { process.stdout.on('drain', exitIfFlushed); } if (! stderrIsFlushed) { process.stderr.on('drain', exitIfFlushed); } exitIfFlushed(null); }; _Main.main = _Main$main$AS; _Main.main$AS = _Main$main$AS; function node() { }; $__jsx_extend([node], Object); function node$require$S(source) { var src; src = 'require(' + JSON.stringify(source) + ')'; return eval(src); }; node.require$S = node$require$S; function Timer() { }; $__jsx_extend([Timer], Object); function Timer$setTimeout$F$V$N(callback, intervalMS) { return js.global.setTimeout(callback, intervalMS); }; Timer.setTimeout$F$V$N = Timer$setTimeout$F$V$N; function Timer$clearTimeout$LTimerHandle$(timer) { js.global.clearTimeout(timer); }; Timer.clearTimeout$LTimerHandle$ = Timer$clearTimeout$LTimerHandle$; function Timer$setInterval$F$V$N(callback, intervalMS) { return js.global.setInterval(callback, intervalMS); }; Timer.setInterval$F$V$N = Timer$setInterval$F$V$N; function Timer$clearInterval$LTimerHandle$(timer) { js.global.clearInterval(timer); }; Timer.clearInterval$LTimerHandle$ = Timer$clearInterval$LTimerHandle$; function Timer$requestAnimationFrame$F$NV$(callback) { return Timer._requestAnimationFrame(callback); }; Timer.requestAnimationFrame$F$NV$ = Timer$requestAnimationFrame$F$NV$; function Timer$cancelAnimationFrame$LTimerHandle$(timer) { Timer._cancelAnimationFrame(timer); }; Timer.cancelAnimationFrame$LTimerHandle$ = Timer$cancelAnimationFrame$LTimerHandle$; function Timer$useNativeRAF$B(enable) { Timer._requestAnimationFrame = Timer$_getRequestAnimationFrameImpl$B(enable); Timer._cancelAnimationFrame = Timer$_getCancelAnimationFrameImpl$B(enable); }; Timer.useNativeRAF$B = Timer$useNativeRAF$B; function Timer$_getRequestAnimationFrameImpl$B(useNativeImpl) { var lastTime; if (useNativeImpl) { if (js.global.requestAnimationFrame) { return (function (callback) { return js.global.requestAnimationFrame(callback); }); } else { if (js.global.webkitRequestAnimationFrame) { return (function (callback) { return js.global.webkitRequestAnimationFrame(callback); }); } else { if (js.global.mozRequestAnimationFrame) { return (function (callback) { return js.global.mozRequestAnimationFrame(callback); }); } else { if (js.global.oRequestAnimationFrame) { return (function (callback) { return js.global.oRequestAnimationFrame(callback); }); } else { if (js.global.msRequestAnimationFrame) { return (function (callback) { return js.global.msRequestAnimationFrame(callback); }); } } } } } } lastTime = 0; return (function (callback) { var now; var timeToCall; now = Date.now(); timeToCall = Math.max(0, 16 - (now - lastTime)); lastTime = now + timeToCall; return Timer$setTimeout$F$V$N((function () { callback(now + timeToCall); }), timeToCall); }); }; Timer._getRequestAnimationFrameImpl$B = Timer$_getRequestAnimationFrameImpl$B; function Timer$_getCancelAnimationFrameImpl$B(useNativeImpl) { if (useNativeImpl) { if (js.global.cancelAnimationFrame) { return (function (timer) { js.global.cancelAnimationFrame(timer); }); } else { if (js.global.webkitCancelAnimationFrame) { return (function (timer) { js.global.webkitCancelAnimationFrame(timer); }); } else { if (js.global.mozCancelAnimationFrame) { return (function (timer) { js.global.mozCancelAnimationFrame(timer); }); } else { if (js.global.oCancelAnimationFrame) { return (function (timer) { js.global.oCancelAnimationFrame(timer); }); } else { if (js.global.msCancelAnimationFrame) { return (function (timer) { js.global.msCancelAnimationFrame(timer); }); } } } } } } return Timer$clearTimeout$LTimerHandle$; }; Timer._getCancelAnimationFrameImpl$B = Timer$_getCancelAnimationFrameImpl$B; function TimerHandle() { }; $__jsx_extend([TimerHandle], Object); function Util() { }; $__jsx_extend([Util], Object); function Util$repeat$SN(c, n) { var s; var i; s = ""; for (i = 0; i < n; ++ i) { s += c; } return s; }; Util.repeat$SN = Util$repeat$SN; function Util$format$SAS(fmt, args) { var i; i = 0; return fmt.replace(/%(\d+|%)/g, (function (m) { var arg; if (m === "%%") { return "%"; } else { arg = args[(m.substring(1) | 0) - 1]; return (arg == null ? "null" : arg); } })); }; Util.format$SAS = Util$format$SAS; function Util$instantiateTemplate$LAnalysisContext$LToken$SALType$(context, token, className, typeArguments) { return context.parser.lookupTemplate$ALCompileError$LTemplateInstantiationRequest$F$LParser$LClassDefinition$LClassDefinition$$(context.errors, new TemplateInstantiationRequest(token, className, typeArguments), context.postInstantiationCallback); }; Util.instantiateTemplate$LAnalysisContext$LToken$SALType$ = Util$instantiateTemplate$LAnalysisContext$LToken$SALType$; function Util$analyzeArgs$LAnalysisContext$ALExpression$LExpression$AALType$(context, args, parentExpr, expectedTypes) { var argTypes; var i; var funcDef; var expectedCallbackType; var j; var arrayExpr; var expectedArrayType; var mapExpr; var expectedMapType; argTypes = [ ]; for (i = 0; i < args.length; ++ i) { if (args[i] instanceof FunctionExpression && ! args[i].argumentTypesAreIdentified$()) { funcDef = args[i].getFuncDef$(); expectedCallbackType = null; for (j = 0; j < expectedTypes.length; ++ j) { if (expectedTypes[j][i] != null && expectedTypes[j][i] instanceof FunctionType && expectedTypes[j][i].getArgumentTypes$().length === funcDef.getArguments$().length) { if (expectedCallbackType == null) { expectedCallbackType = expectedTypes[j][i]; } else { if (Util$typesAreEqual$ALType$ALType$(expectedCallbackType.getArgumentTypes$(), expectedTypes[j][i].getArgumentTypes$()) && expectedCallbackType.getReturnType$().equals$LType$(expectedTypes[j][i].getReturnType$())) { } else { break; } } } } if (j !== expectedTypes.length) { } else { if (expectedCallbackType != null) { if (! args[i].deductTypeIfUnknown$LAnalysisContext$LResolvedFunctionType$(context, expectedCallbackType)) { return null; } } } } else { if (args[i] instanceof ArrayLiteralExpression && args[i].getExprs$().length === 0 && args[i].getType$() == null) { arrayExpr = args[i]; expectedArrayType = null; for (j = 0; j < expectedTypes.length; ++ j) { if (expectedTypes[j][i] != null && expectedTypes[j][i] instanceof ObjectType && expectedTypes[j][i].getClassDef$() instanceof InstantiatedClassDefinition && expectedTypes[j][i].getClassDef$().getTemplateClassName$() === 'Array') { if (expectedArrayType == null) { expectedArrayType = expectedTypes[j][i]; } else { if (expectedArrayType.equals$LType$(expectedTypes[j][i])) { } else { break; } } } } if (j !== expectedTypes.length) { } else { if (expectedArrayType != null) { arrayExpr.setType$LType$(expectedArrayType); } } } else { if (args[i] instanceof MapLiteralExpression && args[i].getElements$().length === 0 && args[i].getType$() == null) { mapExpr = args[i]; expectedMapType = null; for (j = 0; j < expectedTypes.length; ++ j) { if (expectedTypes[j][i] != null && expectedTypes[j][i] instanceof ObjectType && expectedTypes[j][i].getClassDef$() instanceof InstantiatedClassDefinition && expectedTypes[j][i].getClassDef$().getTemplateClassName$() === 'Map') { if (expectedMapType == null) { expectedMapType = expectedTypes[j][i]; } else { if (expectedMapType.equals$LType$(expectedTypes[j][i])) { } else { break; } } } } if (j !== expectedTypes.length) { } else { if (expectedMapType != null) { mapExpr.setType$LType$(expectedMapType); } } } } } if (! args[i].analyze$LAnalysisContext$LExpression$(context, parentExpr)) { return null; } argTypes[i] = args[i].getType$(); } return argTypes; }; Util.analyzeArgs$LAnalysisContext$ALExpression$LExpression$AALType$ = Util$analyzeArgs$LAnalysisContext$ALExpression$LExpression$AALType$; function Util$typesAreEqual$ALType$ALType$(x, y) { var i; if (x.length !== y.length) { return false; } for (i = 0; i < x.length; ++ i) { if (! x[i].equals$LType$(y[i])) { return false; } } return true; }; Util.typesAreEqual$ALType$ALType$ = Util$typesAreEqual$ALType$ALType$; function Util$forEachStatement$F$LStatement$B$ALStatement$(cb, statements) { var i; if (statements != null) { for (i = 0; i < statements.length; ++ i) { if (! cb(statements[i])) { return false; } } } return true; }; Util.forEachStatement$F$LStatement$B$ALStatement$ = Util$forEachStatement$F$LStatement$B$ALStatement$; function Util$forEachExpression$F$LExpression$B$ALExpression$(cb, exprs) { return Util$forEachExpression$F$LExpression$F$LExpression$V$B$ALExpression$((function (expr, _) { return cb(expr); }), exprs); }; Util.forEachExpression$F$LExpression$B$ALExpression$ = Util$forEachExpression$F$LExpression$B$ALExpression$; function Util$forEachExpression$F$LExpression$F$LExpression$V$B$ALExpression$(cb, exprs) { var i; if (exprs != null) { for (i = 0; i < exprs.length; ++ i) { if (! cb(exprs[i], (function (exprs, index) { return (function (expr) { exprs[index] = expr; }); })(exprs, i))) { return false; } } } return true; }; Util.forEachExpression$F$LExpression$F$LExpression$V$B$ALExpression$ = Util$forEachExpression$F$LExpression$F$LExpression$V$B$ALExpression$; function Util$findFunctionInClass$LClassDefinition$SALType$B(classDef, funcName, argTypes, isStatic) { var found; found = null; classDef.forEachMemberFunction$F$LMemberFunctionDefinition$B$((function (funcDef) { if (isStatic === ((funcDef.flags$() & ClassDefinition.IS_STATIC) !== 0) && funcDef.name$() === funcName && Util$typesAreEqual$ALType$ALType$(funcDef.getArgumentTypes$(), argTypes)) { found = funcDef; return false; } return true; })); return found; }; Util.findFunctionInClass$LClassDefinition$SALType$B = Util$findFunctionInClass$LClassDefinition$SALType$B; function Util$findVariableInClass$LClassDefinition$SB(classDef, name, isStatic) { var found; found = null; classDef.forEachMemberVariable$F$LMemberVariableDefinition$B$((function (def) { if (isStatic === ((def.flags$() & ClassDefinition.IS_STATIC) !== 0) && def.name$() === name) { found = def; return false; } return true; })); return found; }; Util.findVariableInClass$LClassDefinition$SB = Util$findVariableInClass$LClassDefinition$SB; function Util$findMemberInClass$LClassDefinition$SALType$B(classDef, name, argTypes, isStatic) { if (argTypes != null) { return Util$findFunctionInClass$LClassDefinition$SALType$B(classDef, name, argTypes, isStatic); } else { return Util$findVariableInClass$LClassDefinition$SB(classDef, name, isStatic); } }; Util.findMemberInClass$LClassDefinition$SALType$B = Util$findMemberInClass$LClassDefinition$SALType$B; function Util$memberRootIsNative$LClassDefinition$SALType$B(classDef, name, argTypes, isStatic) { var rootIsNativeNonStatic; if (isStatic) { return (classDef.flags$() & (ClassDefinition.IS_NATIVE | ClassDefinition.IS_FAKE)) !== 0; } function rootIsNativeNonStatic(classDef, name, argTypes) { var found; found = Util$findMemberInClass$LClassDefinition$SALType$B(classDef, name, argTypes, false); if (found != null && (found.flags$() & ClassDefinition.IS_OVERRIDE) === 0) { return (classDef.flags$() & (ClassDefinition.IS_NATIVE | ClassDefinition.IS_FAKE)) !== 0; } if (classDef.extendType$() == null) { return false; } return rootIsNativeNonStatic(classDef.extendType$().getClassDef$(), name, argTypes); } return rootIsNativeNonStatic(classDef, name, argTypes); }; Util.memberRootIsNative$LClassDefinition$SALType$B = Util$memberRootIsNative$LClassDefinition$SALType$B; function Util$propertyRootIsNative$LPropertyExpression$(expr) { var baseExpr; baseExpr = expr.getExpr$(); return Util$memberRootIsNative$LClassDefinition$SALType$B(baseExpr.getType$().getClassDef$(), expr.getIdentifierToken$().getValue$(), Util$isReferringToFunctionDefinition$LPropertyExpression$(expr) ? expr.getType$().getArgumentTypes$() : null, baseExpr instanceof ClassExpression); }; Util.propertyRootIsNative$LPropertyExpression$ = Util$propertyRootIsNative$LPropertyExpression$; function Util$memberIsExported$LClassDefinition$SALType$B(classDef, name, argTypes, isStatic) { var found; var check; if (isStatic) { found = Util$findMemberInClass$LClassDefinition$SALType$B(classDef, name, argTypes, true); return (found.flags$() & ClassDefinition.IS_EXPORT) !== 0; } function check(classDef) { var found; var isExportedInImpl; if ((classDef.flags$() & ClassDefinition.IS_NATIVE) !== 0) { return false; } found = Util$findMemberInClass$LClassDefinition$SALType$B(classDef, name, argTypes, false); if (found != null && (found.flags$() & ClassDefinition.IS_EXPORT) !== 0) { return true; } if (classDef.extendType$() != null) { if (check(classDef.extendType$().getClassDef$())) { return true; } } isExportedInImpl = false; classDef.implementTypes$().forEach((function (implType) { if (check(implType.getClassDef$())) { isExportedInImpl = true; } })); return isExportedInImpl; } return check(classDef); }; Util.memberIsExported$LClassDefinition$SALType$B = Util$memberIsExported$LClassDefinition$SALType$B; function Util$isReferringToFunctionDefinition$LPropertyExpression$(expr) { var exprType; exprType = expr.getType$(); if (! (exprType instanceof FunctionType)) { return false; } if (exprType.isAssignable$()) { return false; } return true; }; Util.isReferringToFunctionDefinition$LPropertyExpression$ = Util$isReferringToFunctionDefinition$LPropertyExpression$; function Util$encodeStringLiteral$S(str) { var escaped; escaped = str.replace(/[\0-\x19\\'"\u007f-\uffff]/g, (function (ch) { var t; if (ch in Util._stringLiteralEncodingMap) { return Util._stringLiteralEncodingMap[ch]; } else { t = "000" + ch.charCodeAt(0).toString(16); t = t.substring(t.length - 4); return "\\u" + t; } })); return "\"" + escaped + "\""; }; Util.encodeStringLiteral$S = Util$encodeStringLiteral$S; function Util$decodeStringLiteral$S(literal) { var matched; var src; var decoded; var pos; var backslashAt; var escapeChar; matched = literal.match(/^([\'\"]).*([\'\"])$/); if (matched == null || matched[1] != matched[2]) { throw new Error("input string is not quoted properly: " + literal); } src = literal.substring(1, literal.length - 1); decoded = ""; pos = 0; while ((backslashAt = src.indexOf("\\", pos)) !== - 1) { decoded += src.substring(pos, backslashAt); pos = backslashAt + 1; if (pos === src.length) { throw new Error("last character within a string literal cannot be a backslash: " + literal); } escapeChar = src.charAt(pos++); switch (escapeChar) { case "'": case "\"": case "\\": decoded += escapeChar; break; case "b": decoded += "\b"; break; case "f": decoded += "\f"; break; case "n": decoded += "\n"; break; case "r": decoded += "\r"; break; case "t": decoded += "\t"; break; case "v": decoded += "\v"; break; case "u": matched = src.substring(pos).match(/^([0-9A-Fa-f]{4})/); if (matched == null) { throw new Error("expected four hexdigits after \\u: " + literal); } decoded += String.fromCharCode($__jsx_parseInt(matched[1], 16)); pos += 4; break; case "0": if (pos === src.length || src.charAt(pos).match(/[0-9]/) == null) { decoded += "\0"; } else { throw new Error("found a digit after '\\0': " + literal); } break; } } decoded += src.substring(pos); return decoded; }; Util.decodeStringLiteral$S = Util$decodeStringLiteral$S; function Util$_resolvedPathParts$S(path) { var tokens; var i; tokens = path.split(/[\\\/]+/); if (tokens.length === 1) { return tokens; } for (i = 0; i < tokens.length; ) { if (tokens[i] == ".") { tokens.splice(i, 1); } else { if (tokens[i] == ".." && i !== 0 && tokens[i - 1] != "..") { tokens.splice(i - 1, 2); i -= 1; } else { i++; } } } return tokens; }; Util._resolvedPathParts$S = Util$_resolvedPathParts$S; function Util$resolvePath$S(path) { return Util$_resolvedPathParts$S(path).join("/"); }; Util.resolvePath$S = Util$resolvePath$S; function Util$relativePath$SSB(fromPath, toPath, isFile) { var f; var t; var minLen; var samePartsIndex; var i; var pathParts; f = Util$_resolvedPathParts$S(fromPath); t = Util$_resolvedPathParts$S(toPath); if (isFile) { f.pop(); } if (f[0] == "") { f.shift(); } if (t[0] == "") { t.shift(); } minLen = Math.min(f.length, t.length); samePartsIndex = minLen; for (i = 0; i < minLen; ++ i) { if (f[i] != t[i]) { samePartsIndex = i; break; } } pathParts = []; for (i = samePartsIndex; i < f.length; ++ i) { pathParts.push(".."); } return pathParts.concat(t.slice(samePartsIndex)).join("/"); }; Util.relativePath$SSB = Util$relativePath$SSB; function Util$basename$S(path) { var parts; parts = Util$_resolvedPathParts$S(path); return parts.pop(); }; Util.basename$S = Util$basename$S; function Util$dirname$S(path) { var parts; parts = Util$_resolvedPathParts$S(path); parts.pop(); return (parts.length !== 0 ? parts.join("/") : "."); }; Util.dirname$S = Util$dirname$S; function Util$toOrdinal$N(n) { if (10 < n && n < 14) { return (n + "") + 'th'; } switch (n % 10) { case 1: return (n + "") + 'st'; case 2: return (n + "") + 'nd'; case 3: return (n + "") + 'rd'; default: return (n + "") + 'th'; } }; Util.toOrdinal$N = Util$toOrdinal$N; function Util$makeErrorMessage$LPlatform$SUSNNN(platform, message, filename, lineNumber, columnNumber, size) { var content; var sourceLine; var TAB_WIDTH; var tabs; if (filename == null) { return message + "\n"; } content = platform.load$S(filename); sourceLine = content.split(/\n/)[lineNumber - 1] + "\n"; TAB_WIDTH = 4; tabs = sourceLine.slice(0, columnNumber).match(/\t/g); if (tabs != null) { columnNumber += (TAB_WIDTH - 1) * tabs.length; } sourceLine = sourceLine.replace(/\t/g, Util$repeat$SN(" ", TAB_WIDTH)); sourceLine += Util$repeat$SN(" ", columnNumber); sourceLine += Util$repeat$SN("^", size); return Util$format$SAS("[%1:%2:%3] %4\n%5\n", [ filename, lineNumber + "", columnNumber + "", message, sourceLine ]); }; Util.makeErrorMessage$LPlatform$SUSNNN = Util$makeErrorMessage$LPlatform$SUSNNN; function Util$isArrayOf$LClassDefinition$LType$(classDef, expectedElementType) { var instantiatedClassDef; if (! (classDef instanceof InstantiatedClassDefinition)) { return false; } instantiatedClassDef = classDef; if (instantiatedClassDef.getTemplateClassName$() !== "Array") { return false; } if (! instantiatedClassDef.getTypeArguments$()[0].equals$LType$(expectedElementType)) { return false; } return true; }; Util.isArrayOf$LClassDefinition$LType$ = Util$isArrayOf$LClassDefinition$LType$; function Cloner$Expression$E() { }; $__jsx_extend([Cloner$Expression$E], Object); function Cloner$Expression$E$cloneArray$ALExpression$(a) { var r; var i; r = [ ]; for (i = 0; i < a.length; ++ i) { r[i] = a[i].clone$(); } return r; }; Cloner$Expression$E.cloneArray$ALExpression$ = Cloner$Expression$E$cloneArray$ALExpression$; function Cloner$Expression$E$cloneNullable$LExpression$(o) { return (o == null ? null : o.clone$()); }; Cloner$Expression$E.cloneNullable$LExpression$ = Cloner$Expression$E$cloneNullable$LExpression$; function Serializer$Expression$E() { }; $__jsx_extend([Serializer$Expression$E], Object); function Serializer$Expression$E$serializeArray$ALExpression$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$Expression$E.serializeArray$ALExpression$ = Serializer$Expression$E$serializeArray$ALExpression$; function Serializer$Expression$E$serializeNullable$LExpression$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$Expression$E.serializeNullable$LExpression$ = Serializer$Expression$E$serializeNullable$LExpression$; function Serializer$Type$E() { }; $__jsx_extend([Serializer$Type$E], Object); function Serializer$Type$E$serializeArray$ALType$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$Type$E.serializeArray$ALType$ = Serializer$Type$E$serializeArray$ALType$; function Serializer$Type$E$serializeNullable$LType$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$Type$E.serializeNullable$LType$ = Serializer$Type$E$serializeNullable$LType$; function Serializer$MapLiteralElement$E() { }; $__jsx_extend([Serializer$MapLiteralElement$E], Object); function Serializer$MapLiteralElement$E$serializeArray$ALMapLiteralElement$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$MapLiteralElement$E.serializeArray$ALMapLiteralElement$ = Serializer$MapLiteralElement$E$serializeArray$ALMapLiteralElement$; function Serializer$MapLiteralElement$E$serializeNullable$LMapLiteralElement$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$MapLiteralElement$E.serializeNullable$LMapLiteralElement$ = Serializer$MapLiteralElement$E$serializeNullable$LMapLiteralElement$; function Serializer$ClassDefinition$E() { }; $__jsx_extend([Serializer$ClassDefinition$E], Object); function Serializer$ClassDefinition$E$serializeArray$ALClassDefinition$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$ClassDefinition$E.serializeArray$ALClassDefinition$ = Serializer$ClassDefinition$E$serializeArray$ALClassDefinition$; function Serializer$ClassDefinition$E$serializeNullable$LClassDefinition$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$ClassDefinition$E.serializeNullable$LClassDefinition$ = Serializer$ClassDefinition$E$serializeNullable$LClassDefinition$; function Serializer$Token$E() { }; $__jsx_extend([Serializer$Token$E], Object); function Serializer$Token$E$serializeArray$ALToken$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$Token$E.serializeArray$ALToken$ = Serializer$Token$E$serializeArray$ALToken$; function Serializer$Token$E$serializeNullable$LToken$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$Token$E.serializeNullable$LToken$ = Serializer$Token$E$serializeNullable$LToken$; function Cloner$Statement$E() { }; $__jsx_extend([Cloner$Statement$E], Object); function Cloner$Statement$E$cloneArray$ALStatement$(a) { var r; var i; r = [ ]; for (i = 0; i < a.length; ++ i) { r[i] = a[i].clone$(); } return r; }; Cloner$Statement$E.cloneArray$ALStatement$ = Cloner$Statement$E$cloneArray$ALStatement$; function Cloner$Statement$E$cloneNullable$LStatement$(o) { return (o == null ? null : o.clone$()); }; Cloner$Statement$E.cloneNullable$LStatement$ = Cloner$Statement$E$cloneNullable$LStatement$; function Serializer$Statement$E() { }; $__jsx_extend([Serializer$Statement$E], Object); function Serializer$Statement$E$serializeArray$ALStatement$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$Statement$E.serializeArray$ALStatement$ = Serializer$Statement$E$serializeArray$ALStatement$; function Serializer$Statement$E$serializeNullable$LStatement$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$Statement$E.serializeNullable$LStatement$ = Serializer$Statement$E$serializeNullable$LStatement$; function Cloner$CatchStatement$E() { }; $__jsx_extend([Cloner$CatchStatement$E], Object); function Cloner$CatchStatement$E$cloneArray$ALCatchStatement$(a) { var r; var i; r = [ ]; for (i = 0; i < a.length; ++ i) { r[i] = a[i].clone$(); } return r; }; Cloner$CatchStatement$E.cloneArray$ALCatchStatement$ = Cloner$CatchStatement$E$cloneArray$ALCatchStatement$; function Cloner$CatchStatement$E$cloneNullable$LCatchStatement$(o) { return (o == null ? null : o.clone$()); }; Cloner$CatchStatement$E.cloneNullable$LCatchStatement$ = Cloner$CatchStatement$E$cloneNullable$LCatchStatement$; function Serializer$CatchStatement$E() { }; $__jsx_extend([Serializer$CatchStatement$E], Object); function Serializer$CatchStatement$E$serializeArray$ALCatchStatement$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$CatchStatement$E.serializeArray$ALCatchStatement$ = Serializer$CatchStatement$E$serializeArray$ALCatchStatement$; function Serializer$CatchStatement$E$serializeNullable$LCatchStatement$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$CatchStatement$E.serializeNullable$LCatchStatement$ = Serializer$CatchStatement$E$serializeNullable$LCatchStatement$; function Serializer$ParsedObjectType$E() { }; $__jsx_extend([Serializer$ParsedObjectType$E], Object); function Serializer$ParsedObjectType$E$serializeArray$ALParsedObjectType$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$ParsedObjectType$E.serializeArray$ALParsedObjectType$ = Serializer$ParsedObjectType$E$serializeArray$ALParsedObjectType$; function Serializer$ParsedObjectType$E$serializeNullable$LParsedObjectType$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$ParsedObjectType$E.serializeNullable$LParsedObjectType$ = Serializer$ParsedObjectType$E$serializeNullable$LParsedObjectType$; function Serializer$MemberDefinition$E() { }; $__jsx_extend([Serializer$MemberDefinition$E], Object); function Serializer$MemberDefinition$E$serializeArray$ALMemberDefinition$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$MemberDefinition$E.serializeArray$ALMemberDefinition$ = Serializer$MemberDefinition$E$serializeArray$ALMemberDefinition$; function Serializer$MemberDefinition$E$serializeNullable$LMemberDefinition$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$MemberDefinition$E.serializeNullable$LMemberDefinition$ = Serializer$MemberDefinition$E$serializeNullable$LMemberDefinition$; function Serializer$ArgumentDeclaration$E() { }; $__jsx_extend([Serializer$ArgumentDeclaration$E], Object); function Serializer$ArgumentDeclaration$E$serializeArray$ALArgumentDeclaration$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$ArgumentDeclaration$E.serializeArray$ALArgumentDeclaration$ = Serializer$ArgumentDeclaration$E$serializeArray$ALArgumentDeclaration$; function Serializer$ArgumentDeclaration$E$serializeNullable$LArgumentDeclaration$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$ArgumentDeclaration$E.serializeNullable$LArgumentDeclaration$ = Serializer$ArgumentDeclaration$E$serializeNullable$LArgumentDeclaration$; function Serializer$LocalVariable$E() { }; $__jsx_extend([Serializer$LocalVariable$E], Object); function Serializer$LocalVariable$E$serializeArray$ALLocalVariable$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$LocalVariable$E.serializeArray$ALLocalVariable$ = Serializer$LocalVariable$E$serializeArray$ALLocalVariable$; function Serializer$LocalVariable$E$serializeNullable$LLocalVariable$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$LocalVariable$E.serializeNullable$LLocalVariable$ = Serializer$LocalVariable$E$serializeNullable$LLocalVariable$; function TypedMap$Array$Type$E$MemberFunctionDefinition$E() { var $this = this; TypedMap$Array$Type$E$MemberFunctionDefinition$E$0.call(this, (function (x, y) { return x == y; })); }; function TypedMap$Array$Type$E$MemberFunctionDefinition$E$0(equalsCallback) { this._list = []; this._equalsCallback = equalsCallback; }; $__jsx_extend([TypedMap$Array$Type$E$MemberFunctionDefinition$E, TypedMap$Array$Type$E$MemberFunctionDefinition$E$0], Object); TypedMap$Array$Type$E$MemberFunctionDefinition$E.prototype.clone$ = function () { var x; x = new TypedMap$Array$Type$E$MemberFunctionDefinition$E$0(this._equalsCallback); x._list = this._list.concat([ ]); return x; }; TypedMap$Array$Type$E$MemberFunctionDefinition$E.prototype.has$ALType$ = function (key) { var $this = this; return ! this.forEach$F$ALType$LMemberFunctionDefinition$B$((function (entryKey, entryValue) { return ! $this._equalsCallback(key, entryKey); })); }; TypedMap$Array$Type$E$MemberFunctionDefinition$E.prototype.set$ALType$LMemberFunctionDefinition$ = function (key, val) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { this._list[i].second = val; return; } } this._list.push(new Pair$Array$Type$E$MemberFunctionDefinition$E(key, val)); }; TypedMap$Array$Type$E$MemberFunctionDefinition$E.prototype.get$ALType$ = function (key) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { return this._list[i].second; } } return null; }; TypedMap$Array$Type$E$MemberFunctionDefinition$E.prototype.delete$ALType$ = function (key) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { this._list.splice(i, 1); return; } } }; TypedMap$Array$Type$E$MemberFunctionDefinition$E.prototype.clear$ = function () { this._list.splice(0, this._list.length); }; TypedMap$Array$Type$E$MemberFunctionDefinition$E.prototype.forEach$F$ALType$LMemberFunctionDefinition$B$ = function (cb) { var i; var e; for (i = 0; i < this._list.length; ++ i) { e = this._list[i]; if (! cb(e.first, e.second)) { return false; } } return true; }; TypedMap$Array$Type$E$MemberFunctionDefinition$E.prototype.reversedForEach$F$ALType$LMemberFunctionDefinition$B$ = function (cb) { var i; var e; for (i = this._list.length - 1; i >= 0; -- i) { e = this._list[i]; if (! cb(e.first, e.second)) { return false; } } return true; }; function Pair$Array$Type$E$MemberFunctionDefinition$E(first, second) { this.first = first; this.second = second; }; $__jsx_extend([Pair$Array$Type$E$MemberFunctionDefinition$E], Object); function Serializer$Import$E() { }; $__jsx_extend([Serializer$Import$E], Object); function Serializer$Import$E$serializeArray$ALImport$(a) { var ret; var i; if (a == null) { return null; } ret = [ ]; for (i = 0; i < a.length; ++ i) { ret[i] = a[i].serialize$(); } return ret; }; Serializer$Import$E.serializeArray$ALImport$ = Serializer$Import$E$serializeArray$ALImport$; function Serializer$Import$E$serializeNullable$LImport$(v) { if (v == null) { return null; } return v.serialize$(); }; Serializer$Import$E.serializeNullable$LImport$ = Serializer$Import$E$serializeNullable$LImport$; function Pair$ClassDefinition$MemberFunctionDefinition$E(first, second) { this.first = first; this.second = second; }; $__jsx_extend([Pair$ClassDefinition$MemberFunctionDefinition$E], Object); function TypedMap$LocalVariable$boolean$E() { var $this = this; TypedMap$LocalVariable$boolean$E$0.call(this, (function (x, y) { return x == y; })); }; function TypedMap$LocalVariable$boolean$E$0(equalsCallback) { this._list = []; this._equalsCallback = equalsCallback; }; $__jsx_extend([TypedMap$LocalVariable$boolean$E, TypedMap$LocalVariable$boolean$E$0], Object); TypedMap$LocalVariable$boolean$E.prototype.clone$ = function () { var x; x = new TypedMap$LocalVariable$boolean$E$0(this._equalsCallback); x._list = this._list.concat([ ]); return x; }; TypedMap$LocalVariable$boolean$E.prototype.has$LLocalVariable$ = function (key) { var $this = this; return ! this.forEach$F$LLocalVariable$BB$((function (entryKey, entryValue) { return ! $this._equalsCallback(key, entryKey); })); }; TypedMap$LocalVariable$boolean$E.prototype.set$LLocalVariable$B = function (key, val) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { this._list[i].second = val; return; } } this._list.push(new Pair$LocalVariable$boolean$E(key, val)); }; TypedMap$LocalVariable$boolean$E.prototype.get$LLocalVariable$ = function (key) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { return this._list[i].second; } } return null; }; TypedMap$LocalVariable$boolean$E.prototype.delete$LLocalVariable$ = function (key) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { this._list.splice(i, 1); return; } } }; TypedMap$LocalVariable$boolean$E.prototype.clear$ = function () { this._list.splice(0, this._list.length); }; TypedMap$LocalVariable$boolean$E.prototype.forEach$F$LLocalVariable$BB$ = function (cb) { var i; var e; for (i = 0; i < this._list.length; ++ i) { e = this._list[i]; if (! cb(e.first, e.second)) { return false; } } return true; }; TypedMap$LocalVariable$boolean$E.prototype.reversedForEach$F$LLocalVariable$BB$ = function (cb) { var i; var e; for (i = this._list.length - 1; i >= 0; -- i) { e = this._list[i]; if (! cb(e.first, e.second)) { return false; } } return true; }; function Pair$LocalVariable$boolean$E(first, second) { this.first = first; this.second = second; }; $__jsx_extend([Pair$LocalVariable$boolean$E], Object); function TypedMap$LocalVariable$Expression$E() { var $this = this; TypedMap$LocalVariable$Expression$E$0.call(this, (function (x, y) { return x == y; })); }; function TypedMap$LocalVariable$Expression$E$0(equalsCallback) { this._list = []; this._equalsCallback = equalsCallback; }; $__jsx_extend([TypedMap$LocalVariable$Expression$E, TypedMap$LocalVariable$Expression$E$0], Object); TypedMap$LocalVariable$Expression$E.prototype.clone$ = function () { var x; x = new TypedMap$LocalVariable$Expression$E$0(this._equalsCallback); x._list = this._list.concat([ ]); return x; }; TypedMap$LocalVariable$Expression$E.prototype.has$LLocalVariable$ = function (key) { var $this = this; return ! this.forEach$F$LLocalVariable$LExpression$B$((function (entryKey, entryValue) { return ! $this._equalsCallback(key, entryKey); })); }; TypedMap$LocalVariable$Expression$E.prototype.set$LLocalVariable$LExpression$ = function (key, val) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { this._list[i].second = val; return; } } this._list.push(new Pair$LocalVariable$Expression$E(key, val)); }; TypedMap$LocalVariable$Expression$E.prototype.get$LLocalVariable$ = function (key) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { return this._list[i].second; } } return null; }; TypedMap$LocalVariable$Expression$E.prototype.delete$LLocalVariable$ = function (key) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { this._list.splice(i, 1); return; } } }; TypedMap$LocalVariable$Expression$E.prototype.clear$ = function () { this._list.splice(0, this._list.length); }; TypedMap$LocalVariable$Expression$E.prototype.forEach$F$LLocalVariable$LExpression$B$ = function (cb) { var i; var e; for (i = 0; i < this._list.length; ++ i) { e = this._list[i]; if (! cb(e.first, e.second)) { return false; } } return true; }; TypedMap$LocalVariable$Expression$E.prototype.reversedForEach$F$LLocalVariable$LExpression$B$ = function (cb) { var i; var e; for (i = this._list.length - 1; i >= 0; -- i) { e = this._list[i]; if (! cb(e.first, e.second)) { return false; } } return true; }; function Pair$LocalVariable$Expression$E(first, second) { this.first = first; this.second = second; }; $__jsx_extend([Pair$LocalVariable$Expression$E], Object); function Triple$LocalVariable$AssignmentExpression$function$$$$Expression$$$$void$E(first, second, third) { this.first = first; this.second = second; this.third = third; }; $__jsx_extend([Triple$LocalVariable$AssignmentExpression$function$$$$Expression$$$$void$E], Object); function Pair$AssignmentExpression$function$$$$Expression$$$$void$E(first, second) { this.first = first; this.second = second; }; $__jsx_extend([Pair$AssignmentExpression$function$$$$Expression$$$$void$E], Object); function TypedMap$ClassDefinition$string$E() { var $this = this; TypedMap$ClassDefinition$string$E$0.call(this, (function (x, y) { return x == y; })); }; function TypedMap$ClassDefinition$string$E$0(equalsCallback) { this._list = []; this._equalsCallback = equalsCallback; }; $__jsx_extend([TypedMap$ClassDefinition$string$E, TypedMap$ClassDefinition$string$E$0], Object); TypedMap$ClassDefinition$string$E.prototype.clone$ = function () { var x; x = new TypedMap$ClassDefinition$string$E$0(this._equalsCallback); x._list = this._list.concat([ ]); return x; }; TypedMap$ClassDefinition$string$E.prototype.has$LClassDefinition$ = function (key) { var $this = this; return ! this.forEach$F$LClassDefinition$SB$((function (entryKey, entryValue) { return ! $this._equalsCallback(key, entryKey); })); }; TypedMap$ClassDefinition$string$E.prototype.set$LClassDefinition$S = function (key, val) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { this._list[i].second = val; return; } } this._list.push(new Pair$ClassDefinition$string$E(key, val)); }; TypedMap$ClassDefinition$string$E.prototype.get$LClassDefinition$ = function (key) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { return this._list[i].second; } } return null; }; TypedMap$ClassDefinition$string$E.prototype.delete$LClassDefinition$ = function (key) { var i; for (i = 0; i < this._list.length; ++ i) { if (this._equalsCallback(this._list[i].first, key)) { this._list.splice(i, 1); return; } } }; TypedMap$ClassDefinition$string$E.prototype.clear$ = function () { this._list.splice(0, this._list.length); }; TypedMap$ClassDefinition$string$E.prototype.forEach$F$LClassDefinition$SB$ = function (cb) { var i; var e; for (i = 0; i < this._list.length; ++ i) { e = this._list[i]; if (! cb(e.first, e.second)) { return false; } } return true; }; TypedMap$ClassDefinition$string$E.prototype.reversedForEach$F$LClassDefinition$SB$ = function (cb) { var i; var e; for (i = this._list.length - 1; i >= 0; -- i) { e = this._list[i]; if (! cb(e.first, e.second)) { return false; } } return true; }; function Pair$ClassDefinition$string$E(first, second) { this.first = first; this.second = second; }; $__jsx_extend([Pair$ClassDefinition$string$E], Object); function _Util() { }; $__jsx_extend([_Util], Object); function _Util$getOutputClassName$LClassDefinition$(classDef) { return classDef.getStash$()[_Util.OUTPUTNAME_IDENTIFIER].outputName; }; _Util.getOutputClassName$LClassDefinition$ = _Util$getOutputClassName$LClassDefinition$; function _Util$getOutputConstructorName$LMemberFunctionDefinition$(ctor) { if ((ctor.getClassDef$().flags$() & ClassDefinition.IS_NATIVE) !== 0) { return _Util$getNameOfNativeConstructor$LClassDefinition$(ctor.getClassDef$()); } return ctor.getStash$()[_Util.OUTPUTNAME_IDENTIFIER].outputName; }; _Util.getOutputConstructorName$LMemberFunctionDefinition$ = _Util$getOutputConstructorName$LMemberFunctionDefinition$; function _Util$getOutputConstructorName$LClassDefinition$ALType$(classDef, argTypes) { var ctor; ctor = Util$findFunctionInClass$LClassDefinition$SALType$B(classDef, "constructor", argTypes, false); return _Util$getOutputConstructorName$LMemberFunctionDefinition$(ctor); }; _Util.getOutputConstructorName$LClassDefinition$ALType$ = _Util$getOutputConstructorName$LClassDefinition$ALType$; function _Util$getNameOfNativeConstructor$LClassDefinition$(classDef) { if (classDef instanceof InstantiatedClassDefinition) { if (classDef.getTemplateClassName$() === "Map") { return "Object"; } else { return classDef.getTemplateClassName$(); } } return classDef.className$(); }; _Util.getNameOfNativeConstructor$LClassDefinition$ = _Util$getNameOfNativeConstructor$LClassDefinition$; function _Util$setOutputClassNames$ALClassDefinition$(classDefs) { var setOutputName; var escapeClassNameIfInstantiated; var countByName; var newUniqueName; var i; var classDef; var className; var ctors; var j; var exportedCtor; var n; function setOutputNa