@markw65/monkeyc-optimizer 1.1.80 → 1.1.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/build/api.cjs +39 -39
- package/build/{chunk-3KM4FHVN.cjs → chunk-W4QVHCFN.cjs} +320 -284
- package/build/{chunk-NHZRKHZO.cjs → chunk-X7QCZR3F.cjs} +10 -5
- package/build/optimizer.cjs +20 -20
- package/build/sdk-util.cjs +15 -15
- package/build/util.cjs +26 -26
- package/build/worker-thread.cjs +4 -4
- package/package.json +1 -1
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_W4QVHCFN_exports = {};
|
|
30
|
+
__export(chunk_W4QVHCFN_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -139,8 +139,8 @@ __export(chunk_3KM4FHVN_exports, {
|
|
|
139
139
|
visitorNode: () => visitorNode,
|
|
140
140
|
xml_util_exports: () => xml_util_exports
|
|
141
141
|
});
|
|
142
|
-
module.exports = __toCommonJS(
|
|
143
|
-
var
|
|
142
|
+
module.exports = __toCommonJS(chunk_W4QVHCFN_exports);
|
|
143
|
+
var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
|
|
144
144
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
145
145
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
146
146
|
var import_node_assert = __toESM(require("node:assert"));
|
|
@@ -7033,7 +7033,7 @@ function buildReducedGraph(state, root, refsForUpdate, notice) {
|
|
|
7033
7033
|
switch (node.type) {
|
|
7034
7034
|
case "ImportModule":
|
|
7035
7035
|
case "Using":
|
|
7036
|
-
(0,
|
|
7036
|
+
(0, import_chunk_X7QCZR3F.forEach)(
|
|
7037
7037
|
notice(node, node, false, () => []),
|
|
7038
7038
|
(e) => allEvents.push(e)
|
|
7039
7039
|
);
|
|
@@ -7042,7 +7042,7 @@ function buildReducedGraph(state, root, refsForUpdate, notice) {
|
|
|
7042
7042
|
case "ModuleDeclaration":
|
|
7043
7043
|
if (rootNode !== node)
|
|
7044
7044
|
return [];
|
|
7045
|
-
(0,
|
|
7045
|
+
(0, import_chunk_X7QCZR3F.forEach)(
|
|
7046
7046
|
notice(node, node, false, () => []),
|
|
7047
7047
|
(e) => {
|
|
7048
7048
|
addEvent(localState.curBlock, e);
|
|
@@ -7367,9 +7367,9 @@ function buildReducedGraph(state, root, refsForUpdate, notice) {
|
|
|
7367
7367
|
);
|
|
7368
7368
|
}
|
|
7369
7369
|
} else {
|
|
7370
|
-
(0,
|
|
7370
|
+
(0, import_chunk_X7QCZR3F.forEach)(events, (e) => e.mayThrow = false);
|
|
7371
7371
|
}
|
|
7372
|
-
(0,
|
|
7372
|
+
(0, import_chunk_X7QCZR3F.forEach)(events, (event) => {
|
|
7373
7373
|
if (event.mayThrow) {
|
|
7374
7374
|
for (let i = localState.stack.length; i--; ) {
|
|
7375
7375
|
const target = localState.stack[i].throw;
|
|
@@ -7524,7 +7524,7 @@ var init_control_flow = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
7524
7524
|
"src/control-flow.ts"() {
|
|
7525
7525
|
"use strict";
|
|
7526
7526
|
(0, import_chunk_JDC43A3I.init_ast)();
|
|
7527
|
-
(0,
|
|
7527
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
7528
7528
|
Terminals = {
|
|
7529
7529
|
BreakStatement: "break",
|
|
7530
7530
|
ContinueStatement: "continue",
|
|
@@ -7551,12 +7551,12 @@ var init_control_flow = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
7551
7551
|
if (!from.succs) {
|
|
7552
7552
|
from.succs = [to];
|
|
7553
7553
|
} else {
|
|
7554
|
-
(0,
|
|
7554
|
+
(0, import_chunk_X7QCZR3F.pushUnique)(from.succs, to);
|
|
7555
7555
|
}
|
|
7556
7556
|
if (!to.preds) {
|
|
7557
7557
|
to.preds = [from];
|
|
7558
7558
|
} else {
|
|
7559
|
-
(0,
|
|
7559
|
+
(0, import_chunk_X7QCZR3F.pushUnique)(to.preds, from);
|
|
7560
7560
|
}
|
|
7561
7561
|
}
|
|
7562
7562
|
newBlock(block) {
|
|
@@ -7916,8 +7916,8 @@ function mergeObjectValues(to, from) {
|
|
|
7916
7916
|
function mergeStateDecls(to, from) {
|
|
7917
7917
|
let changed = false;
|
|
7918
7918
|
let result = to;
|
|
7919
|
-
(0,
|
|
7920
|
-
if ((0,
|
|
7919
|
+
(0, import_chunk_X7QCZR3F.forEach)(from, (v) => {
|
|
7920
|
+
if ((0, import_chunk_X7QCZR3F.some)(to, (t) => t === v)) {
|
|
7921
7921
|
return;
|
|
7922
7922
|
}
|
|
7923
7923
|
if (Array.isArray(result)) {
|
|
@@ -8084,7 +8084,7 @@ var init_union_type = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
8084
8084
|
"use strict";
|
|
8085
8085
|
(0, import_chunk_JDC43A3I.init_ast)();
|
|
8086
8086
|
init_data_flow();
|
|
8087
|
-
(0,
|
|
8087
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
8088
8088
|
init_could_be();
|
|
8089
8089
|
init_intersection_type();
|
|
8090
8090
|
init_sub_type();
|
|
@@ -8099,7 +8099,7 @@ function expandTypedef(t) {
|
|
|
8099
8099
|
);
|
|
8100
8100
|
const tExpanded = cloneType(t);
|
|
8101
8101
|
clearValuesUnder(tExpanded, 262144, true);
|
|
8102
|
-
(0,
|
|
8102
|
+
(0, import_chunk_X7QCZR3F.forEach)(decls, (decl) => unionInto(tExpanded, decl.resolvedType));
|
|
8103
8103
|
return tExpanded;
|
|
8104
8104
|
}
|
|
8105
8105
|
function intersectEnum(t, e) {
|
|
@@ -8293,9 +8293,9 @@ function intersectionValue(pair) {
|
|
|
8293
8293
|
case 4096:
|
|
8294
8294
|
case 8192: {
|
|
8295
8295
|
const common = /* @__PURE__ */ new Set();
|
|
8296
|
-
(0,
|
|
8296
|
+
(0, import_chunk_X7QCZR3F.forEach)(
|
|
8297
8297
|
pair.avalue,
|
|
8298
|
-
(sna) => (0,
|
|
8298
|
+
(sna) => (0, import_chunk_X7QCZR3F.some)(pair.bvalue, (snb) => sna === snb) && common.add(sna)
|
|
8299
8299
|
);
|
|
8300
8300
|
if (!common.size)
|
|
8301
8301
|
return null;
|
|
@@ -8304,9 +8304,9 @@ function intersectionValue(pair) {
|
|
|
8304
8304
|
}
|
|
8305
8305
|
case 16384: {
|
|
8306
8306
|
const common = /* @__PURE__ */ new Set();
|
|
8307
|
-
(0,
|
|
8307
|
+
(0, import_chunk_X7QCZR3F.forEach)(pair.avalue, (sna) => {
|
|
8308
8308
|
const superA = getSuperClasses(sna);
|
|
8309
|
-
(0,
|
|
8309
|
+
(0, import_chunk_X7QCZR3F.forEach)(pair.bvalue, (snb) => {
|
|
8310
8310
|
if (sna === snb || superA && superA.has(snb)) {
|
|
8311
8311
|
common.add(sna);
|
|
8312
8312
|
}
|
|
@@ -8553,7 +8553,7 @@ function restrictExactTypesByEquality(a, b) {
|
|
|
8553
8553
|
}
|
|
8554
8554
|
case 262144:
|
|
8555
8555
|
return restrictByEquality(
|
|
8556
|
-
(0,
|
|
8556
|
+
(0, import_chunk_X7QCZR3F.reduce)(
|
|
8557
8557
|
a.value,
|
|
8558
8558
|
(cur, decl) => {
|
|
8559
8559
|
unionInto(cur, decl.resolvedType);
|
|
@@ -8620,7 +8620,7 @@ var init_intersection_type = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
8620
8620
|
"use strict";
|
|
8621
8621
|
init_api();
|
|
8622
8622
|
init_data_flow();
|
|
8623
|
-
(0,
|
|
8623
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
8624
8624
|
init_could_be();
|
|
8625
8625
|
init_interp();
|
|
8626
8626
|
init_types();
|
|
@@ -8734,14 +8734,14 @@ function subtypeOfValue(pair) {
|
|
|
8734
8734
|
case 8192: {
|
|
8735
8735
|
const asd = pair.avalue;
|
|
8736
8736
|
const bsd = pair.bvalue;
|
|
8737
|
-
return (0,
|
|
8737
|
+
return (0, import_chunk_X7QCZR3F.every)(asd, (sna) => (0, import_chunk_X7QCZR3F.some)(bsd, (snb) => sna === snb));
|
|
8738
8738
|
}
|
|
8739
8739
|
case 16384: {
|
|
8740
8740
|
const asd = pair.avalue;
|
|
8741
8741
|
const bsd = pair.bvalue;
|
|
8742
|
-
return (0,
|
|
8742
|
+
return (0, import_chunk_X7QCZR3F.every)(asd, (sna) => {
|
|
8743
8743
|
const superA = getSuperClasses(sna);
|
|
8744
|
-
return (0,
|
|
8744
|
+
return (0, import_chunk_X7QCZR3F.some)(bsd, (snb) => {
|
|
8745
8745
|
if (sna === snb || superA && superA.has(snb)) {
|
|
8746
8746
|
return true;
|
|
8747
8747
|
}
|
|
@@ -8777,7 +8777,7 @@ var init_sub_type = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
8777
8777
|
"use strict";
|
|
8778
8778
|
init_api();
|
|
8779
8779
|
init_data_flow();
|
|
8780
|
-
(0,
|
|
8780
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
8781
8781
|
init_could_be();
|
|
8782
8782
|
init_intersection_type();
|
|
8783
8783
|
init_types();
|
|
@@ -9198,13 +9198,13 @@ function isTypeStateKey(decl) {
|
|
|
9198
9198
|
return Array.isArray(decl) || decl.type !== "MemberDecl" && decl.type !== "Unknown";
|
|
9199
9199
|
}
|
|
9200
9200
|
function declIsLocal(decl) {
|
|
9201
|
-
return (0,
|
|
9201
|
+
return (0, import_chunk_X7QCZR3F.some)(
|
|
9202
9202
|
decl,
|
|
9203
9203
|
(d) => d.type === "BinaryExpression" || d.type === "Identifier" || d.type === "VariableDeclarator" && isLocal(d)
|
|
9204
9204
|
);
|
|
9205
9205
|
}
|
|
9206
9206
|
function declIsNonLocal(decl) {
|
|
9207
|
-
return (0,
|
|
9207
|
+
return (0, import_chunk_X7QCZR3F.some)(decl, (d) => d.type === "VariableDeclarator" && !isLocal(d));
|
|
9208
9208
|
}
|
|
9209
9209
|
function localDeclName(decl) {
|
|
9210
9210
|
if (Array.isArray(decl))
|
|
@@ -9217,12 +9217,12 @@ function localDeclName(decl) {
|
|
|
9217
9217
|
case "VariableDeclarator":
|
|
9218
9218
|
return variableDeclarationName(decl.node.id);
|
|
9219
9219
|
}
|
|
9220
|
-
throw new
|
|
9220
|
+
throw new import_chunk_X7QCZR3F.AwaitedError(
|
|
9221
9221
|
declFullName(decl).then((declStr) => `Invalid local decl: ${declStr}`)
|
|
9222
9222
|
);
|
|
9223
9223
|
}
|
|
9224
9224
|
function tsKey(key) {
|
|
9225
|
-
return `${(0,
|
|
9225
|
+
return `${(0, import_chunk_X7QCZR3F.map)(key, (k) => {
|
|
9226
9226
|
if (k.type === "Literal") {
|
|
9227
9227
|
return k.raw;
|
|
9228
9228
|
} else if (isStateNode(k)) {
|
|
@@ -9241,7 +9241,7 @@ function sourceLocation(loc) {
|
|
|
9241
9241
|
return loc ? `${loc.source || "??"}:${loc.start.line}:${loc.start.column}` : "??";
|
|
9242
9242
|
}
|
|
9243
9243
|
function printBlockHeader(block) {
|
|
9244
|
-
(0,
|
|
9244
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
9245
9245
|
block.order,
|
|
9246
9246
|
`(${block.node?.loc?.source || "??"}:${block.node?.loc?.start.line || "??"})`,
|
|
9247
9247
|
`Preds: ${(block.preds || []).map((block2) => block2.order).join(", ")}`
|
|
@@ -9267,10 +9267,10 @@ function describeEvent(event) {
|
|
|
9267
9267
|
).then((desc) => `${event.type}: ${desc}`);
|
|
9268
9268
|
}
|
|
9269
9269
|
function printBlockEvents(block, extra) {
|
|
9270
|
-
(0,
|
|
9271
|
-
(0,
|
|
9270
|
+
(0, import_chunk_X7QCZR3F.log)("Events:");
|
|
9271
|
+
(0, import_chunk_X7QCZR3F.forEach)(
|
|
9272
9272
|
block.events,
|
|
9273
|
-
(event) => (0,
|
|
9273
|
+
(event) => (0, import_chunk_X7QCZR3F.log)(
|
|
9274
9274
|
describeEvent(event).then(
|
|
9275
9275
|
(eventStr) => ` ${eventStr} ${extra ? extra(event) : ""}`
|
|
9276
9276
|
)
|
|
@@ -9278,7 +9278,7 @@ function printBlockEvents(block, extra) {
|
|
|
9278
9278
|
);
|
|
9279
9279
|
}
|
|
9280
9280
|
function printBlockTrailer(block) {
|
|
9281
|
-
(0,
|
|
9281
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
9282
9282
|
`Succs: ${(block.succs || []).map((block2) => block2.order).join(", ")} ExSucc: ${block.exsucc ? block.exsucc.order : ""}`
|
|
9283
9283
|
);
|
|
9284
9284
|
}
|
|
@@ -9405,7 +9405,7 @@ var init_type_flow_util = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
9405
9405
|
"use strict";
|
|
9406
9406
|
init_api();
|
|
9407
9407
|
init_data_flow();
|
|
9408
|
-
(0,
|
|
9408
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
9409
9409
|
init_intersection_type();
|
|
9410
9410
|
init_sub_type();
|
|
9411
9411
|
init_types();
|
|
@@ -9459,7 +9459,7 @@ function calleeObjectType(istate, callee) {
|
|
|
9459
9459
|
}
|
|
9460
9460
|
function checkCallArgs(istate, node, callees, args) {
|
|
9461
9461
|
const allDiags = [];
|
|
9462
|
-
const resultType = (0,
|
|
9462
|
+
const resultType = (0, import_chunk_X7QCZR3F.reduce)(
|
|
9463
9463
|
callees,
|
|
9464
9464
|
(result, cur) => {
|
|
9465
9465
|
const curDiags = [];
|
|
@@ -9618,7 +9618,7 @@ function isOverride(cur, funcs) {
|
|
|
9618
9618
|
const cls = cur.stack?.[cur.stack.length - 1]?.sn;
|
|
9619
9619
|
if (cls?.type === "ClassDeclaration" && cls.superClasses) {
|
|
9620
9620
|
const supers = getSuperClasses(cls);
|
|
9621
|
-
if (supers && (0,
|
|
9621
|
+
if (supers && (0, import_chunk_X7QCZR3F.some)(funcs, (func) => {
|
|
9622
9622
|
if (func === cur)
|
|
9623
9623
|
return false;
|
|
9624
9624
|
const fcls = func.stack?.[func.stack.length - 1].sn;
|
|
@@ -10186,7 +10186,7 @@ var init_interp_call = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
10186
10186
|
"use strict";
|
|
10187
10187
|
init_api();
|
|
10188
10188
|
init_optimizer_types();
|
|
10189
|
-
(0,
|
|
10189
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
10190
10190
|
init_interp();
|
|
10191
10191
|
init_sub_type();
|
|
10192
10192
|
init_type_flow_util();
|
|
@@ -10957,7 +10957,7 @@ function evaluateNode(istate, node) {
|
|
|
10957
10957
|
byteArray = true;
|
|
10958
10958
|
}
|
|
10959
10959
|
}
|
|
10960
|
-
if (objectType.value && !(objectType.type & (
|
|
10960
|
+
if (objectType.value && !(objectType.type & (16384 | (byteArray ? 0 : 32768)))) {
|
|
10961
10961
|
let result = null;
|
|
10962
10962
|
if (objectType.type & 512) {
|
|
10963
10963
|
const avalue = getUnionComponent(
|
|
@@ -10994,6 +10994,42 @@ function evaluateNode(istate, node) {
|
|
|
10994
10994
|
result.type |= 1;
|
|
10995
10995
|
}
|
|
10996
10996
|
}
|
|
10997
|
+
if (objectType.type & 4096 && couldBe(property.value, {
|
|
10998
|
+
type: 131072
|
|
10999
|
+
/* Symbol */
|
|
11000
|
+
})) {
|
|
11001
|
+
const mvalue = getUnionComponent(
|
|
11002
|
+
objectType,
|
|
11003
|
+
4096
|
|
11004
|
+
/* Module */
|
|
11005
|
+
);
|
|
11006
|
+
if (!mvalue) {
|
|
11007
|
+
result = {
|
|
11008
|
+
type: 524287
|
|
11009
|
+
/* Any */
|
|
11010
|
+
};
|
|
11011
|
+
push({
|
|
11012
|
+
value: result,
|
|
11013
|
+
embeddedEffects: object.embeddedEffects || property.embeddedEffects,
|
|
11014
|
+
node
|
|
11015
|
+
});
|
|
11016
|
+
break;
|
|
11017
|
+
}
|
|
11018
|
+
if (result)
|
|
11019
|
+
result = cloneType(result);
|
|
11020
|
+
(0, import_chunk_X7QCZR3F.forEach)(mvalue, (m) => {
|
|
11021
|
+
if (m.decls) {
|
|
11022
|
+
Object.values(m.decls).forEach((sn) => {
|
|
11023
|
+
const t = typeFromTypeStateNodes(istate.state, sn, true);
|
|
11024
|
+
if (result) {
|
|
11025
|
+
unionInto(result, t);
|
|
11026
|
+
} else {
|
|
11027
|
+
result = cloneType(t);
|
|
11028
|
+
}
|
|
11029
|
+
});
|
|
11030
|
+
}
|
|
11031
|
+
});
|
|
11032
|
+
}
|
|
10997
11033
|
if (byteArray) {
|
|
10998
11034
|
const t = {
|
|
10999
11035
|
type: 8
|
|
@@ -11120,7 +11156,7 @@ function evaluateNode(istate, node) {
|
|
|
11120
11156
|
if (isExact(klass.value) && klass.value.type === 16384) {
|
|
11121
11157
|
obj.value = { klass: klass.value };
|
|
11122
11158
|
if (istate.checkTypes && klass.value.value) {
|
|
11123
|
-
const callees = (0,
|
|
11159
|
+
const callees = (0, import_chunk_X7QCZR3F.map)(
|
|
11124
11160
|
klass.value.value,
|
|
11125
11161
|
(klass2) => klass2.decls?.initialize
|
|
11126
11162
|
).flat().filter(
|
|
@@ -11322,7 +11358,7 @@ function mustBeIdentical(a, b) {
|
|
|
11322
11358
|
return false;
|
|
11323
11359
|
}
|
|
11324
11360
|
function isByteArrayData(objectData) {
|
|
11325
|
-
return objectData.klass.value && (0,
|
|
11361
|
+
return objectData.klass.value && (0, import_chunk_X7QCZR3F.every)(
|
|
11326
11362
|
objectData.klass.value,
|
|
11327
11363
|
(klass) => klass.fullName === "$.Toybox.Lang.ByteArray"
|
|
11328
11364
|
);
|
|
@@ -11334,7 +11370,7 @@ var init_interp = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
11334
11370
|
(0, import_chunk_JDC43A3I.init_ast)();
|
|
11335
11371
|
init_data_flow();
|
|
11336
11372
|
init_optimizer_types();
|
|
11337
|
-
(0,
|
|
11373
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
11338
11374
|
init_could_be();
|
|
11339
11375
|
init_interp_binary();
|
|
11340
11376
|
init_interp_call();
|
|
@@ -11573,7 +11609,7 @@ function typeFromTypeStateNode(state, sn, classVsObj) {
|
|
|
11573
11609
|
);
|
|
11574
11610
|
if (value2) {
|
|
11575
11611
|
const a = [];
|
|
11576
|
-
(0,
|
|
11612
|
+
(0, import_chunk_X7QCZR3F.forEach)(value2, (v) => {
|
|
11577
11613
|
if (v !== sn)
|
|
11578
11614
|
a.push(v);
|
|
11579
11615
|
});
|
|
@@ -12067,7 +12103,7 @@ function mustBeFalse(arg) {
|
|
|
12067
12103
|
return arg.type === 1 || arg.type === 2 || (arg.type === 8 || arg.type === 16) && arg.value != null && Number(arg.value) === 0;
|
|
12068
12104
|
}
|
|
12069
12105
|
function display(type) {
|
|
12070
|
-
const names = (v, fn) => (0,
|
|
12106
|
+
const names = (v, fn) => (0, import_chunk_X7QCZR3F.map)(v, fn).sort().filter((s, i, arr) => !i || s !== arr[i - 1]).join(" or ");
|
|
12071
12107
|
const parts = [];
|
|
12072
12108
|
const displayOne = (tv) => {
|
|
12073
12109
|
switch (tv.type) {
|
|
@@ -12225,7 +12261,7 @@ function getStateNodeDeclsWithExactFromType(state, object) {
|
|
|
12225
12261
|
switch (type.type) {
|
|
12226
12262
|
case 32768:
|
|
12227
12263
|
if (type.value.klass.type === 16384 && type.value.klass.value) {
|
|
12228
|
-
(0,
|
|
12264
|
+
(0, import_chunk_X7QCZR3F.forEach)(
|
|
12229
12265
|
type.value.klass.value,
|
|
12230
12266
|
(sn) => decls.push({ sn, exact: false })
|
|
12231
12267
|
);
|
|
@@ -12233,7 +12269,7 @@ function getStateNodeDeclsWithExactFromType(state, object) {
|
|
|
12233
12269
|
break;
|
|
12234
12270
|
case 4096:
|
|
12235
12271
|
case 16384:
|
|
12236
|
-
(0,
|
|
12272
|
+
(0, import_chunk_X7QCZR3F.forEach)(type.value, (sn) => decls.push({ sn, exact: true }));
|
|
12237
12273
|
break;
|
|
12238
12274
|
}
|
|
12239
12275
|
}
|
|
@@ -12266,7 +12302,7 @@ var init_types = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
12266
12302
|
init_api();
|
|
12267
12303
|
(0, import_chunk_JDC43A3I.init_ast)();
|
|
12268
12304
|
init_data_flow();
|
|
12269
|
-
(0,
|
|
12305
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
12270
12306
|
init_interp();
|
|
12271
12307
|
init_intersection_type();
|
|
12272
12308
|
init_union_type();
|
|
@@ -12326,7 +12362,7 @@ function couldBeHelper(a, b, shallow) {
|
|
|
12326
12362
|
262144
|
|
12327
12363
|
/* Typedef */
|
|
12328
12364
|
);
|
|
12329
|
-
return typedef && (0,
|
|
12365
|
+
return typedef && (0, import_chunk_X7QCZR3F.some)(typedef, (td) => {
|
|
12330
12366
|
if (!td.resolvedType) {
|
|
12331
12367
|
throw new Error(`No resolved type for ${td.fullName} in 'couldBe'`);
|
|
12332
12368
|
}
|
|
@@ -12398,15 +12434,15 @@ function couldBeValue(pair, shallow) {
|
|
|
12398
12434
|
}
|
|
12399
12435
|
case 4096:
|
|
12400
12436
|
case 8192: {
|
|
12401
|
-
return (0,
|
|
12437
|
+
return (0, import_chunk_X7QCZR3F.some)(
|
|
12402
12438
|
pair.avalue,
|
|
12403
|
-
(sna) => (0,
|
|
12439
|
+
(sna) => (0, import_chunk_X7QCZR3F.some)(pair.bvalue, (snb) => sna === snb)
|
|
12404
12440
|
);
|
|
12405
12441
|
}
|
|
12406
12442
|
case 16384: {
|
|
12407
|
-
return (0,
|
|
12443
|
+
return (0, import_chunk_X7QCZR3F.some)(pair.avalue, (sna) => {
|
|
12408
12444
|
const superA = getSuperClasses(sna);
|
|
12409
|
-
return (0,
|
|
12445
|
+
return (0, import_chunk_X7QCZR3F.some)(pair.bvalue, (snb) => {
|
|
12410
12446
|
if (sna === snb || superA && superA.has(snb)) {
|
|
12411
12447
|
return true;
|
|
12412
12448
|
}
|
|
@@ -12439,7 +12475,7 @@ var init_could_be = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
12439
12475
|
"use strict";
|
|
12440
12476
|
init_api();
|
|
12441
12477
|
init_data_flow();
|
|
12442
|
-
(0,
|
|
12478
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
12443
12479
|
init_types();
|
|
12444
12480
|
}
|
|
12445
12481
|
});
|
|
@@ -12546,7 +12582,7 @@ function findDeadStores(func, graph, nodeEquivs, findCopyPropCandidates, logThis
|
|
|
12546
12582
|
}
|
|
12547
12583
|
addAnt(curState.partiallyAnticipated, key, node);
|
|
12548
12584
|
if (logThisRun) {
|
|
12549
|
-
(0,
|
|
12585
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
12550
12586
|
` antrefs: ${curState.partiallyAnticipated.get(key) !== false} ${curState.anticipated.get(key) !== false}`
|
|
12551
12587
|
);
|
|
12552
12588
|
}
|
|
@@ -12569,7 +12605,7 @@ function findDeadStores(func, graph, nodeEquivs, findCopyPropCandidates, logThis
|
|
|
12569
12605
|
const curState = cloneState(blockStates[top.order]);
|
|
12570
12606
|
if (logThisRun) {
|
|
12571
12607
|
printBlockHeader(top);
|
|
12572
|
-
curState.dead.forEach((decl) => (0,
|
|
12608
|
+
curState.dead.forEach((decl) => (0, import_chunk_X7QCZR3F.log)(` - anticipated: ${tsKey(decl)}`));
|
|
12573
12609
|
}
|
|
12574
12610
|
if (top.events) {
|
|
12575
12611
|
for (let i = top.events.length; i--; ) {
|
|
@@ -12581,12 +12617,12 @@ function findDeadStores(func, graph, nodeEquivs, findCopyPropCandidates, logThis
|
|
|
12581
12617
|
case "ref":
|
|
12582
12618
|
if (isTypeStateKey(event.decl)) {
|
|
12583
12619
|
if (logThisRun) {
|
|
12584
|
-
(0,
|
|
12620
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
12585
12621
|
describeEvent(event).then(
|
|
12586
12622
|
(eventStr) => `${eventStr} (${sourceLocation(event.node.loc)})`
|
|
12587
12623
|
)
|
|
12588
12624
|
);
|
|
12589
|
-
(0,
|
|
12625
|
+
(0, import_chunk_X7QCZR3F.log)(` kill => ${tsKey(event.decl)}`);
|
|
12590
12626
|
}
|
|
12591
12627
|
copyPropRef(curState, event.decl, event.node);
|
|
12592
12628
|
curState.dead.delete(event.decl);
|
|
@@ -12595,7 +12631,7 @@ function findDeadStores(func, graph, nodeEquivs, findCopyPropCandidates, logThis
|
|
|
12595
12631
|
case "def":
|
|
12596
12632
|
if (isTypeStateKey(event.decl) && (event.node.type !== "VariableDeclarator" || event.node.init)) {
|
|
12597
12633
|
if (logThisRun) {
|
|
12598
|
-
(0,
|
|
12634
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
12599
12635
|
describeEvent(event).then(
|
|
12600
12636
|
(eventStr) => `${eventStr} (${sourceLocation(event.node.loc)})`
|
|
12601
12637
|
)
|
|
@@ -12611,7 +12647,7 @@ function findDeadStores(func, graph, nodeEquivs, findCopyPropCandidates, logThis
|
|
|
12611
12647
|
const pant = curState.partiallyAnticipated.get(event.decl);
|
|
12612
12648
|
if (pant) {
|
|
12613
12649
|
if (logThisRun) {
|
|
12614
|
-
(0,
|
|
12650
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
12615
12651
|
` is copy-prop-candidate ${curState.anticipated?.get(event.decl) === pant}`
|
|
12616
12652
|
);
|
|
12617
12653
|
}
|
|
@@ -12643,7 +12679,7 @@ function findDeadStores(func, graph, nodeEquivs, findCopyPropCandidates, logThis
|
|
|
12643
12679
|
if (assignNode) {
|
|
12644
12680
|
curState.dead.add(event.decl);
|
|
12645
12681
|
if (logThisRun) {
|
|
12646
|
-
(0,
|
|
12682
|
+
(0, import_chunk_X7QCZR3F.log)(` anticipated => ${tsKey(event.decl)}`);
|
|
12647
12683
|
}
|
|
12648
12684
|
} else if (event.node.type === "UpdateExpression") {
|
|
12649
12685
|
copyPropRef(curState, event.decl, event.node.argument);
|
|
@@ -12654,7 +12690,7 @@ function findDeadStores(func, graph, nodeEquivs, findCopyPropCandidates, logThis
|
|
|
12654
12690
|
if (isTypeStateKey(event.decl)) {
|
|
12655
12691
|
curState.dead.add(event.decl);
|
|
12656
12692
|
if (logThisRun) {
|
|
12657
|
-
(0,
|
|
12693
|
+
(0, import_chunk_X7QCZR3F.log)(` anticipated => ${tsKey(event.decl)}`);
|
|
12658
12694
|
}
|
|
12659
12695
|
}
|
|
12660
12696
|
break;
|
|
@@ -12717,9 +12753,9 @@ function eliminateDeadStores(state, func, graph, logThisRun) {
|
|
|
12717
12753
|
if (!deadStores.size)
|
|
12718
12754
|
return { changes: false, copyPropStores };
|
|
12719
12755
|
if (logThisRun) {
|
|
12720
|
-
(0,
|
|
12756
|
+
(0, import_chunk_X7QCZR3F.log)("====== Dead Stores =====");
|
|
12721
12757
|
deadStores.forEach(
|
|
12722
|
-
(dead) => (dead.type === "AssignmentExpression" || dead.type === "UpdateExpression" || dead.type === "VariableDeclarator") && (0,
|
|
12758
|
+
(dead) => (dead.type === "AssignmentExpression" || dead.type === "UpdateExpression" || dead.type === "VariableDeclarator") && (0, import_chunk_X7QCZR3F.log)(
|
|
12723
12759
|
formatAstLongLines(dead).then(
|
|
12724
12760
|
(deadStr) => `${deadStr} (${sourceLocation(dead.loc)})`
|
|
12725
12761
|
)
|
|
@@ -12774,7 +12810,7 @@ var init_dead_store = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
12774
12810
|
init_control_flow();
|
|
12775
12811
|
init_data_flow();
|
|
12776
12812
|
init_inliner();
|
|
12777
|
-
(0,
|
|
12813
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
12778
12814
|
init_minimize_locals();
|
|
12779
12815
|
init_type_flow_util();
|
|
12780
12816
|
}
|
|
@@ -13142,13 +13178,13 @@ function typeStateEntry(value2, key) {
|
|
|
13142
13178
|
return `${tsKey(key)} = ${display(value2.curType)}`;
|
|
13143
13179
|
}
|
|
13144
13180
|
function printBlockState(block, state, indent = "") {
|
|
13145
|
-
(0,
|
|
13181
|
+
(0, import_chunk_X7QCZR3F.log)(indent + "State:");
|
|
13146
13182
|
if (!state) {
|
|
13147
|
-
(0,
|
|
13183
|
+
(0, import_chunk_X7QCZR3F.log)(indent + "Not visited!");
|
|
13148
13184
|
return;
|
|
13149
13185
|
}
|
|
13150
13186
|
state.map.forEach((value2, key) => {
|
|
13151
|
-
(0,
|
|
13187
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
13152
13188
|
`${indent} - ${typeStateEntry(value2, key)}${value2.equivSet ? ` [(${Array.from(value2.equivSet).map(tsKey).join(", ")})]` : ""}`
|
|
13153
13189
|
);
|
|
13154
13190
|
});
|
|
@@ -13355,7 +13391,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13355
13391
|
type: 0
|
|
13356
13392
|
/* Never */
|
|
13357
13393
|
};
|
|
13358
|
-
(0,
|
|
13394
|
+
(0, import_chunk_X7QCZR3F.forEach)(avalue, (v) => unionInto(n, v));
|
|
13359
13395
|
next = n;
|
|
13360
13396
|
}
|
|
13361
13397
|
} else {
|
|
@@ -13460,7 +13496,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13460
13496
|
}
|
|
13461
13497
|
if (!isStatic && selfClassDecl) {
|
|
13462
13498
|
const baseObj = getObjectValue(baseElem.type);
|
|
13463
|
-
if (baseObj && baseObj.klass.type === 16384 && (0,
|
|
13499
|
+
if (baseObj && baseObj.klass.type === 16384 && (0, import_chunk_X7QCZR3F.some)(
|
|
13464
13500
|
baseObj.klass.value,
|
|
13465
13501
|
(cls) => cls === selfClassDecl || getSuperClasses(cls)?.has(selfClassDecl) || getSuperClasses(selfClassDecl)?.has(cls) || false
|
|
13466
13502
|
)) {
|
|
@@ -13505,7 +13541,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13505
13541
|
return [cur, updateAny];
|
|
13506
13542
|
}
|
|
13507
13543
|
function typeConstraint(decls, blockState) {
|
|
13508
|
-
return (0,
|
|
13544
|
+
return (0, import_chunk_X7QCZR3F.reduce)(
|
|
13509
13545
|
decls,
|
|
13510
13546
|
(cur, decl) => {
|
|
13511
13547
|
if (decl.type === "Identifier" || decl.type === "BinaryExpression") {
|
|
@@ -13615,9 +13651,9 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13615
13651
|
root,
|
|
13616
13652
|
dependencies
|
|
13617
13653
|
};
|
|
13618
|
-
const modifiableDecl = (decls, callees) => (0,
|
|
13654
|
+
const modifiableDecl = (decls, callees) => (0, import_chunk_X7QCZR3F.some)(
|
|
13619
13655
|
decls,
|
|
13620
|
-
(decl) => decl.type === "VariableDeclarator" && decl.node.kind === "var" && !isLocal(decl) && (!callees || (0,
|
|
13656
|
+
(decl) => decl.type === "VariableDeclarator" && decl.node.kind === "var" && !isLocal(decl) && (!callees || (0, import_chunk_X7QCZR3F.some)(callees, (callee) => functionMayModify(state, callee, decl)))
|
|
13621
13657
|
);
|
|
13622
13658
|
const mergeSuccState = (top, curState) => {
|
|
13623
13659
|
top.succs?.forEach((succ) => {
|
|
@@ -13626,7 +13662,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13626
13662
|
}
|
|
13627
13663
|
if (mergeTypeState(blockStates, succ.order, curState, nodeCopyProp)) {
|
|
13628
13664
|
if (logThisRun) {
|
|
13629
|
-
(0,
|
|
13665
|
+
(0, import_chunk_X7QCZR3F.log)(`re-merge: ${top.order} -> ${succ.order}`);
|
|
13630
13666
|
}
|
|
13631
13667
|
queue.enqueue(succ);
|
|
13632
13668
|
}
|
|
@@ -13636,7 +13672,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13636
13672
|
const calleeObj = getStateType(curState, calleeObjDecl);
|
|
13637
13673
|
let calleeResult = null;
|
|
13638
13674
|
let effectFree = true;
|
|
13639
|
-
(0,
|
|
13675
|
+
(0, import_chunk_X7QCZR3F.forEach)(callees, (callee) => {
|
|
13640
13676
|
const info = sysCallInfo(istate.state, callee);
|
|
13641
13677
|
if (!info) {
|
|
13642
13678
|
effectFree = false;
|
|
@@ -13913,7 +13949,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13913
13949
|
});
|
|
13914
13950
|
} else {
|
|
13915
13951
|
if (logThisRun) {
|
|
13916
|
-
(0,
|
|
13952
|
+
(0, import_chunk_X7QCZR3F.log)(` Flow (true): merge to ${trueSucc.order || -1}`);
|
|
13917
13953
|
printBlockState(top, sTrue || curState, " >true ");
|
|
13918
13954
|
}
|
|
13919
13955
|
if (mergeTypeState(
|
|
@@ -13923,7 +13959,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13923
13959
|
nodeCopyProp
|
|
13924
13960
|
)) {
|
|
13925
13961
|
if (logThisRun) {
|
|
13926
|
-
(0,
|
|
13962
|
+
(0, import_chunk_X7QCZR3F.log)(`re-merge: ${top.order} -> ${trueSucc.order}`);
|
|
13927
13963
|
}
|
|
13928
13964
|
queue.enqueue(trueSucc);
|
|
13929
13965
|
}
|
|
@@ -13935,7 +13971,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13935
13971
|
});
|
|
13936
13972
|
} else {
|
|
13937
13973
|
if (logThisRun) {
|
|
13938
|
-
(0,
|
|
13974
|
+
(0, import_chunk_X7QCZR3F.log)(` Flow (false): merge to: ${falseSucc.order || -1}`);
|
|
13939
13975
|
printBlockState(top, sFalse || curState, " >false ");
|
|
13940
13976
|
}
|
|
13941
13977
|
if (mergeTypeState(
|
|
@@ -13945,7 +13981,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
13945
13981
|
nodeCopyProp
|
|
13946
13982
|
)) {
|
|
13947
13983
|
if (logThisRun) {
|
|
13948
|
-
(0,
|
|
13984
|
+
(0, import_chunk_X7QCZR3F.log)(`re-merge: ${top.order} -> ${falseSucc.order}`);
|
|
13949
13985
|
}
|
|
13950
13986
|
queue.enqueue(falseSucc);
|
|
13951
13987
|
}
|
|
@@ -14035,7 +14071,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14035
14071
|
}
|
|
14036
14072
|
}
|
|
14037
14073
|
if (logThisRun) {
|
|
14038
|
-
(0,
|
|
14074
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14039
14075
|
describeEvent(event).then(
|
|
14040
14076
|
(eventStr) => ` ${eventStr} == ${display(curEntry.curType)}`
|
|
14041
14077
|
)
|
|
@@ -14045,7 +14081,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14045
14081
|
}
|
|
14046
14082
|
case "mod": {
|
|
14047
14083
|
if (logThisRun) {
|
|
14048
|
-
(0,
|
|
14084
|
+
(0, import_chunk_X7QCZR3F.log)(describeEvent(event).then((eventStr) => ` ${eventStr}`));
|
|
14049
14085
|
}
|
|
14050
14086
|
modInterference(curState, event, true, (callees, calleeObj) => {
|
|
14051
14087
|
clearRelatedCopyPropEvents(curState, null, nodeCopyProp);
|
|
@@ -14061,7 +14097,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14061
14097
|
);
|
|
14062
14098
|
}
|
|
14063
14099
|
}
|
|
14064
|
-
if (nodeCopyProp.size && event.node.type === "CallExpression" && (0,
|
|
14100
|
+
if (nodeCopyProp.size && event.node.type === "CallExpression" && (0, import_chunk_X7QCZR3F.some)(callees, (callee) => inlineRequested(state, callee))) {
|
|
14065
14101
|
event.node.arguments.forEach((arg) => {
|
|
14066
14102
|
const def = nodeCopyProp.get(arg);
|
|
14067
14103
|
if (def && nodeCopyProp.get(def) !== false) {
|
|
@@ -14073,7 +14109,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14073
14109
|
let calleeEffects;
|
|
14074
14110
|
curState.map.forEach((tsv, decl) => {
|
|
14075
14111
|
let type = tsv.curType;
|
|
14076
|
-
if ((type.value == null || !(type.type & (32768 | 512 | 1024))) && !(0,
|
|
14112
|
+
if ((type.value == null || !(type.type & (32768 | 512 | 1024))) && !(0, import_chunk_X7QCZR3F.some)(decl, (d) => d.type === "VariableDeclarator" && !isLocal(d))) {
|
|
14077
14113
|
return;
|
|
14078
14114
|
}
|
|
14079
14115
|
if (modifiableDecl(decl, callees)) {
|
|
@@ -14088,7 +14124,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14088
14124
|
curState.map.set(decl, {
|
|
14089
14125
|
curType: typeConstraint(decl, curState)
|
|
14090
14126
|
});
|
|
14091
|
-
} else if (type.type & (32768 | 512 | 1024) && (calleeEffects == null ? calleeEffects = !callees || !(0,
|
|
14127
|
+
} else if (type.type & (32768 | 512 | 1024) && (calleeEffects == null ? calleeEffects = !callees || !(0, import_chunk_X7QCZR3F.every)(callees, (callee) => callee.info === false) : calleeEffects)) {
|
|
14092
14128
|
if (type.value != null && type.type & 32768) {
|
|
14093
14129
|
const odata = getObjectValue(tsv.curType);
|
|
14094
14130
|
if (odata?.obj) {
|
|
@@ -14158,13 +14194,13 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14158
14194
|
);
|
|
14159
14195
|
if (type.type !== 524287) {
|
|
14160
14196
|
if (event.node.type === "EnumStringMember" || event.node.type === "VariableDeclarator" && event.node.kind === "const") {
|
|
14161
|
-
(0,
|
|
14197
|
+
(0, import_chunk_X7QCZR3F.forEach)(
|
|
14162
14198
|
event.decl,
|
|
14163
14199
|
(decl) => (decl.type === "VariableDeclarator" ? decl.node === event.node : decl === event.node) && (decl.resolvedType = type)
|
|
14164
14200
|
);
|
|
14165
14201
|
}
|
|
14166
14202
|
}
|
|
14167
|
-
(0,
|
|
14203
|
+
(0, import_chunk_X7QCZR3F.some)(event.decl, (decl) => {
|
|
14168
14204
|
if (decl.type !== "VariableDeclarator" || decl.node.kind !== "var" || !isClassVariable(decl)) {
|
|
14169
14205
|
return false;
|
|
14170
14206
|
}
|
|
@@ -14172,7 +14208,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14172
14208
|
if (affected) {
|
|
14173
14209
|
const objType = typeFromTypeStateNodes(
|
|
14174
14210
|
istate.state,
|
|
14175
|
-
(0,
|
|
14211
|
+
(0, import_chunk_X7QCZR3F.map)(
|
|
14176
14212
|
event.decl,
|
|
14177
14213
|
(decl2) => decl2.type === "VariableDeclarator" && decl2.stack[decl2.stack.length - 1].sn
|
|
14178
14214
|
).filter(
|
|
@@ -14193,7 +14229,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14193
14229
|
});
|
|
14194
14230
|
if (wasComputedDecl) {
|
|
14195
14231
|
curState.map.forEach((value2, decls) => {
|
|
14196
|
-
if ((0,
|
|
14232
|
+
if ((0, import_chunk_X7QCZR3F.some)(
|
|
14197
14233
|
decls,
|
|
14198
14234
|
(decl) => decl.type === "VariableDeclarator" && decl.node.kind === "var" && !isLocal(decl)
|
|
14199
14235
|
)) {
|
|
@@ -14239,14 +14275,14 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14239
14275
|
}
|
|
14240
14276
|
if (!copyPropCandidate.ant || // If the ref isn't anticipated, we can't propagate it
|
|
14241
14277
|
// in case it has side effects.
|
|
14242
|
-
(0,
|
|
14278
|
+
(0, import_chunk_X7QCZR3F.some)(
|
|
14243
14279
|
event2.calleeDecl,
|
|
14244
14280
|
(callee) => callee.type === "FunctionDeclaration" && inlineRequested(state, callee)
|
|
14245
14281
|
)) {
|
|
14246
14282
|
return false;
|
|
14247
14283
|
}
|
|
14248
14284
|
}
|
|
14249
|
-
if (!event2.decl || isTypeStateKey(event2.decl) && (0,
|
|
14285
|
+
if (!event2.decl || isTypeStateKey(event2.decl) && (0, import_chunk_X7QCZR3F.some)(
|
|
14250
14286
|
event2.decl,
|
|
14251
14287
|
(decl) => decl.type === "VariableDeclarator" && decl.node.kind === "var" || decl.type === "BinaryExpression" || decl.type === "Identifier"
|
|
14252
14288
|
)) {
|
|
@@ -14285,13 +14321,13 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14285
14321
|
}
|
|
14286
14322
|
}
|
|
14287
14323
|
if (uninitClassDecls?.size) {
|
|
14288
|
-
(0,
|
|
14324
|
+
(0, import_chunk_X7QCZR3F.forEach)(
|
|
14289
14325
|
event.decl,
|
|
14290
14326
|
(decl) => uninitClassDecls.has(decl) && curState.inited?.add(decl)
|
|
14291
14327
|
);
|
|
14292
14328
|
}
|
|
14293
14329
|
if (logThisRun) {
|
|
14294
|
-
(0,
|
|
14330
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14295
14331
|
describeEvent(event).then(
|
|
14296
14332
|
(eventStr) => ` ${eventStr} := ${display(type)}`
|
|
14297
14333
|
)
|
|
@@ -14309,7 +14345,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14309
14345
|
);
|
|
14310
14346
|
}
|
|
14311
14347
|
if (logThisRun) {
|
|
14312
|
-
(0,
|
|
14348
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14313
14349
|
describeEvent(event).then(
|
|
14314
14350
|
(eventStr) => ` ${eventStr} : ${!Array.isArray(event.left) && event.left.type === "MemberDecl" ? `${display(
|
|
14315
14351
|
curState.map.get(event.left.base)?.curType || {
|
|
@@ -14369,8 +14405,8 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14369
14405
|
}
|
|
14370
14406
|
if (!successorsHandled) {
|
|
14371
14407
|
if (logThisRun) {
|
|
14372
|
-
(0,
|
|
14373
|
-
` merge to: ${(0,
|
|
14408
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14409
|
+
` merge to: ${(0, import_chunk_X7QCZR3F.map)(
|
|
14374
14410
|
top.succs,
|
|
14375
14411
|
(succ) => succ.order || -1
|
|
14376
14412
|
).join(", ")}`
|
|
@@ -14395,7 +14431,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14395
14431
|
(block) => block.events?.forEach((event) => {
|
|
14396
14432
|
if (event.type !== "ref")
|
|
14397
14433
|
return;
|
|
14398
|
-
(0,
|
|
14434
|
+
(0, import_chunk_X7QCZR3F.forEach)(event.decl, (decl) => {
|
|
14399
14435
|
if (decl.type === "VariableDeclarator" && decl.node.kind === "const" && (!decl.resolvedType || !hasValue(decl.resolvedType))) {
|
|
14400
14436
|
const root2 = decl.stack.at(-1)?.sn;
|
|
14401
14437
|
if (!root2 || root2.type !== "ModuleDeclaration" && root2.type !== "ClassDeclaration" && root2.type !== "Program") {
|
|
@@ -14435,17 +14471,17 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14435
14471
|
);
|
|
14436
14472
|
printBlockTrailer(block);
|
|
14437
14473
|
});
|
|
14438
|
-
(0,
|
|
14474
|
+
(0, import_chunk_X7QCZR3F.log)("====== TypeMap =====");
|
|
14439
14475
|
typeMap.forEach((value2, key) => {
|
|
14440
|
-
(0,
|
|
14476
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14441
14477
|
formatAstLongLines(key).then(
|
|
14442
14478
|
(keyStr) => `${keyStr} = ${display(value2)} ${key.loc && key.loc.source ? ` (${sourceLocation(key.loc)})` : ""}`
|
|
14443
14479
|
)
|
|
14444
14480
|
);
|
|
14445
14481
|
});
|
|
14446
|
-
(0,
|
|
14482
|
+
(0, import_chunk_X7QCZR3F.log)("====== EquivMap =====");
|
|
14447
14483
|
nodeEquivs.forEach((value2, key) => {
|
|
14448
|
-
(0,
|
|
14484
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14449
14485
|
formatAstLongLines(key).then(
|
|
14450
14486
|
(keyStr) => `${keyStr} = [${value2.equiv.map(
|
|
14451
14487
|
(equiv) => tsKey(equiv)
|
|
@@ -14453,7 +14489,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14453
14489
|
)
|
|
14454
14490
|
);
|
|
14455
14491
|
});
|
|
14456
|
-
(0,
|
|
14492
|
+
(0, import_chunk_X7QCZR3F.log)("====== Copy Prop =====");
|
|
14457
14493
|
nodeCopyProp.forEach((value2, key) => {
|
|
14458
14494
|
(0, import_node_assert3.default)(value2 !== false);
|
|
14459
14495
|
if (key.type === "VariableDeclarator" || key.type === "AssignmentExpression") {
|
|
@@ -14463,7 +14499,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14463
14499
|
value2.type === "VariableDeclarator" && value2.init || value2.type === "AssignmentExpression"
|
|
14464
14500
|
);
|
|
14465
14501
|
const node = value2.type === "VariableDeclarator" ? value2.init : value2.right;
|
|
14466
|
-
(0,
|
|
14502
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14467
14503
|
formatAstLongLines(key).then(
|
|
14468
14504
|
(keyStr) => formatAstLongLines(node).then(
|
|
14469
14505
|
(nodeStr) => `${keyStr} = [${nodeStr}] ${key.loc && key.loc.source ? ` (${sourceLocation(key.loc)})` : ""}`
|
|
@@ -14472,13 +14508,13 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14472
14508
|
);
|
|
14473
14509
|
});
|
|
14474
14510
|
if (root.nodes) {
|
|
14475
|
-
root.nodes.forEach((stack, node) => (0,
|
|
14511
|
+
root.nodes.forEach((stack, node) => (0, import_chunk_X7QCZR3F.log)(formatAstLongLines(node)));
|
|
14476
14512
|
} else {
|
|
14477
|
-
(0,
|
|
14513
|
+
(0, import_chunk_X7QCZR3F.log)(formatAstLongLines(root.node));
|
|
14478
14514
|
}
|
|
14479
14515
|
if (copyPropStores) {
|
|
14480
14516
|
copyPropStores.forEach(({ ref, ant }, node) => {
|
|
14481
|
-
(0,
|
|
14517
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14482
14518
|
formatAstLongLines(node).then(
|
|
14483
14519
|
(nodeStr) => `copy-prop-store: ${nodeStr}${ant ? "!" : ""} => ${nodeCopyProp.get(node) !== ref ? "Failed" : "Success"}`
|
|
14484
14520
|
)
|
|
@@ -14492,9 +14528,9 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14492
14528
|
}
|
|
14493
14529
|
if (logThisRun) {
|
|
14494
14530
|
if (selfAssignments.size) {
|
|
14495
|
-
(0,
|
|
14531
|
+
(0, import_chunk_X7QCZR3F.log)("====== Self Assignments =====");
|
|
14496
14532
|
selfAssignments.forEach(
|
|
14497
|
-
(self) => (0,
|
|
14533
|
+
(self) => (0, import_chunk_X7QCZR3F.log)(
|
|
14498
14534
|
formatAstLongLines(self).then(
|
|
14499
14535
|
(selfStr) => `${selfStr} (${sourceLocation(self.loc)})`
|
|
14500
14536
|
)
|
|
@@ -14559,7 +14595,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14559
14595
|
if (copyNode) {
|
|
14560
14596
|
if (node.type === "AssignmentExpression") {
|
|
14561
14597
|
if (logThisRun) {
|
|
14562
|
-
(0,
|
|
14598
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14563
14599
|
formatAstLongLines(node).then(
|
|
14564
14600
|
(nodeStr) => `Killing copy-prop assignment ${nodeStr}`
|
|
14565
14601
|
)
|
|
@@ -14574,7 +14610,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14574
14610
|
if (node.type === "VariableDeclarator") {
|
|
14575
14611
|
(0, import_node_assert3.default)(node.init);
|
|
14576
14612
|
if (logThisRun) {
|
|
14577
|
-
(0,
|
|
14613
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14578
14614
|
formatAstLongLines(node).then(
|
|
14579
14615
|
(nodeStr) => `Killing copy-prop variable initialization ${nodeStr}`
|
|
14580
14616
|
)
|
|
@@ -14595,7 +14631,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14595
14631
|
right: copyNode.right
|
|
14596
14632
|
};
|
|
14597
14633
|
if (logThisRun) {
|
|
14598
|
-
(0,
|
|
14634
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14599
14635
|
formatAstLongLines(node).then(
|
|
14600
14636
|
(nodeStr) => formatAstLongLines(replacement2).then(
|
|
14601
14637
|
(repStr) => `copy-prop ${nodeStr} => ${repStr}`
|
|
@@ -14608,7 +14644,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14608
14644
|
const init = copyNode.init;
|
|
14609
14645
|
(0, import_node_assert3.default)(init);
|
|
14610
14646
|
if (logThisRun) {
|
|
14611
|
-
(0,
|
|
14647
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14612
14648
|
formatAstLongLines(node).then(
|
|
14613
14649
|
(nodeStr) => formatAstLongLines(init).then(
|
|
14614
14650
|
(initStr) => `copy-prop ${nodeStr} => ${initStr}`
|
|
@@ -14622,7 +14658,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14622
14658
|
}
|
|
14623
14659
|
if (selfAssignments.has(node)) {
|
|
14624
14660
|
if (logThisRun) {
|
|
14625
|
-
(0,
|
|
14661
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14626
14662
|
formatAstLongLines(node).then(
|
|
14627
14663
|
(nodeStr) => `Deleting self assignment: ${nodeStr} (${sourceLocation(
|
|
14628
14664
|
node.loc
|
|
@@ -14666,7 +14702,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14666
14702
|
}, curInfo);
|
|
14667
14703
|
if (rep === curInfo)
|
|
14668
14704
|
return null;
|
|
14669
|
-
const name = (0,
|
|
14705
|
+
const name = (0, import_chunk_X7QCZR3F.reduce)(
|
|
14670
14706
|
rep.decl,
|
|
14671
14707
|
(cur, decl) => decl.type === "VariableDeclarator" ? decl.name : cur,
|
|
14672
14708
|
null
|
|
@@ -14674,7 +14710,7 @@ function propagateTypes(state, root, graph, optimizeEquivalencies, copyPropStore
|
|
|
14674
14710
|
if (!name)
|
|
14675
14711
|
return null;
|
|
14676
14712
|
if (logThisRun) {
|
|
14677
|
-
(0,
|
|
14713
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
14678
14714
|
formatAstLongLines(node).then(
|
|
14679
14715
|
(nodeStr) => `Replacing ${nodeStr} with ${name} at ${sourceLocation(
|
|
14680
14716
|
node.loc
|
|
@@ -14805,7 +14841,7 @@ var init_type_flow = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
14805
14841
|
init_type_flow_util();
|
|
14806
14842
|
init_types();
|
|
14807
14843
|
init_union_type();
|
|
14808
|
-
(0,
|
|
14844
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
14809
14845
|
logging = true;
|
|
14810
14846
|
missingNullWorkaround = true;
|
|
14811
14847
|
}
|
|
@@ -14857,9 +14893,9 @@ function minimizeLocals(state, func) {
|
|
|
14857
14893
|
if (!didMerge)
|
|
14858
14894
|
return;
|
|
14859
14895
|
if (logThisRun) {
|
|
14860
|
-
(0,
|
|
14896
|
+
(0, import_chunk_X7QCZR3F.log)(`>>> Merging locals in ${func.fullName}`);
|
|
14861
14897
|
merge.forEach(
|
|
14862
|
-
(merged) => merged.length > 1 && (0,
|
|
14898
|
+
(merged) => merged.length > 1 && (0, import_chunk_X7QCZR3F.log)(` - merging ${merged.map((k) => tsKey(k)).join(" | ")}`)
|
|
14863
14899
|
);
|
|
14864
14900
|
}
|
|
14865
14901
|
const remap = /* @__PURE__ */ new Map();
|
|
@@ -15129,7 +15165,7 @@ var init_minimize_locals = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
15129
15165
|
(0, import_chunk_JDC43A3I.init_ast)();
|
|
15130
15166
|
init_control_flow();
|
|
15131
15167
|
init_type_flow();
|
|
15132
|
-
(0,
|
|
15168
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
15133
15169
|
init_variable_renamer();
|
|
15134
15170
|
init_type_flow_util();
|
|
15135
15171
|
}
|
|
@@ -15140,12 +15176,12 @@ function logAntState(s, decl) {
|
|
|
15140
15176
|
defs2++;
|
|
15141
15177
|
return defs2;
|
|
15142
15178
|
}, 0);
|
|
15143
|
-
(0,
|
|
15179
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
15144
15180
|
declFullName(decl).then(
|
|
15145
15181
|
(declStr) => ` - ${declStr}: ${candidateCost(s)} bytes, ${s.ant.size - defs} refs, ${defs} defs, ${s.live ? "" : "!"}live, ${s.isIsolated ? "" : "!"}isolated`
|
|
15146
15182
|
)
|
|
15147
15183
|
);
|
|
15148
|
-
(0,
|
|
15184
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
15149
15185
|
` - members: ${Array.from(s.members).map(([block, live]) => block.order + (live ? "t" : "f")).join(", ")}`
|
|
15150
15186
|
);
|
|
15151
15187
|
}
|
|
@@ -15162,7 +15198,7 @@ async function sizeBasedPRE(state, func) {
|
|
|
15162
15198
|
const candidates = computeAttributes(state, head);
|
|
15163
15199
|
if (candidates) {
|
|
15164
15200
|
if (logging2) {
|
|
15165
|
-
(0,
|
|
15201
|
+
(0, import_chunk_X7QCZR3F.log)(`Found ${candidates.size} candidates in ${func.fullName}`);
|
|
15166
15202
|
logAntDecls(candidates);
|
|
15167
15203
|
}
|
|
15168
15204
|
const nodeMap = /* @__PURE__ */ new Map();
|
|
@@ -15255,7 +15291,7 @@ function buildPREGraph(state, func) {
|
|
|
15255
15291
|
const event = block.events[i];
|
|
15256
15292
|
switch (event.type) {
|
|
15257
15293
|
case "ref":
|
|
15258
|
-
if ((0,
|
|
15294
|
+
if ((0, import_chunk_X7QCZR3F.some)(
|
|
15259
15295
|
event.decl,
|
|
15260
15296
|
(decl) => decl.type === "Literal" || decl.type === "VariableDeclarator" && decl.node.kind === "const"
|
|
15261
15297
|
)) {
|
|
@@ -15273,7 +15309,7 @@ function buildPREGraph(state, func) {
|
|
|
15273
15309
|
defs.add(event.decl);
|
|
15274
15310
|
break;
|
|
15275
15311
|
case "mod":
|
|
15276
|
-
if (event.callees && (0,
|
|
15312
|
+
if (event.callees && (0, import_chunk_X7QCZR3F.every)(event.callees, (callee) => callee.info === false)) {
|
|
15277
15313
|
block.events.splice(i, 1);
|
|
15278
15314
|
break;
|
|
15279
15315
|
}
|
|
@@ -15432,21 +15468,21 @@ function computeAttributes(state, head) {
|
|
|
15432
15468
|
});
|
|
15433
15469
|
if (logging2) {
|
|
15434
15470
|
order.forEach((block) => {
|
|
15435
|
-
(0,
|
|
15471
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
15436
15472
|
block.order,
|
|
15437
15473
|
`(${block.node ? block.node.loc?.start.line : "??"})`,
|
|
15438
15474
|
`Preds: ${(block.preds || []).map((block2) => block2.order).join(", ")}`
|
|
15439
15475
|
);
|
|
15440
15476
|
if (block.events) {
|
|
15441
15477
|
block.events.forEach(
|
|
15442
|
-
(event) => event.type !== "exn" && (0,
|
|
15478
|
+
(event) => event.type !== "exn" && (0, import_chunk_X7QCZR3F.log)(
|
|
15443
15479
|
Promise.resolve(
|
|
15444
15480
|
event.decl ? declFullName(event.decl) : event.node ? formatAstLongLines(event.node) : "??"
|
|
15445
15481
|
).then((eventDetails) => ` ${event.type}: ${eventDetails}`)
|
|
15446
15482
|
)
|
|
15447
15483
|
);
|
|
15448
15484
|
}
|
|
15449
|
-
(0,
|
|
15485
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
15450
15486
|
`Succs: ${(block.succs || []).map((block2) => block2.order).join(", ")} ExSucc: ${block.exsucc ? block.exsucc.order : ""}`
|
|
15451
15487
|
);
|
|
15452
15488
|
});
|
|
@@ -15514,7 +15550,7 @@ function computeAttributes(state, head) {
|
|
|
15514
15550
|
}
|
|
15515
15551
|
case "mod": {
|
|
15516
15552
|
curState.forEach((candidates, decls) => {
|
|
15517
|
-
if ((0,
|
|
15553
|
+
if ((0, import_chunk_X7QCZR3F.some)(
|
|
15518
15554
|
decls,
|
|
15519
15555
|
(decl) => decl.type === "VariableDeclarator" && decl.node.kind === "var" && candidates.live && (!event.callees || event.callees.some(
|
|
15520
15556
|
(callee) => functionMayModify(state, callee, decl)
|
|
@@ -15556,7 +15592,7 @@ function computeAttributes(state, head) {
|
|
|
15556
15592
|
}
|
|
15557
15593
|
blockStates[top.order] = curState;
|
|
15558
15594
|
if (logging2) {
|
|
15559
|
-
(0,
|
|
15595
|
+
(0, import_chunk_X7QCZR3F.log)(`Updated block ${top.order}`);
|
|
15560
15596
|
logAntDecls(curState);
|
|
15561
15597
|
}
|
|
15562
15598
|
if (top.preds) {
|
|
@@ -15658,7 +15694,7 @@ function applyReplacements(func, nodeMap, declMap) {
|
|
|
15658
15694
|
}
|
|
15659
15695
|
const name = declMap.get(event.decl);
|
|
15660
15696
|
if (!name) {
|
|
15661
|
-
throw new
|
|
15697
|
+
throw new import_chunk_X7QCZR3F.AwaitedError(
|
|
15662
15698
|
formatAstLongLines(node).then(
|
|
15663
15699
|
(targetStr) => `No replacement found for "${targetStr}"`
|
|
15664
15700
|
)
|
|
@@ -15680,7 +15716,7 @@ function applyReplacements(func, nodeMap, declMap) {
|
|
|
15680
15716
|
const target = node.type === "AssignmentExpression" ? node.left : node.argument;
|
|
15681
15717
|
const name = declMap.get(event.decl);
|
|
15682
15718
|
if (!name) {
|
|
15683
|
-
throw new
|
|
15719
|
+
throw new import_chunk_X7QCZR3F.AwaitedError(
|
|
15684
15720
|
formatAstLongLines(target).then(
|
|
15685
15721
|
(targetStr) => `No replacement found for "${targetStr}"`
|
|
15686
15722
|
)
|
|
@@ -15743,14 +15779,14 @@ function applyReplacements(func, nodeMap, declMap) {
|
|
|
15743
15779
|
const decl = event.decl;
|
|
15744
15780
|
const name = declMap.get(decl);
|
|
15745
15781
|
if (!name) {
|
|
15746
|
-
throw new
|
|
15782
|
+
throw new import_chunk_X7QCZR3F.AwaitedError(
|
|
15747
15783
|
declFullName(decl).then(
|
|
15748
15784
|
(declStr) => `No replacement found for "${declStr}"`
|
|
15749
15785
|
)
|
|
15750
15786
|
);
|
|
15751
15787
|
}
|
|
15752
15788
|
if (!event.id) {
|
|
15753
|
-
throw new
|
|
15789
|
+
throw new import_chunk_X7QCZR3F.AwaitedError(
|
|
15754
15790
|
declFullName(decl).then(
|
|
15755
15791
|
(declStr) => `Missing id for mod event for "${declStr}"`
|
|
15756
15792
|
)
|
|
@@ -15815,7 +15851,7 @@ var init_pre = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
15815
15851
|
init_data_flow();
|
|
15816
15852
|
init_function_info();
|
|
15817
15853
|
init_minimize_locals();
|
|
15818
|
-
(0,
|
|
15854
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
15819
15855
|
logging2 = false;
|
|
15820
15856
|
LocalRefCost = 2;
|
|
15821
15857
|
}
|
|
@@ -16187,7 +16223,7 @@ function beforeEvaluate(istate, node) {
|
|
|
16187
16223
|
break;
|
|
16188
16224
|
}
|
|
16189
16225
|
const id = node.right.argument;
|
|
16190
|
-
if ((0,
|
|
16226
|
+
if ((0, import_chunk_X7QCZR3F.every)(left.value.value, (m) => {
|
|
16191
16227
|
if ((0, import_chunk_JDC43A3I.hasProperty)(m.decls, id.name))
|
|
16192
16228
|
return false;
|
|
16193
16229
|
return istate.state.lookup({
|
|
@@ -16633,7 +16669,7 @@ var init_optimize = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
16633
16669
|
(0, import_chunk_JDC43A3I.init_ast)();
|
|
16634
16670
|
init_inliner();
|
|
16635
16671
|
init_type_flow();
|
|
16636
|
-
(0,
|
|
16672
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
16637
16673
|
init_interp();
|
|
16638
16674
|
init_interp_binary();
|
|
16639
16675
|
init_types();
|
|
@@ -17220,11 +17256,11 @@ function markFunctionCalled(state, func) {
|
|
|
17220
17256
|
state.calledFunctions[func.id.name] = [func];
|
|
17221
17257
|
return;
|
|
17222
17258
|
}
|
|
17223
|
-
(0,
|
|
17259
|
+
(0, import_chunk_X7QCZR3F.pushUnique)(state.calledFunctions[func.id.name], func);
|
|
17224
17260
|
}
|
|
17225
17261
|
function optimizeMonkeyC(fnMap, resourcesMap, manifestXML, config) {
|
|
17226
17262
|
return optimizeMonkeyCHelper(fnMap, resourcesMap, manifestXML, config).catch(
|
|
17227
|
-
(ex) => Promise.reject(ex instanceof
|
|
17263
|
+
(ex) => Promise.reject(ex instanceof import_chunk_X7QCZR3F.AwaitedError ? ex.resolve() : ex)
|
|
17228
17264
|
);
|
|
17229
17265
|
}
|
|
17230
17266
|
async function optimizeMonkeyCHelper(fnMap, resourcesMap, manifestXML, config) {
|
|
@@ -17992,7 +18028,7 @@ var init_mc_rewrite = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
17992
18028
|
init_sub_type();
|
|
17993
18029
|
init_types();
|
|
17994
18030
|
init_unused_exprs();
|
|
17995
|
-
(0,
|
|
18031
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
17996
18032
|
init_variable_renamer();
|
|
17997
18033
|
}
|
|
17998
18034
|
});
|
|
@@ -18971,7 +19007,7 @@ async function getApiMapping(state, resourcesMap, manifestXML) {
|
|
|
18971
19007
|
throw `Negative constant ${fixup} was not a Literal`;
|
|
18972
19008
|
}
|
|
18973
19009
|
if (typeof init.value !== "number") {
|
|
18974
|
-
(0,
|
|
19010
|
+
(0, import_chunk_X7QCZR3F.log)(`Negative fixup ${fixup} was not a number!`);
|
|
18975
19011
|
} else if (init.value > 0) {
|
|
18976
19012
|
init.value = -init.value;
|
|
18977
19013
|
init.raw = "-" + init.raw;
|
|
@@ -19061,11 +19097,11 @@ function sameStateNodeDecl(a, b) {
|
|
|
19061
19097
|
function sameLookupDefinition(a, b) {
|
|
19062
19098
|
return (
|
|
19063
19099
|
// sameStateNodeDecl(a.parent, b.parent) &&
|
|
19064
|
-
(0,
|
|
19100
|
+
(0, import_chunk_X7QCZR3F.sameArrays)(a.results, b.results, (ar, br) => sameStateNodeDecl(ar, br))
|
|
19065
19101
|
);
|
|
19066
19102
|
}
|
|
19067
19103
|
function sameLookupResult(a, b) {
|
|
19068
|
-
return (0,
|
|
19104
|
+
return (0, import_chunk_X7QCZR3F.sameArrays)(a, b, sameLookupDefinition);
|
|
19069
19105
|
}
|
|
19070
19106
|
function declKey(decl) {
|
|
19071
19107
|
return isStateNode(decl) ? decl.type === "ModuleDeclaration" ? decl.fullName : decl.node : decl;
|
|
@@ -19654,7 +19690,7 @@ function stateFuncs() {
|
|
|
19654
19690
|
if (!(0, import_chunk_JDC43A3I.hasProperty)(this.index, name)) {
|
|
19655
19691
|
this.index[name] = [];
|
|
19656
19692
|
}
|
|
19657
|
-
(0,
|
|
19693
|
+
(0, import_chunk_X7QCZR3F.pushUnique)(this.index[name], parent);
|
|
19658
19694
|
}
|
|
19659
19695
|
});
|
|
19660
19696
|
break;
|
|
@@ -19709,7 +19745,7 @@ function stateFuncs() {
|
|
|
19709
19745
|
if (!(0, import_chunk_JDC43A3I.hasProperty)(values, name)) {
|
|
19710
19746
|
values[name] = [];
|
|
19711
19747
|
}
|
|
19712
|
-
if ((0,
|
|
19748
|
+
if ((0, import_chunk_X7QCZR3F.pushUnique)(values[name], m) && currentEnum) {
|
|
19713
19749
|
if (!this.enumMap)
|
|
19714
19750
|
this.enumMap = /* @__PURE__ */ new Map();
|
|
19715
19751
|
this.enumMap.set(m, currentEnum);
|
|
@@ -19717,7 +19753,7 @@ function stateFuncs() {
|
|
|
19717
19753
|
if (!(0, import_chunk_JDC43A3I.hasProperty)(this.index, name)) {
|
|
19718
19754
|
this.index[name] = [];
|
|
19719
19755
|
}
|
|
19720
|
-
(0,
|
|
19756
|
+
(0, import_chunk_X7QCZR3F.pushUnique)(this.index[name], parent);
|
|
19721
19757
|
});
|
|
19722
19758
|
break;
|
|
19723
19759
|
}
|
|
@@ -20248,7 +20284,7 @@ var init_api = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
20248
20284
|
init_sdk_util();
|
|
20249
20285
|
init_type_flow_util();
|
|
20250
20286
|
init_types();
|
|
20251
|
-
(0,
|
|
20287
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
20252
20288
|
init_visitor();
|
|
20253
20289
|
}
|
|
20254
20290
|
});
|
|
@@ -20332,7 +20368,7 @@ function buildDataFlowGraph(state, root, wantsLiteral, trackInsertionPoints, wan
|
|
|
20332
20368
|
return decls;
|
|
20333
20369
|
}
|
|
20334
20370
|
if (canon.length !== decls.length || !canon.every((v, i) => v === decls[i])) {
|
|
20335
|
-
throw new
|
|
20371
|
+
throw new import_chunk_X7QCZR3F.AwaitedError(
|
|
20336
20372
|
declFullName(canon).then(
|
|
20337
20373
|
(canonStr) => `Canonical representation of ${canonStr} did not match`
|
|
20338
20374
|
)
|
|
@@ -20366,7 +20402,7 @@ function buildDataFlowGraph(state, root, wantsLiteral, trackInsertionPoints, wan
|
|
|
20366
20402
|
}
|
|
20367
20403
|
const decl = lookupDefToDecl(results);
|
|
20368
20404
|
if (decl && path7.length) {
|
|
20369
|
-
if (wantsAllRefs && (0,
|
|
20405
|
+
if (wantsAllRefs && (0, import_chunk_X7QCZR3F.every)(
|
|
20370
20406
|
decl,
|
|
20371
20407
|
(d) => d.type === "VariableDeclarator" || d.type === "BinaryExpression" || d.type === "Identifier"
|
|
20372
20408
|
)) {
|
|
@@ -20418,7 +20454,7 @@ function buildDataFlowGraph(state, root, wantsLiteral, trackInsertionPoints, wan
|
|
|
20418
20454
|
}
|
|
20419
20455
|
const v = liveDefs.get(def);
|
|
20420
20456
|
if (!v || !v.has(node)) {
|
|
20421
|
-
throw new
|
|
20457
|
+
throw new import_chunk_X7QCZR3F.AwaitedError(
|
|
20422
20458
|
Promise.resolve(def ? declFullName(def) : "null").then(
|
|
20423
20459
|
(defStr) => `No stmt in liveDef for ${defStr}`
|
|
20424
20460
|
)
|
|
@@ -20490,7 +20526,7 @@ function buildDataFlowGraph(state, root, wantsLiteral, trackInsertionPoints, wan
|
|
|
20490
20526
|
const decls = findDecl(node);
|
|
20491
20527
|
if (!decls)
|
|
20492
20528
|
break;
|
|
20493
|
-
if (trackInsertionPoints && (0,
|
|
20529
|
+
if (trackInsertionPoints && (0, import_chunk_X7QCZR3F.some)(decls, (decl) => {
|
|
20494
20530
|
if (decl.type === "VariableDeclarator") {
|
|
20495
20531
|
const defStmts = decl.node.kind === "var" && liveDefs.get(null) || liveDefs.get(decl);
|
|
20496
20532
|
if (defStmts) {
|
|
@@ -20757,8 +20793,8 @@ var init_data_flow = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
20757
20793
|
init_control_flow();
|
|
20758
20794
|
init_function_info();
|
|
20759
20795
|
init_type_flow_util();
|
|
20760
|
-
(0,
|
|
20761
|
-
DataflowQueue = class extends
|
|
20796
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
20797
|
+
DataflowQueue = class extends import_chunk_X7QCZR3F.GenericQueue {
|
|
20762
20798
|
constructor() {
|
|
20763
20799
|
super((b, a) => (a.order || 0) - (b.order || 0));
|
|
20764
20800
|
}
|
|
@@ -21553,7 +21589,7 @@ function computeJsrMap(func) {
|
|
|
21553
21589
|
}
|
|
21554
21590
|
function postOrderPropagate(func, preBlock, processBc, postBlock, merge) {
|
|
21555
21591
|
const order = /* @__PURE__ */ new Map();
|
|
21556
|
-
const queue = new
|
|
21592
|
+
const queue = new import_chunk_X7QCZR3F.GenericQueue(
|
|
21557
21593
|
(b, a) => order.get(a) - order.get(b)
|
|
21558
21594
|
);
|
|
21559
21595
|
postOrderTraverse2(func, (block) => {
|
|
@@ -21612,7 +21648,7 @@ function rpoPropagate(func, preBlock, processBc, postBlock, merge) {
|
|
|
21612
21648
|
});
|
|
21613
21649
|
blocks.reverse().forEach((block, i) => order.set(block, i));
|
|
21614
21650
|
}
|
|
21615
|
-
const queue = new
|
|
21651
|
+
const queue = new import_chunk_X7QCZR3F.GenericQueue(
|
|
21616
21652
|
(b, a) => order.get(a) - order.get(b)
|
|
21617
21653
|
);
|
|
21618
21654
|
queue.enqueue(func.blocks.get(func.offset));
|
|
@@ -21666,7 +21702,7 @@ function rpoPropagate(func, preBlock, processBc, postBlock, merge) {
|
|
|
21666
21702
|
var init_cflow = (0, import_chunk_ABYVSU2C.__esm)({
|
|
21667
21703
|
"src/readprg/cflow.ts"() {
|
|
21668
21704
|
"use strict";
|
|
21669
|
-
(0,
|
|
21705
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
21670
21706
|
init_opcodes();
|
|
21671
21707
|
}
|
|
21672
21708
|
});
|
|
@@ -22129,12 +22165,12 @@ function interpFunc(func, context) {
|
|
|
22129
22165
|
const selfStores = /* @__PURE__ */ new Set();
|
|
22130
22166
|
const liveInState = /* @__PURE__ */ new Map();
|
|
22131
22167
|
const replacements = /* @__PURE__ */ new Map();
|
|
22132
|
-
const interpLogging = (0,
|
|
22168
|
+
const interpLogging = (0, import_chunk_X7QCZR3F.wouldLog)("interp", 1);
|
|
22133
22169
|
if (interpLogging) {
|
|
22134
|
-
if ((0,
|
|
22135
|
-
(0,
|
|
22136
|
-
} else if ((0,
|
|
22137
|
-
(0,
|
|
22170
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("interp", 7)) {
|
|
22171
|
+
(0, import_chunk_X7QCZR3F.setBanner)(functionBanner(func, context, "interp"));
|
|
22172
|
+
} else if ((0, import_chunk_X7QCZR3F.wouldLog)("interp", 3)) {
|
|
22173
|
+
(0, import_chunk_X7QCZR3F.setBanner)(
|
|
22138
22174
|
() => `+++++++++++++ interp-prepare ${func.name} ++++++++++++++`
|
|
22139
22175
|
);
|
|
22140
22176
|
}
|
|
@@ -22168,20 +22204,20 @@ function interpFunc(func, context) {
|
|
|
22168
22204
|
func,
|
|
22169
22205
|
(block) => {
|
|
22170
22206
|
if (interpLogging) {
|
|
22171
|
-
(0,
|
|
22207
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
22172
22208
|
"interp",
|
|
22173
22209
|
3,
|
|
22174
22210
|
`${offsetToString(block.offset)}: ${block.bytecodes[0]?.lineNum ? lineInfoToString(block.bytecodes[0]?.lineNum, context) : ""}
|
|
22175
22211
|
${interpStateToString(liveInState.get(block.offset))}`
|
|
22176
22212
|
);
|
|
22177
|
-
(0,
|
|
22213
|
+
(0, import_chunk_X7QCZR3F.logger)("interp", 9, () => blockToString(block, context));
|
|
22178
22214
|
}
|
|
22179
22215
|
return cloneState2(liveInState.get(block.offset));
|
|
22180
22216
|
},
|
|
22181
22217
|
(block, bc, localState) => {
|
|
22182
22218
|
if (interpLogging) {
|
|
22183
|
-
if ((0,
|
|
22184
|
-
(0,
|
|
22219
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("interp", 8)) {
|
|
22220
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
22185
22221
|
`${interpStateToString(localState)}
|
|
22186
22222
|
${bytecodeToString(
|
|
22187
22223
|
bc,
|
|
@@ -22346,14 +22382,14 @@ function interpFunc(func, context) {
|
|
|
22346
22382
|
if (!mergeInto(localState, succState))
|
|
22347
22383
|
return false;
|
|
22348
22384
|
if (interpLogging) {
|
|
22349
|
-
(0,
|
|
22385
|
+
(0, import_chunk_X7QCZR3F.logger)("interp", 3, `Re-Merge to ${offsetToString(succBlock.offset)}`);
|
|
22350
22386
|
}
|
|
22351
22387
|
return true;
|
|
22352
22388
|
}
|
|
22353
22389
|
);
|
|
22354
22390
|
if (interpLogging) {
|
|
22355
|
-
if ((0,
|
|
22356
|
-
(0,
|
|
22391
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("interp", 5)) {
|
|
22392
|
+
(0, import_chunk_X7QCZR3F.setBanner)(
|
|
22357
22393
|
functionBanner(func, context, "interp", (block, footer) => {
|
|
22358
22394
|
if (footer)
|
|
22359
22395
|
return "";
|
|
@@ -22361,44 +22397,44 @@ function interpFunc(func, context) {
|
|
|
22361
22397
|
})
|
|
22362
22398
|
);
|
|
22363
22399
|
} else {
|
|
22364
|
-
(0,
|
|
22400
|
+
(0, import_chunk_X7QCZR3F.setBanner)(() => `=============== interp ${func.name} ==============`);
|
|
22365
22401
|
}
|
|
22366
22402
|
if (equivSets.size) {
|
|
22367
|
-
(0,
|
|
22403
|
+
(0, import_chunk_X7QCZR3F.log)(`====== equivSets =====`);
|
|
22368
22404
|
equivSets.forEach(
|
|
22369
|
-
(value2, key) => (0,
|
|
22405
|
+
(value2, key) => (0, import_chunk_X7QCZR3F.log)(
|
|
22370
22406
|
`L${key.arg} === ${Array.from(value2).sort().join(" ")} ${key.lineNum ? lineInfoToString(key.lineNum, context) : ""}`
|
|
22371
22407
|
)
|
|
22372
22408
|
);
|
|
22373
22409
|
}
|
|
22374
22410
|
if (selfStores.size) {
|
|
22375
|
-
(0,
|
|
22411
|
+
(0, import_chunk_X7QCZR3F.log)(`====== selfStores =====`);
|
|
22376
22412
|
selfStores.forEach(
|
|
22377
|
-
(value2) => (0,
|
|
22413
|
+
(value2) => (0, import_chunk_X7QCZR3F.log)(`${bytecodeToString(value2, symbolTable)}`)
|
|
22378
22414
|
);
|
|
22379
22415
|
}
|
|
22380
22416
|
if (replacements.size) {
|
|
22381
|
-
(0,
|
|
22417
|
+
(0, import_chunk_X7QCZR3F.log)(`====== replacements =====`);
|
|
22382
22418
|
replacements.forEach(
|
|
22383
22419
|
(blockRep) => blockRep.forEach(
|
|
22384
|
-
(rep, bc) => (0,
|
|
22420
|
+
(rep, bc) => (0, import_chunk_X7QCZR3F.log)(
|
|
22385
22421
|
`${bytecodeToString(bc, symbolTable)} => ${rep.invert ? "~" : ""}${bytecodeToString(rep, symbolTable)} ${bc.lineNum ? lineInfoToString(bc.lineNum, context) : ""}`
|
|
22386
22422
|
)
|
|
22387
22423
|
)
|
|
22388
22424
|
);
|
|
22389
22425
|
}
|
|
22390
22426
|
if (resolvedBranches.size) {
|
|
22391
|
-
(0,
|
|
22427
|
+
(0, import_chunk_X7QCZR3F.log)(`====== resolved branches =====`);
|
|
22392
22428
|
resolvedBranches.forEach(
|
|
22393
|
-
(isTaken, block) => (0,
|
|
22429
|
+
(isTaken, block) => (0, import_chunk_X7QCZR3F.log)(
|
|
22394
22430
|
`block ${offsetToString(block.offset)} is ${isTaken ? "always" : "never"} taken`
|
|
22395
22431
|
)
|
|
22396
22432
|
);
|
|
22397
22433
|
}
|
|
22398
22434
|
if (branchRedirects.size) {
|
|
22399
|
-
(0,
|
|
22435
|
+
(0, import_chunk_X7QCZR3F.log)(`====== redirected branches =====`);
|
|
22400
22436
|
branchRedirects.forEach(
|
|
22401
|
-
({ to, from }, block) => (0,
|
|
22437
|
+
({ to, from }, block) => (0, import_chunk_X7QCZR3F.log)(
|
|
22402
22438
|
`block ${offsetToString(
|
|
22403
22439
|
block.offset
|
|
22404
22440
|
)} redirects from ${offsetToString(from)} to ${offsetToString(to)}${safeBranchBlocks.get(from) ? ` popping ${safeBranchBlocks.get(from)}` : ""}`
|
|
@@ -22461,7 +22497,7 @@ function interpFunc(func, context) {
|
|
|
22461
22497
|
}
|
|
22462
22498
|
});
|
|
22463
22499
|
if (interpLogging)
|
|
22464
|
-
(0,
|
|
22500
|
+
(0, import_chunk_X7QCZR3F.setBanner)(null);
|
|
22465
22501
|
return {
|
|
22466
22502
|
liveInState,
|
|
22467
22503
|
equivSets,
|
|
@@ -22511,7 +22547,7 @@ var init_interp2 = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
22511
22547
|
"src/readprg/interp.ts"() {
|
|
22512
22548
|
"use strict";
|
|
22513
22549
|
init_interp_binary();
|
|
22514
|
-
(0,
|
|
22550
|
+
(0, import_chunk_X7QCZR3F.init_logger)();
|
|
22515
22551
|
init_interp();
|
|
22516
22552
|
init_types();
|
|
22517
22553
|
init_union_type();
|
|
@@ -22623,7 +22659,7 @@ function optimizeArrayInit(func, block, index, context, interpState) {
|
|
|
22623
22659
|
i = found;
|
|
22624
22660
|
}
|
|
22625
22661
|
if (initType && (block.bytecodes[index].op === 20 ? initType.type === 1 : initType.type === 8 && initType.value === 0)) {
|
|
22626
|
-
(0,
|
|
22662
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
22627
22663
|
"array-init",
|
|
22628
22664
|
1,
|
|
22629
22665
|
() => `${func.name}: Removing initialization of default initialized ${putvStarts.length} element array init at block ${offsetToString(
|
|
@@ -22660,7 +22696,7 @@ function optimizeArrayInit(func, block, index, context, interpState) {
|
|
|
22660
22696
|
convertAputv(offset - 1);
|
|
22661
22697
|
}
|
|
22662
22698
|
}
|
|
22663
|
-
(0,
|
|
22699
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
22664
22700
|
"array-init",
|
|
22665
22701
|
1,
|
|
22666
22702
|
() => `${func.name}: Optimizing unused ${putvStarts.length} element array init at block ${offsetToString(
|
|
@@ -22669,8 +22705,8 @@ function optimizeArrayInit(func, block, index, context, interpState) {
|
|
|
22669
22705
|
block.bytecodes[index].offset
|
|
22670
22706
|
)}`
|
|
22671
22707
|
);
|
|
22672
|
-
if ((0,
|
|
22673
|
-
(0,
|
|
22708
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("array-init", 5)) {
|
|
22709
|
+
(0, import_chunk_X7QCZR3F.log)(blockToString(block, context));
|
|
22674
22710
|
}
|
|
22675
22711
|
return true;
|
|
22676
22712
|
}
|
|
@@ -22710,7 +22746,7 @@ function optimizeArrayInit(func, block, index, context, interpState) {
|
|
|
22710
22746
|
if (putvStarts.length < 3)
|
|
22711
22747
|
return false;
|
|
22712
22748
|
tryLocal(3);
|
|
22713
|
-
(0,
|
|
22749
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
22714
22750
|
"array-init",
|
|
22715
22751
|
1,
|
|
22716
22752
|
() => `${func.name}: Optimizing ${putvStarts.length} element array init with constant initializer ${bytecodeToString(
|
|
@@ -22736,7 +22772,7 @@ function optimizeArrayInit(func, block, index, context, interpState) {
|
|
|
22736
22772
|
block.bytecodes[index + 1].arg = putvStarts.length;
|
|
22737
22773
|
}
|
|
22738
22774
|
}
|
|
22739
|
-
(0,
|
|
22775
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
22740
22776
|
"array-init",
|
|
22741
22777
|
5,
|
|
22742
22778
|
() => `index: ${index}, i: ${i}
|
|
@@ -22789,7 +22825,7 @@ ${blockToString(block, context)}`
|
|
|
22789
22825
|
for (let i2 = putvStarts.length; i2-- > 1; ) {
|
|
22790
22826
|
block.bytecodes.splice(putvStarts[i2], 2);
|
|
22791
22827
|
}
|
|
22792
|
-
(0,
|
|
22828
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
22793
22829
|
"array-init",
|
|
22794
22830
|
1,
|
|
22795
22831
|
() => `${func.name}: Optimizing ${putvStarts.length} element array init at block ${offsetToString(
|
|
@@ -22848,15 +22884,15 @@ var init_array_init = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
22848
22884
|
"src/readprg/array-init.ts"() {
|
|
22849
22885
|
"use strict";
|
|
22850
22886
|
init_types();
|
|
22851
|
-
(0,
|
|
22887
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
22852
22888
|
init_bytecode();
|
|
22853
22889
|
init_interp2();
|
|
22854
22890
|
init_opcodes();
|
|
22855
22891
|
}
|
|
22856
22892
|
});
|
|
22857
22893
|
function localDCE(func, context) {
|
|
22858
|
-
if ((0,
|
|
22859
|
-
(0,
|
|
22894
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("dce", 5)) {
|
|
22895
|
+
(0, import_chunk_X7QCZR3F.setBanner)(
|
|
22860
22896
|
functionBanner(
|
|
22861
22897
|
func,
|
|
22862
22898
|
context,
|
|
@@ -22889,7 +22925,7 @@ function localDCE(func, context) {
|
|
|
22889
22925
|
};
|
|
22890
22926
|
func.blocks.forEach((block) => {
|
|
22891
22927
|
const reportPopv = (i, item, kill) => {
|
|
22892
|
-
(0,
|
|
22928
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
22893
22929
|
"dce",
|
|
22894
22930
|
2,
|
|
22895
22931
|
() => `${func.name}: Convert ${i}:${bytecodeToString(
|
|
@@ -22904,7 +22940,7 @@ function localDCE(func, context) {
|
|
|
22904
22940
|
);
|
|
22905
22941
|
};
|
|
22906
22942
|
const reportNop = (item) => {
|
|
22907
|
-
(0,
|
|
22943
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
22908
22944
|
"dce",
|
|
22909
22945
|
2,
|
|
22910
22946
|
() => `${func.name}: Kill ${item.deps.map(
|
|
@@ -22923,7 +22959,7 @@ function localDCE(func, context) {
|
|
|
22923
22959
|
case 19: {
|
|
22924
22960
|
const liveLocal = dceInfo.locals.has(bytecode.arg);
|
|
22925
22961
|
if (!liveLocal && (bytecode.arg || context.config.allowForbiddenOpts)) {
|
|
22926
|
-
(0,
|
|
22962
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
22927
22963
|
"dce",
|
|
22928
22964
|
2,
|
|
22929
22965
|
() => `${func.name}: Killing store to unused local ${bytecode.arg} at ${offsetToString(block.offset)}:${i}`
|
|
@@ -23083,10 +23119,10 @@ function localDCE(func, context) {
|
|
|
23083
23119
|
(bc) => bc.op !== 0
|
|
23084
23120
|
/* nop */
|
|
23085
23121
|
);
|
|
23086
|
-
(0,
|
|
23122
|
+
(0, import_chunk_X7QCZR3F.logger)("dce", 3, functionBanner(func, context, "local-dce-end"));
|
|
23087
23123
|
}
|
|
23088
23124
|
});
|
|
23089
|
-
(0,
|
|
23125
|
+
(0, import_chunk_X7QCZR3F.setBanner)(null);
|
|
23090
23126
|
return anyChanges;
|
|
23091
23127
|
}
|
|
23092
23128
|
function computeLiveLocals(func) {
|
|
@@ -23137,7 +23173,7 @@ var init_dce = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
23137
23173
|
"src/readprg/dce.ts"() {
|
|
23138
23174
|
"use strict";
|
|
23139
23175
|
init_data_flow();
|
|
23140
|
-
(0,
|
|
23176
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
23141
23177
|
init_bytecode();
|
|
23142
23178
|
init_cflow();
|
|
23143
23179
|
init_opcodes();
|
|
@@ -23177,7 +23213,7 @@ function minimizeLocals2(func, equivSets, context) {
|
|
|
23177
23213
|
const splitRanges = computeSplitRanges(func, equivSets);
|
|
23178
23214
|
const locals = mergeSplitRanges(splitRanges);
|
|
23179
23215
|
const numLocals = Math.max(...Array.from(splitRanges.keys())) + 1;
|
|
23180
|
-
(0,
|
|
23216
|
+
(0, import_chunk_X7QCZR3F.logger)("locals", 10, functionBanner(func, context, "Minimize Locals"));
|
|
23181
23217
|
let argc = func.argc ?? null;
|
|
23182
23218
|
const colors = /* @__PURE__ */ new Map();
|
|
23183
23219
|
const merge = [];
|
|
@@ -23244,15 +23280,15 @@ function minimizeLocals2(func, equivSets, context) {
|
|
|
23244
23280
|
}
|
|
23245
23281
|
}
|
|
23246
23282
|
}
|
|
23247
|
-
if ((0,
|
|
23248
|
-
if (!(0,
|
|
23249
|
-
(0,
|
|
23283
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("locals", 1)) {
|
|
23284
|
+
if (!(0, import_chunk_X7QCZR3F.wouldLog)("locals", 10)) {
|
|
23285
|
+
(0, import_chunk_X7QCZR3F.logger)("locals", 5, functionBanner(func, context, "Minimize Locals"));
|
|
23250
23286
|
}
|
|
23251
|
-
(0,
|
|
23287
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
23252
23288
|
`>>> Merging locals in ${func.name} (in: ${numLocals} => out: ${merge.length})`
|
|
23253
23289
|
);
|
|
23254
23290
|
merge.slice().sort((a, b) => (colors.get(a[0]) ?? 0) - (colors.get(b[0]) ?? 0)).forEach(
|
|
23255
|
-
(merged) => (0,
|
|
23291
|
+
(merged) => (0, import_chunk_X7QCZR3F.log)(
|
|
23256
23292
|
` ${colors.get(merged[0])} - ${merged.map((k) => bytecodeToString(k, context.symbolTable)).join(" | ")}`
|
|
23257
23293
|
)
|
|
23258
23294
|
);
|
|
@@ -23551,7 +23587,7 @@ function mergeSplitRanges(splitRanges) {
|
|
|
23551
23587
|
var init_locals = (0, import_chunk_ABYVSU2C.__esm)({
|
|
23552
23588
|
"src/readprg/locals.ts"() {
|
|
23553
23589
|
"use strict";
|
|
23554
|
-
(0,
|
|
23590
|
+
(0, import_chunk_X7QCZR3F.init_logger)();
|
|
23555
23591
|
init_bytecode();
|
|
23556
23592
|
init_cflow();
|
|
23557
23593
|
init_opcodes();
|
|
@@ -23664,16 +23700,16 @@ function sizeBasedPRE2(func, context) {
|
|
|
23664
23700
|
delete bc.arg;
|
|
23665
23701
|
return bc;
|
|
23666
23702
|
};
|
|
23667
|
-
if ((0,
|
|
23668
|
-
if ((0,
|
|
23669
|
-
(0,
|
|
23703
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("pre", 1)) {
|
|
23704
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("pre", 5)) {
|
|
23705
|
+
(0, import_chunk_X7QCZR3F.log)(functionBanner(func, context, "PRE")());
|
|
23670
23706
|
} else {
|
|
23671
|
-
(0,
|
|
23707
|
+
(0, import_chunk_X7QCZR3F.log)(`================ PRE : ${func.name} ================
|
|
23672
23708
|
`);
|
|
23673
23709
|
}
|
|
23674
23710
|
insertionBlocks.forEach((o, key) => {
|
|
23675
23711
|
const bcs = canonicalMap.get(key);
|
|
23676
|
-
(0,
|
|
23712
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
23677
23713
|
`Replacing ${bcs.size} instances of ${bytecodeToString(
|
|
23678
23714
|
bcs.values().next().value,
|
|
23679
23715
|
context.symbolTable
|
|
@@ -23756,13 +23792,13 @@ function sizeBasedPRE2(func, context) {
|
|
|
23756
23792
|
bytecode(1, insertionBlocks.size)
|
|
23757
23793
|
);
|
|
23758
23794
|
}
|
|
23759
|
-
(0,
|
|
23795
|
+
(0, import_chunk_X7QCZR3F.logger)("pre", 5, functionBanner(func, context, "post-PRE"));
|
|
23760
23796
|
return true;
|
|
23761
23797
|
}
|
|
23762
23798
|
var init_pre2 = (0, import_chunk_ABYVSU2C.__esm)({
|
|
23763
23799
|
"src/readprg/pre.ts"() {
|
|
23764
23800
|
"use strict";
|
|
23765
|
-
(0,
|
|
23801
|
+
(0, import_chunk_X7QCZR3F.init_logger)();
|
|
23766
23802
|
init_bytecode();
|
|
23767
23803
|
init_cflow();
|
|
23768
23804
|
init_opcodes();
|
|
@@ -23795,9 +23831,9 @@ function blockSharing(func, context) {
|
|
|
23795
23831
|
if (!any)
|
|
23796
23832
|
return false;
|
|
23797
23833
|
any = false;
|
|
23798
|
-
const logging3 = (0,
|
|
23799
|
-
if (logging3 && (0,
|
|
23800
|
-
(0,
|
|
23834
|
+
const logging3 = (0, import_chunk_X7QCZR3F.wouldLog)("sharing", 1);
|
|
23835
|
+
if (logging3 && (0, import_chunk_X7QCZR3F.wouldLog)("sharing", 10)) {
|
|
23836
|
+
(0, import_chunk_X7QCZR3F.setBanner)(functionBanner(func, context, "sharing"));
|
|
23801
23837
|
}
|
|
23802
23838
|
candidates.forEach((blocks) => {
|
|
23803
23839
|
while (blocks.size > 1) {
|
|
@@ -23933,9 +23969,9 @@ function blockSharing(func, context) {
|
|
|
23933
23969
|
block2.offset
|
|
23934
23970
|
)})` : `block(${offsetToString(block2.offset)})`;
|
|
23935
23971
|
};
|
|
23936
|
-
(0,
|
|
23937
|
-
if ((0,
|
|
23938
|
-
(0,
|
|
23972
|
+
(0, import_chunk_X7QCZR3F.log)(`Sharing ${showBlock(block)} with ${showBlock(target)}`);
|
|
23973
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("sharing", 5)) {
|
|
23974
|
+
(0, import_chunk_X7QCZR3F.log)(blockToString(target, context));
|
|
23939
23975
|
}
|
|
23940
23976
|
}
|
|
23941
23977
|
if (target.bytecodes.length > length2) {
|
|
@@ -23962,13 +23998,13 @@ function blockSharing(func, context) {
|
|
|
23962
23998
|
});
|
|
23963
23999
|
}
|
|
23964
24000
|
});
|
|
23965
|
-
(0,
|
|
24001
|
+
(0, import_chunk_X7QCZR3F.setBanner)(null);
|
|
23966
24002
|
return any;
|
|
23967
24003
|
}
|
|
23968
24004
|
var init_sharing = (0, import_chunk_ABYVSU2C.__esm)({
|
|
23969
24005
|
"src/readprg/sharing.ts"() {
|
|
23970
24006
|
"use strict";
|
|
23971
|
-
(0,
|
|
24007
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
23972
24008
|
init_bytecode();
|
|
23973
24009
|
init_opcodes();
|
|
23974
24010
|
}
|
|
@@ -24032,7 +24068,7 @@ function doArrayInits(func, liveInState, context) {
|
|
|
24032
24068
|
}
|
|
24033
24069
|
function simpleOpts(func, context) {
|
|
24034
24070
|
const equalsSym = 8388787;
|
|
24035
|
-
const logging3 = (0,
|
|
24071
|
+
const logging3 = (0, import_chunk_X7QCZR3F.wouldLog)("optimize", 5);
|
|
24036
24072
|
return Array.from(func.blocks.values()).reduce((changes, block) => {
|
|
24037
24073
|
for (let i = block.bytecodes.length; i--; ) {
|
|
24038
24074
|
const cur = block.bytecodes[i];
|
|
@@ -24040,7 +24076,7 @@ function simpleOpts(func, context) {
|
|
|
24040
24076
|
block.bytecodes.splice(i, 1);
|
|
24041
24077
|
changes = true;
|
|
24042
24078
|
if (logging3) {
|
|
24043
|
-
(0,
|
|
24079
|
+
(0, import_chunk_X7QCZR3F.log)(`${func.name}: deleting ${bytecodeToString(cur, null)}`);
|
|
24044
24080
|
}
|
|
24045
24081
|
} else if (cur.op === 74 && context.config.removeArgc && context.config.allowForbiddenOpts) {
|
|
24046
24082
|
const arg = cur.arg.incsp;
|
|
@@ -24049,7 +24085,7 @@ function simpleOpts(func, context) {
|
|
|
24049
24085
|
incsp.arg = arg;
|
|
24050
24086
|
changes = true;
|
|
24051
24087
|
if (logging3) {
|
|
24052
|
-
(0,
|
|
24088
|
+
(0, import_chunk_X7QCZR3F.log)(`${func.name}: argcincsp => incsp`);
|
|
24053
24089
|
}
|
|
24054
24090
|
} else if (i && cur.op === 39 && cur.arg === equalsSym) {
|
|
24055
24091
|
changes = equalSymbolToEq(block, i) || changes;
|
|
@@ -24060,7 +24096,7 @@ function simpleOpts(func, context) {
|
|
|
24060
24096
|
if (!shift && prev.op === 37) {
|
|
24061
24097
|
block.bytecodes.splice(i - 1, 2);
|
|
24062
24098
|
changes = true;
|
|
24063
|
-
logging3 && (0,
|
|
24099
|
+
logging3 && (0, import_chunk_X7QCZR3F.log)(`${func.name}: deleting no-op shift (${shift})`);
|
|
24064
24100
|
continue;
|
|
24065
24101
|
}
|
|
24066
24102
|
if (shift === 1n && prev.op === 37) {
|
|
@@ -24070,7 +24106,7 @@ function simpleOpts(func, context) {
|
|
|
24070
24106
|
const add = cur;
|
|
24071
24107
|
add.op = 3;
|
|
24072
24108
|
delete add.arg;
|
|
24073
|
-
logging3 && (0,
|
|
24109
|
+
logging3 && (0, import_chunk_X7QCZR3F.log)(`${func.name}: converting "ipush 1; shlv" to "dup 0; addv"`);
|
|
24074
24110
|
continue;
|
|
24075
24111
|
}
|
|
24076
24112
|
if (shift < (prev.op === 49 ? 64n : 31n)) {
|
|
@@ -24080,7 +24116,7 @@ function simpleOpts(func, context) {
|
|
|
24080
24116
|
} else {
|
|
24081
24117
|
prev.arg = BigInt.asIntN(64, mul);
|
|
24082
24118
|
}
|
|
24083
|
-
logging3 && (0,
|
|
24119
|
+
logging3 && (0, import_chunk_X7QCZR3F.log)(
|
|
24084
24120
|
`${func.name}: converting shlv(${shift}) to mulv(${prev.arg})`
|
|
24085
24121
|
);
|
|
24086
24122
|
changes = true;
|
|
@@ -24094,14 +24130,14 @@ function simpleOpts(func, context) {
|
|
|
24094
24130
|
func.blocks.get(block.taken).preds.delete(block.offset);
|
|
24095
24131
|
delete block.taken;
|
|
24096
24132
|
changes = true;
|
|
24097
|
-
logging3 && (0,
|
|
24133
|
+
logging3 && (0, import_chunk_X7QCZR3F.log)(`${func.name}: deleting empty finally handler`);
|
|
24098
24134
|
} else if (isCondBranch(cur.op)) {
|
|
24099
24135
|
const next = func.blocks.get(block.next);
|
|
24100
24136
|
const taken = func.blocks.get(block.taken);
|
|
24101
24137
|
if (next.preds.size > 1 && taken.preds.size === 1) {
|
|
24102
24138
|
const newOp = cur.op === 40 ? 41 : 40;
|
|
24103
24139
|
if (logging3) {
|
|
24104
|
-
(0,
|
|
24140
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
24105
24141
|
`${func.name}: converting ${Opcodes[cur.op]} to ${Opcodes[newOp]}`
|
|
24106
24142
|
);
|
|
24107
24143
|
}
|
|
@@ -24114,7 +24150,7 @@ function simpleOpts(func, context) {
|
|
|
24114
24150
|
const isBool = i >= 2 && isBoolOp(block.bytecodes[i - 2].op);
|
|
24115
24151
|
if (next.next === block.taken && next.taken == null && taken.bytecodes.length === 1 && isCondBranch(taken.bytecodes[0].op) && next.bytecodes.length > 1 && next.bytecodes[next.bytecodes.length - 1].op === (cur.op === 41 ? 7 : 8) && (isBool || next.bytecodes.length > 2 && isBoolOp(next.bytecodes[next.bytecodes.length - 2].op)) && next.preds?.size === 1 && taken.preds?.size === 2) {
|
|
24116
24152
|
if (logging3) {
|
|
24117
|
-
(0,
|
|
24153
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
24118
24154
|
`${func.name}: simplifying ${next.bytecodes[next.bytecodes.length - 1].op === 7 ? "'&&'" : "'||'"} at ${offsetToString(block.offset)}:${offsetToString(
|
|
24119
24155
|
next.offset
|
|
24120
24156
|
)}:${offsetToString(taken.offset)}:`
|
|
@@ -24131,7 +24167,7 @@ function simpleOpts(func, context) {
|
|
|
24131
24167
|
changes = true;
|
|
24132
24168
|
} else if (taken.next === block.next && taken.taken == null && next.bytecodes.length === 1 && isCondBranch(next.bytecodes[0].op) && taken.bytecodes.length > 1 && taken.bytecodes[taken.bytecodes.length - 1].op === (cur.op === 40 ? 7 : 8) && (isBool || taken.bytecodes.length > 2 && isBoolOp(taken.bytecodes[taken.bytecodes.length - 2].op)) && next.preds?.size === 2 && taken.preds?.size === 1) {
|
|
24133
24169
|
if (logging3) {
|
|
24134
|
-
(0,
|
|
24170
|
+
(0, import_chunk_X7QCZR3F.log)(
|
|
24135
24171
|
`${func.name}: simplifying ${taken.bytecodes[taken.bytecodes.length - 1].op === 7 ? "'&&'" : "'||'"} at ${offsetToString(block.offset)}:${offsetToString(
|
|
24136
24172
|
taken.offset
|
|
24137
24173
|
)}:${offsetToString(next.offset)}:`
|
|
@@ -24179,7 +24215,7 @@ function equalSymbolToEq(block, equalsIndex) {
|
|
|
24179
24215
|
op: 26,
|
|
24180
24216
|
offset: invokem.offset
|
|
24181
24217
|
});
|
|
24182
|
-
(0,
|
|
24218
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
24183
24219
|
"optimize",
|
|
24184
24220
|
1,
|
|
24185
24221
|
`Replacing <thing>.equals(:symbol) with <thing> eq :symbol at ${offsetToString(
|
|
@@ -24239,7 +24275,7 @@ function removeUnreachableCatches(func, context) {
|
|
|
24239
24275
|
const next = func.blocks.get(block.next);
|
|
24240
24276
|
if (block.try === next.try) {
|
|
24241
24277
|
if (next.preds.size === 1) {
|
|
24242
|
-
(0,
|
|
24278
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
24243
24279
|
"cfg",
|
|
24244
24280
|
1,
|
|
24245
24281
|
() => `${func.name}: ${offsetToString(
|
|
@@ -24262,7 +24298,7 @@ function removeUnreachableCatches(func, context) {
|
|
|
24262
24298
|
delete next.preds;
|
|
24263
24299
|
removeBlock(func, next.offset);
|
|
24264
24300
|
} else if (next.next == null && next.bytecodes.length < 3 && next.bytecodes.reduce((size, bc) => size + opcodeSize(bc.op), 0) < 3 && countFallthroughPreds(func, next) > 1) {
|
|
24265
|
-
(0,
|
|
24301
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
24266
24302
|
"cfg",
|
|
24267
24303
|
1,
|
|
24268
24304
|
() => `${func.name}: ${offsetToString(
|
|
@@ -24287,7 +24323,7 @@ function removeUnreachableCatches(func, context) {
|
|
|
24287
24323
|
switch (last.op) {
|
|
24288
24324
|
case 41:
|
|
24289
24325
|
case 40:
|
|
24290
|
-
(0,
|
|
24326
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
24291
24327
|
"cfg",
|
|
24292
24328
|
1,
|
|
24293
24329
|
() => `${func.name}: killing no-op ${bytecodeToString(
|
|
@@ -24310,7 +24346,7 @@ function removeUnreachableCatches(func, context) {
|
|
|
24310
24346
|
for (let i = block.try.length; i--; ) {
|
|
24311
24347
|
const handler = block.try[i].handler;
|
|
24312
24348
|
if (!func.blocks.get(handler)?.preds?.size) {
|
|
24313
|
-
(0,
|
|
24349
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
24314
24350
|
"cfg",
|
|
24315
24351
|
1,
|
|
24316
24352
|
`${func.name}: killing unused try-catch at ${offsetToString(
|
|
@@ -24327,8 +24363,8 @@ function removeUnreachableCatches(func, context) {
|
|
|
24327
24363
|
});
|
|
24328
24364
|
}
|
|
24329
24365
|
function cleanCfg2(func, context) {
|
|
24330
|
-
if ((0,
|
|
24331
|
-
(0,
|
|
24366
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("cfg", 10)) {
|
|
24367
|
+
(0, import_chunk_X7QCZR3F.setBanner)(functionBanner(func, context, "sharing"));
|
|
24332
24368
|
}
|
|
24333
24369
|
removeNoOpBlocks(func);
|
|
24334
24370
|
removeUnreachableCatches(func, context);
|
|
@@ -24343,12 +24379,12 @@ function cleanCfg2(func, context) {
|
|
|
24343
24379
|
(0, import_node_assert12.default)(!block.preds?.size);
|
|
24344
24380
|
func.blocks.delete(block.offset);
|
|
24345
24381
|
});
|
|
24346
|
-
(0,
|
|
24382
|
+
(0, import_chunk_X7QCZR3F.setBanner)(null);
|
|
24347
24383
|
}
|
|
24348
24384
|
var init_optimize2 = (0, import_chunk_ABYVSU2C.__esm)({
|
|
24349
24385
|
"src/readprg/optimize.ts"() {
|
|
24350
24386
|
"use strict";
|
|
24351
|
-
(0,
|
|
24387
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
24352
24388
|
init_array_init();
|
|
24353
24389
|
init_bytecode();
|
|
24354
24390
|
init_cflow();
|
|
@@ -24963,21 +24999,21 @@ function optimizeBytecode(context) {
|
|
|
24963
24999
|
functions.forEach(callback);
|
|
24964
25000
|
return;
|
|
24965
25001
|
}
|
|
24966
|
-
(0,
|
|
25002
|
+
(0, import_chunk_X7QCZR3F.bumpLogging)(null, 10);
|
|
24967
25003
|
functions.forEach((func) => {
|
|
24968
25004
|
if (loggerFunc.test(func.name ?? "<null>")) {
|
|
24969
|
-
(0,
|
|
25005
|
+
(0, import_chunk_X7QCZR3F.bumpLogging)(null, -10);
|
|
24970
25006
|
callback(func);
|
|
24971
|
-
(0,
|
|
25007
|
+
(0, import_chunk_X7QCZR3F.bumpLogging)(null, 10);
|
|
24972
25008
|
return;
|
|
24973
25009
|
}
|
|
24974
25010
|
callback(func);
|
|
24975
25011
|
});
|
|
24976
|
-
(0,
|
|
25012
|
+
(0, import_chunk_X7QCZR3F.bumpLogging)(null, -10);
|
|
24977
25013
|
};
|
|
24978
|
-
if ((0,
|
|
25014
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("list-input", 1)) {
|
|
24979
25015
|
forEachFunction(
|
|
24980
|
-
(func) => (0,
|
|
25016
|
+
(func) => (0, import_chunk_X7QCZR3F.wouldLog)("list-input", 1) && printFunction(func, context)
|
|
24981
25017
|
);
|
|
24982
25018
|
}
|
|
24983
25019
|
forEachFunction((func) => optimizeFunc(func, context));
|
|
@@ -24995,7 +25031,7 @@ function optimizeBytecode(context) {
|
|
|
24995
25031
|
forEachFunction((func) => {
|
|
24996
25032
|
if (!func.name)
|
|
24997
25033
|
return;
|
|
24998
|
-
(0,
|
|
25034
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
24999
25035
|
"bytecode",
|
|
25000
25036
|
5,
|
|
25001
25037
|
`${func.name}: ${offset.toString(16)} ${offset - func.offset}`
|
|
@@ -25004,7 +25040,7 @@ function optimizeBytecode(context) {
|
|
|
25004
25040
|
});
|
|
25005
25041
|
const { offsetMap } = updateInfo;
|
|
25006
25042
|
offsetMap.set(code.byteLength, offset);
|
|
25007
|
-
(0,
|
|
25043
|
+
(0, import_chunk_X7QCZR3F.logger)(
|
|
25008
25044
|
"bytecode",
|
|
25009
25045
|
1,
|
|
25010
25046
|
`${context.filepath}: code size: ${context.sections[
|
|
@@ -25016,9 +25052,9 @@ function optimizeBytecode(context) {
|
|
|
25016
25052
|
].length - offset}`
|
|
25017
25053
|
);
|
|
25018
25054
|
fixSectionSize(-1059145026, context.sections, offset);
|
|
25019
|
-
if ((0,
|
|
25055
|
+
if ((0, import_chunk_X7QCZR3F.wouldLog)("list-output", 1)) {
|
|
25020
25056
|
forEachFunction(
|
|
25021
|
-
(func) => (0,
|
|
25057
|
+
(func) => (0, import_chunk_X7QCZR3F.wouldLog)("list-output", 1) && printFunction(func, context)
|
|
25022
25058
|
);
|
|
25023
25059
|
}
|
|
25024
25060
|
fixupHeader(context, updateInfo);
|
|
@@ -25108,7 +25144,7 @@ ${functionToString(
|
|
|
25108
25144
|
---------------- ${func.name} ----------------`;
|
|
25109
25145
|
}
|
|
25110
25146
|
function printFunction(func, context) {
|
|
25111
|
-
(0,
|
|
25147
|
+
(0, import_chunk_X7QCZR3F.log)(functionToString(func, context));
|
|
25112
25148
|
}
|
|
25113
25149
|
function functionToString(func, context, extra) {
|
|
25114
25150
|
const parts = [];
|
|
@@ -25539,7 +25575,7 @@ var init_bytecode = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
25539
25575
|
"use strict";
|
|
25540
25576
|
(0, import_chunk_JDC43A3I.init_ast)();
|
|
25541
25577
|
init_sdk_util();
|
|
25542
|
-
(0,
|
|
25578
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
25543
25579
|
init_data();
|
|
25544
25580
|
init_emit();
|
|
25545
25581
|
init_exceptions();
|
|
@@ -25825,10 +25861,10 @@ async function build_project(product, options, lineCallback) {
|
|
|
25825
25861
|
].flat();
|
|
25826
25862
|
if (!returnCommand) {
|
|
25827
25863
|
const handlers = [
|
|
25828
|
-
lineCallback || ((line) => (0,
|
|
25864
|
+
lineCallback || ((line) => (0, import_chunk_X7QCZR3F.log)(line)),
|
|
25829
25865
|
(line) => console.error(line)
|
|
25830
25866
|
];
|
|
25831
|
-
await (0,
|
|
25867
|
+
await (0, import_chunk_X7QCZR3F.spawnByLine)(exe, args, handlers, {
|
|
25832
25868
|
cwd: workspace
|
|
25833
25869
|
});
|
|
25834
25870
|
}
|
|
@@ -25838,7 +25874,7 @@ var init_build = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
25838
25874
|
"src/build.ts"() {
|
|
25839
25875
|
"use strict";
|
|
25840
25876
|
init_sdk_util();
|
|
25841
|
-
(0,
|
|
25877
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
25842
25878
|
}
|
|
25843
25879
|
});
|
|
25844
25880
|
var require_ms = (0, import_chunk_ABYVSU2C.__commonJS)({
|
|
@@ -27103,7 +27139,7 @@ function peg$parse2(input, options) {
|
|
|
27103
27139
|
var peg$r1 = /^[A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376-\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4-\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u09FC\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60-\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD-\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;
|
|
27104
27140
|
var peg$r2 = /^[0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376-\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7-\u09C8\u09CB-\u09CE\u09D7\u09DC-\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47-\u0B48\u0B4B-\u0B4D\u0B56-\u0B57\u0B5C-\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82-\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18-\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772-\u1773\u1780-\u17D3\u17D7\u17DC-\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F-\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC-\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33-\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;
|
|
27105
27141
|
var peg$r3 = /^[\-\u200C-\u200D]/;
|
|
27106
|
-
var peg$r4 = /^[
|
|
27142
|
+
var peg$r4 = /^[*.-\/:]/;
|
|
27107
27143
|
var peg$r5 = /^[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376-\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4-\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u09FC\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60-\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD-\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;
|
|
27108
27144
|
var peg$r6 = /^[\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7-\u09C8\u09CB-\u09CD\u09D7\u09E2-\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A70-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2-\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47-\u0B48\u0B4B-\u0B4D\u0B56-\u0B57\u0B62-\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6\u0CE2-\u0CE3\u0D00-\u0D03\u0D3B-\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62-\u0D63\u0D82-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2-\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19\u0F35\u0F37\u0F39\u0F3E-\u0F3F\u0F71-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885-\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099-\u309A\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880-\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C-\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5-\uAAF6\uABE3-\uABEA\uABEC-\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/;
|
|
27109
27145
|
var peg$r7 = /^[\t\v-\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/;
|
|
@@ -27139,7 +27175,7 @@ function peg$parse2(input, options) {
|
|
|
27139
27175
|
var peg$e16 = peg$literalExpectation("$", false);
|
|
27140
27176
|
var peg$e17 = peg$literalExpectation("(", false);
|
|
27141
27177
|
var peg$e18 = peg$classExpectation(["-", ["\u200C", "\u200D"]], false, false);
|
|
27142
|
-
var peg$e19 = peg$classExpectation(["*", [".", "/"]], false, false);
|
|
27178
|
+
var peg$e19 = peg$classExpectation(["*", [".", "/"], ":"], false, false);
|
|
27143
27179
|
var peg$e20 = peg$classExpectation([["A", "Z"], ["a", "z"], "\xAA", "\xB5", "\xBA", ["\xC0", "\xD6"], ["\xD8", "\xF6"], ["\xF8", "\u02C1"], ["\u02C6", "\u02D1"], ["\u02E0", "\u02E4"], "\u02EC", "\u02EE", ["\u0370", "\u0374"], ["\u0376", "\u0377"], ["\u037A", "\u037D"], "\u037F", "\u0386", ["\u0388", "\u038A"], "\u038C", ["\u038E", "\u03A1"], ["\u03A3", "\u03F5"], ["\u03F7", "\u0481"], ["\u048A", "\u052F"], ["\u0531", "\u0556"], "\u0559", ["\u0560", "\u0588"], ["\u05D0", "\u05EA"], ["\u05EF", "\u05F2"], ["\u0620", "\u064A"], ["\u066E", "\u066F"], ["\u0671", "\u06D3"], "\u06D5", ["\u06E5", "\u06E6"], ["\u06EE", "\u06EF"], ["\u06FA", "\u06FC"], "\u06FF", "\u0710", ["\u0712", "\u072F"], ["\u074D", "\u07A5"], "\u07B1", ["\u07CA", "\u07EA"], ["\u07F4", "\u07F5"], "\u07FA", ["\u0800", "\u0815"], "\u081A", "\u0824", "\u0828", ["\u0840", "\u0858"], ["\u0860", "\u086A"], ["\u08A0", "\u08B4"], ["\u08B6", "\u08BD"], ["\u0904", "\u0939"], "\u093D", "\u0950", ["\u0958", "\u0961"], ["\u0971", "\u0980"], ["\u0985", "\u098C"], ["\u098F", "\u0990"], ["\u0993", "\u09A8"], ["\u09AA", "\u09B0"], "\u09B2", ["\u09B6", "\u09B9"], "\u09BD", "\u09CE", ["\u09DC", "\u09DD"], ["\u09DF", "\u09E1"], ["\u09F0", "\u09F1"], "\u09FC", ["\u0A05", "\u0A0A"], ["\u0A0F", "\u0A10"], ["\u0A13", "\u0A28"], ["\u0A2A", "\u0A30"], ["\u0A32", "\u0A33"], ["\u0A35", "\u0A36"], ["\u0A38", "\u0A39"], ["\u0A59", "\u0A5C"], "\u0A5E", ["\u0A72", "\u0A74"], ["\u0A85", "\u0A8D"], ["\u0A8F", "\u0A91"], ["\u0A93", "\u0AA8"], ["\u0AAA", "\u0AB0"], ["\u0AB2", "\u0AB3"], ["\u0AB5", "\u0AB9"], "\u0ABD", "\u0AD0", ["\u0AE0", "\u0AE1"], "\u0AF9", ["\u0B05", "\u0B0C"], ["\u0B0F", "\u0B10"], ["\u0B13", "\u0B28"], ["\u0B2A", "\u0B30"], ["\u0B32", "\u0B33"], ["\u0B35", "\u0B39"], "\u0B3D", ["\u0B5C", "\u0B5D"], ["\u0B5F", "\u0B61"], "\u0B71", "\u0B83", ["\u0B85", "\u0B8A"], ["\u0B8E", "\u0B90"], ["\u0B92", "\u0B95"], ["\u0B99", "\u0B9A"], "\u0B9C", ["\u0B9E", "\u0B9F"], ["\u0BA3", "\u0BA4"], ["\u0BA8", "\u0BAA"], ["\u0BAE", "\u0BB9"], "\u0BD0", ["\u0C05", "\u0C0C"], ["\u0C0E", "\u0C10"], ["\u0C12", "\u0C28"], ["\u0C2A", "\u0C39"], "\u0C3D", ["\u0C58", "\u0C5A"], ["\u0C60", "\u0C61"], "\u0C80", ["\u0C85", "\u0C8C"], ["\u0C8E", "\u0C90"], ["\u0C92", "\u0CA8"], ["\u0CAA", "\u0CB3"], ["\u0CB5", "\u0CB9"], "\u0CBD", "\u0CDE", ["\u0CE0", "\u0CE1"], ["\u0CF1", "\u0CF2"], ["\u0D05", "\u0D0C"], ["\u0D0E", "\u0D10"], ["\u0D12", "\u0D3A"], "\u0D3D", "\u0D4E", ["\u0D54", "\u0D56"], ["\u0D5F", "\u0D61"], ["\u0D7A", "\u0D7F"], ["\u0D85", "\u0D96"], ["\u0D9A", "\u0DB1"], ["\u0DB3", "\u0DBB"], "\u0DBD", ["\u0DC0", "\u0DC6"], ["\u0E01", "\u0E30"], ["\u0E32", "\u0E33"], ["\u0E40", "\u0E46"], ["\u0E81", "\u0E82"], "\u0E84", ["\u0E87", "\u0E88"], "\u0E8A", "\u0E8D", ["\u0E94", "\u0E97"], ["\u0E99", "\u0E9F"], ["\u0EA1", "\u0EA3"], "\u0EA5", "\u0EA7", ["\u0EAA", "\u0EAB"], ["\u0EAD", "\u0EB0"], ["\u0EB2", "\u0EB3"], "\u0EBD", ["\u0EC0", "\u0EC4"], "\u0EC6", ["\u0EDC", "\u0EDF"], "\u0F00", ["\u0F40", "\u0F47"], ["\u0F49", "\u0F6C"], ["\u0F88", "\u0F8C"], ["\u1000", "\u102A"], "\u103F", ["\u1050", "\u1055"], ["\u105A", "\u105D"], "\u1061", ["\u1065", "\u1066"], ["\u106E", "\u1070"], ["\u1075", "\u1081"], "\u108E", ["\u10A0", "\u10C5"], "\u10C7", "\u10CD", ["\u10D0", "\u10FA"], ["\u10FC", "\u1248"], ["\u124A", "\u124D"], ["\u1250", "\u1256"], "\u1258", ["\u125A", "\u125D"], ["\u1260", "\u1288"], ["\u128A", "\u128D"], ["\u1290", "\u12B0"], ["\u12B2", "\u12B5"], ["\u12B8", "\u12BE"], "\u12C0", ["\u12C2", "\u12C5"], ["\u12C8", "\u12D6"], ["\u12D8", "\u1310"], ["\u1312", "\u1315"], ["\u1318", "\u135A"], ["\u1380", "\u138F"], ["\u13A0", "\u13F5"], ["\u13F8", "\u13FD"], ["\u1401", "\u166C"], ["\u166F", "\u167F"], ["\u1681", "\u169A"], ["\u16A0", "\u16EA"], ["\u16EE", "\u16F8"], ["\u1700", "\u170C"], ["\u170E", "\u1711"], ["\u1720", "\u1731"], ["\u1740", "\u1751"], ["\u1760", "\u176C"], ["\u176E", "\u1770"], ["\u1780", "\u17B3"], "\u17D7", "\u17DC", ["\u1820", "\u1878"], ["\u1880", "\u1884"], ["\u1887", "\u18A8"], "\u18AA", ["\u18B0", "\u18F5"], ["\u1900", "\u191E"], ["\u1950", "\u196D"], ["\u1970", "\u1974"], ["\u1980", "\u19AB"], ["\u19B0", "\u19C9"], ["\u1A00", "\u1A16"], ["\u1A20", "\u1A54"], "\u1AA7", ["\u1B05", "\u1B33"], ["\u1B45", "\u1B4B"], ["\u1B83", "\u1BA0"], ["\u1BAE", "\u1BAF"], ["\u1BBA", "\u1BE5"], ["\u1C00", "\u1C23"], ["\u1C4D", "\u1C4F"], ["\u1C5A", "\u1C7D"], ["\u1C80", "\u1C88"], ["\u1C90", "\u1CBA"], ["\u1CBD", "\u1CBF"], ["\u1CE9", "\u1CEC"], ["\u1CEE", "\u1CF1"], ["\u1CF5", "\u1CF6"], ["\u1D00", "\u1DBF"], ["\u1E00", "\u1F15"], ["\u1F18", "\u1F1D"], ["\u1F20", "\u1F45"], ["\u1F48", "\u1F4D"], ["\u1F50", "\u1F57"], "\u1F59", "\u1F5B", "\u1F5D", ["\u1F5F", "\u1F7D"], ["\u1F80", "\u1FB4"], ["\u1FB6", "\u1FBC"], "\u1FBE", ["\u1FC2", "\u1FC4"], ["\u1FC6", "\u1FCC"], ["\u1FD0", "\u1FD3"], ["\u1FD6", "\u1FDB"], ["\u1FE0", "\u1FEC"], ["\u1FF2", "\u1FF4"], ["\u1FF6", "\u1FFC"], "\u2071", "\u207F", ["\u2090", "\u209C"], "\u2102", "\u2107", ["\u210A", "\u2113"], "\u2115", ["\u2119", "\u211D"], "\u2124", "\u2126", "\u2128", ["\u212A", "\u212D"], ["\u212F", "\u2139"], ["\u213C", "\u213F"], ["\u2145", "\u2149"], "\u214E", ["\u2160", "\u2188"], ["\u2C00", "\u2C2E"], ["\u2C30", "\u2C5E"], ["\u2C60", "\u2CE4"], ["\u2CEB", "\u2CEE"], ["\u2CF2", "\u2CF3"], ["\u2D00", "\u2D25"], "\u2D27", "\u2D2D", ["\u2D30", "\u2D67"], "\u2D6F", ["\u2D80", "\u2D96"], ["\u2DA0", "\u2DA6"], ["\u2DA8", "\u2DAE"], ["\u2DB0", "\u2DB6"], ["\u2DB8", "\u2DBE"], ["\u2DC0", "\u2DC6"], ["\u2DC8", "\u2DCE"], ["\u2DD0", "\u2DD6"], ["\u2DD8", "\u2DDE"], "\u2E2F", ["\u3005", "\u3007"], ["\u3021", "\u3029"], ["\u3031", "\u3035"], ["\u3038", "\u303C"], ["\u3041", "\u3096"], ["\u309D", "\u309F"], ["\u30A1", "\u30FA"], ["\u30FC", "\u30FF"], ["\u3105", "\u312F"], ["\u3131", "\u318E"], ["\u31A0", "\u31BA"], ["\u31F0", "\u31FF"], ["\u3400", "\u4DB5"], ["\u4E00", "\u9FEF"], ["\uA000", "\uA48C"], ["\uA4D0", "\uA4FD"], ["\uA500", "\uA60C"], ["\uA610", "\uA61F"], ["\uA62A", "\uA62B"], ["\uA640", "\uA66E"], ["\uA67F", "\uA69D"], ["\uA6A0", "\uA6EF"], ["\uA717", "\uA71F"], ["\uA722", "\uA788"], ["\uA78B", "\uA7B9"], ["\uA7F7", "\uA801"], ["\uA803", "\uA805"], ["\uA807", "\uA80A"], ["\uA80C", "\uA822"], ["\uA840", "\uA873"], ["\uA882", "\uA8B3"], ["\uA8F2", "\uA8F7"], "\uA8FB", ["\uA8FD", "\uA8FE"], ["\uA90A", "\uA925"], ["\uA930", "\uA946"], ["\uA960", "\uA97C"], ["\uA984", "\uA9B2"], "\uA9CF", ["\uA9E0", "\uA9E4"], ["\uA9E6", "\uA9EF"], ["\uA9FA", "\uA9FE"], ["\uAA00", "\uAA28"], ["\uAA40", "\uAA42"], ["\uAA44", "\uAA4B"], ["\uAA60", "\uAA76"], "\uAA7A", ["\uAA7E", "\uAAAF"], "\uAAB1", ["\uAAB5", "\uAAB6"], ["\uAAB9", "\uAABD"], "\uAAC0", "\uAAC2", ["\uAADB", "\uAADD"], ["\uAAE0", "\uAAEA"], ["\uAAF2", "\uAAF4"], ["\uAB01", "\uAB06"], ["\uAB09", "\uAB0E"], ["\uAB11", "\uAB16"], ["\uAB20", "\uAB26"], ["\uAB28", "\uAB2E"], ["\uAB30", "\uAB5A"], ["\uAB5C", "\uAB65"], ["\uAB70", "\uABE2"], ["\uAC00", "\uD7A3"], ["\uD7B0", "\uD7C6"], ["\uD7CB", "\uD7FB"], ["\uF900", "\uFA6D"], ["\uFA70", "\uFAD9"], ["\uFB00", "\uFB06"], ["\uFB13", "\uFB17"], "\uFB1D", ["\uFB1F", "\uFB28"], ["\uFB2A", "\uFB36"], ["\uFB38", "\uFB3C"], "\uFB3E", ["\uFB40", "\uFB41"], ["\uFB43", "\uFB44"], ["\uFB46", "\uFBB1"], ["\uFBD3", "\uFD3D"], ["\uFD50", "\uFD8F"], ["\uFD92", "\uFDC7"], ["\uFDF0", "\uFDFB"], ["\uFE70", "\uFE74"], ["\uFE76", "\uFEFC"], ["\uFF21", "\uFF3A"], ["\uFF41", "\uFF5A"], ["\uFF66", "\uFFBE"], ["\uFFC2", "\uFFC7"], ["\uFFCA", "\uFFCF"], ["\uFFD2", "\uFFD7"], ["\uFFDA", "\uFFDC"]], false, false);
|
|
27144
27180
|
var peg$e21 = peg$classExpectation([["\u0300", "\u036F"], ["\u0483", "\u0487"], ["\u0591", "\u05BD"], "\u05BF", ["\u05C1", "\u05C2"], ["\u05C4", "\u05C5"], "\u05C7", ["\u0610", "\u061A"], ["\u064B", "\u065F"], "\u0670", ["\u06D6", "\u06DC"], ["\u06DF", "\u06E4"], ["\u06E7", "\u06E8"], ["\u06EA", "\u06ED"], "\u0711", ["\u0730", "\u074A"], ["\u07A6", "\u07B0"], ["\u07EB", "\u07F3"], "\u07FD", ["\u0816", "\u0819"], ["\u081B", "\u0823"], ["\u0825", "\u0827"], ["\u0829", "\u082D"], ["\u0859", "\u085B"], ["\u08D3", "\u08E1"], ["\u08E3", "\u0903"], ["\u093A", "\u093C"], ["\u093E", "\u094F"], ["\u0951", "\u0957"], ["\u0962", "\u0963"], ["\u0981", "\u0983"], "\u09BC", ["\u09BE", "\u09C4"], ["\u09C7", "\u09C8"], ["\u09CB", "\u09CD"], "\u09D7", ["\u09E2", "\u09E3"], "\u09FE", ["\u0A01", "\u0A03"], "\u0A3C", ["\u0A3E", "\u0A42"], ["\u0A47", "\u0A48"], ["\u0A4B", "\u0A4D"], "\u0A51", ["\u0A70", "\u0A71"], "\u0A75", ["\u0A81", "\u0A83"], "\u0ABC", ["\u0ABE", "\u0AC5"], ["\u0AC7", "\u0AC9"], ["\u0ACB", "\u0ACD"], ["\u0AE2", "\u0AE3"], ["\u0AFA", "\u0AFF"], ["\u0B01", "\u0B03"], "\u0B3C", ["\u0B3E", "\u0B44"], ["\u0B47", "\u0B48"], ["\u0B4B", "\u0B4D"], ["\u0B56", "\u0B57"], ["\u0B62", "\u0B63"], "\u0B82", ["\u0BBE", "\u0BC2"], ["\u0BC6", "\u0BC8"], ["\u0BCA", "\u0BCD"], "\u0BD7", ["\u0C00", "\u0C04"], ["\u0C3E", "\u0C44"], ["\u0C46", "\u0C48"], ["\u0C4A", "\u0C4D"], ["\u0C55", "\u0C56"], ["\u0C62", "\u0C63"], ["\u0C81", "\u0C83"], "\u0CBC", ["\u0CBE", "\u0CC4"], ["\u0CC6", "\u0CC8"], ["\u0CCA", "\u0CCD"], ["\u0CD5", "\u0CD6"], ["\u0CE2", "\u0CE3"], ["\u0D00", "\u0D03"], ["\u0D3B", "\u0D3C"], ["\u0D3E", "\u0D44"], ["\u0D46", "\u0D48"], ["\u0D4A", "\u0D4D"], "\u0D57", ["\u0D62", "\u0D63"], ["\u0D82", "\u0D83"], "\u0DCA", ["\u0DCF", "\u0DD4"], "\u0DD6", ["\u0DD8", "\u0DDF"], ["\u0DF2", "\u0DF3"], "\u0E31", ["\u0E34", "\u0E3A"], ["\u0E47", "\u0E4E"], "\u0EB1", ["\u0EB4", "\u0EB9"], ["\u0EBB", "\u0EBC"], ["\u0EC8", "\u0ECD"], ["\u0F18", "\u0F19"], "\u0F35", "\u0F37", "\u0F39", ["\u0F3E", "\u0F3F"], ["\u0F71", "\u0F84"], ["\u0F86", "\u0F87"], ["\u0F8D", "\u0F97"], ["\u0F99", "\u0FBC"], "\u0FC6", ["\u102B", "\u103E"], ["\u1056", "\u1059"], ["\u105E", "\u1060"], ["\u1062", "\u1064"], ["\u1067", "\u106D"], ["\u1071", "\u1074"], ["\u1082", "\u108D"], "\u108F", ["\u109A", "\u109D"], ["\u135D", "\u135F"], ["\u1712", "\u1714"], ["\u1732", "\u1734"], ["\u1752", "\u1753"], ["\u1772", "\u1773"], ["\u17B4", "\u17D3"], "\u17DD", ["\u180B", "\u180D"], ["\u1885", "\u1886"], "\u18A9", ["\u1920", "\u192B"], ["\u1930", "\u193B"], ["\u1A17", "\u1A1B"], ["\u1A55", "\u1A5E"], ["\u1A60", "\u1A7C"], "\u1A7F", ["\u1AB0", "\u1ABD"], ["\u1B00", "\u1B04"], ["\u1B34", "\u1B44"], ["\u1B6B", "\u1B73"], ["\u1B80", "\u1B82"], ["\u1BA1", "\u1BAD"], ["\u1BE6", "\u1BF3"], ["\u1C24", "\u1C37"], ["\u1CD0", "\u1CD2"], ["\u1CD4", "\u1CE8"], "\u1CED", ["\u1CF2", "\u1CF4"], ["\u1CF7", "\u1CF9"], ["\u1DC0", "\u1DF9"], ["\u1DFB", "\u1DFF"], ["\u20D0", "\u20DC"], "\u20E1", ["\u20E5", "\u20F0"], ["\u2CEF", "\u2CF1"], "\u2D7F", ["\u2DE0", "\u2DFF"], ["\u302A", "\u302F"], ["\u3099", "\u309A"], "\uA66F", ["\uA674", "\uA67D"], ["\uA69E", "\uA69F"], ["\uA6F0", "\uA6F1"], "\uA802", "\uA806", "\uA80B", ["\uA823", "\uA827"], ["\uA880", "\uA881"], ["\uA8B4", "\uA8C5"], ["\uA8E0", "\uA8F1"], "\uA8FF", ["\uA926", "\uA92D"], ["\uA947", "\uA953"], ["\uA980", "\uA983"], ["\uA9B3", "\uA9C0"], "\uA9E5", ["\uAA29", "\uAA36"], "\uAA43", ["\uAA4C", "\uAA4D"], ["\uAA7B", "\uAA7D"], "\uAAB0", ["\uAAB2", "\uAAB4"], ["\uAAB7", "\uAAB8"], ["\uAABE", "\uAABF"], "\uAAC1", ["\uAAEB", "\uAAEF"], ["\uAAF5", "\uAAF6"], ["\uABE3", "\uABEA"], ["\uABEC", "\uABED"], "\uFB1E", ["\uFE00", "\uFE0F"], ["\uFE20", "\uFE2F"]], false, false);
|
|
27145
27181
|
var peg$e22 = peg$otherExpectation("whitespace");
|
|
@@ -28811,7 +28847,7 @@ async function resolve_literals(qualifier, default_source, deviceInfo, cache) {
|
|
|
28811
28847
|
);
|
|
28812
28848
|
if (!(0, import_chunk_JDC43A3I.hasProperty)(cache.resolvedPaths, resolved)) {
|
|
28813
28849
|
if (/[*?[\]{}]/.test(resolved)) {
|
|
28814
|
-
cache.resolvedPaths[resolved] = (0,
|
|
28850
|
+
cache.resolvedPaths[resolved] = (0, import_chunk_X7QCZR3F.globSome)(resolved, () => true);
|
|
28815
28851
|
} else {
|
|
28816
28852
|
cache.resolvedPaths[resolved] = fs5.stat(resolved).then(
|
|
28817
28853
|
() => true,
|
|
@@ -28890,12 +28926,12 @@ async function read_resource_files(targets, cache) {
|
|
|
28890
28926
|
if (!(0, import_chunk_JDC43A3I.hasProperty)(resourceGroupPromises, key)) {
|
|
28891
28927
|
resourceGroupPromises[key] = Promise.all(
|
|
28892
28928
|
p.qualifier.resourcePath.map(
|
|
28893
|
-
(pattern) => (0,
|
|
28929
|
+
(pattern) => (0, import_chunk_X7QCZR3F.globa)(pattern, { mark: true })
|
|
28894
28930
|
)
|
|
28895
28931
|
).then(
|
|
28896
28932
|
(patterns) => Promise.all(
|
|
28897
28933
|
patterns.flat().map(
|
|
28898
|
-
(path7) => path7.endsWith("/") ? (0,
|
|
28934
|
+
(path7) => path7.endsWith("/") ? (0, import_chunk_X7QCZR3F.globa)(`${path7}**/*.xml`, { mark: true }) : path7
|
|
28899
28935
|
)
|
|
28900
28936
|
)
|
|
28901
28937
|
).then(
|
|
@@ -28955,7 +28991,7 @@ async function find_build_instructions_in_resource(file, rez, buildDependencies)
|
|
|
28955
28991
|
const sourceExcludes = excludes.map((e) => e.file?.value.value).filter((f) => f != null).map((f) => path2.resolve(dir, f).replace(/\\/g, "/"));
|
|
28956
28992
|
const filePatterns = excludes.map((e) => e.dir?.value.value).filter((f) => f != null).map((f) => path2.join(dir, f, "**", "*.mc").replace(/\\/g, "/"));
|
|
28957
28993
|
if (filePatterns.length) {
|
|
28958
|
-
const files = (await Promise.all(filePatterns.map((p) => (0,
|
|
28994
|
+
const files = (await Promise.all(filePatterns.map((p) => (0, import_chunk_X7QCZR3F.globa)(p)))).flat();
|
|
28959
28995
|
sourceExcludes.push(...files);
|
|
28960
28996
|
}
|
|
28961
28997
|
const excludeAnnotations = excludes.map((e) => e.annotation?.value.value).filter((f) => f != null);
|
|
@@ -29132,15 +29168,15 @@ function identify_optimizer_groups(targets, options) {
|
|
|
29132
29168
|
function find_barrels(barrelPath, buildDependencies) {
|
|
29133
29169
|
return (Array.isArray(barrelPath) ? (
|
|
29134
29170
|
// This is a sublist. The barrel has more than one jungle file.
|
|
29135
|
-
Promise.all(barrelPath.map((path7) => (0,
|
|
29171
|
+
Promise.all(barrelPath.map((path7) => (0, import_chunk_X7QCZR3F.globa)(path7, { mark: true }))).then(
|
|
29136
29172
|
(paths) => [
|
|
29137
29173
|
paths.flat().filter((path7) => path7.endsWith(".jungle")).join(";")
|
|
29138
29174
|
]
|
|
29139
29175
|
)
|
|
29140
|
-
) : (0,
|
|
29176
|
+
) : (0, import_chunk_X7QCZR3F.globa)(barrelPath, { mark: true }).then(
|
|
29141
29177
|
(paths) => Promise.all(
|
|
29142
29178
|
paths.map(
|
|
29143
|
-
(path7) => path7.endsWith("/") ? (0,
|
|
29179
|
+
(path7) => path7.endsWith("/") ? (0, import_chunk_X7QCZR3F.globa)(`${path7}**/*.barrel`) : path7
|
|
29144
29180
|
)
|
|
29145
29181
|
)
|
|
29146
29182
|
).then(
|
|
@@ -29148,7 +29184,7 @@ function find_barrels(barrelPath, buildDependencies) {
|
|
|
29148
29184
|
(path7) => path7.endsWith(".jungle") || path7.endsWith(".barrel")
|
|
29149
29185
|
)
|
|
29150
29186
|
)).then((paths) => {
|
|
29151
|
-
(0,
|
|
29187
|
+
(0, import_chunk_X7QCZR3F.forEach)(
|
|
29152
29188
|
barrelPath,
|
|
29153
29189
|
(path7) => /[*?[\]{}]/.test(path7) || (buildDependencies[path7] = true)
|
|
29154
29190
|
);
|
|
@@ -29425,7 +29461,7 @@ var init_jungles = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
29425
29461
|
init_api();
|
|
29426
29462
|
init_manifest();
|
|
29427
29463
|
init_sdk_util();
|
|
29428
|
-
(0,
|
|
29464
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
29429
29465
|
depth = 0;
|
|
29430
29466
|
}
|
|
29431
29467
|
});
|
|
@@ -29453,7 +29489,7 @@ async function launchSimulator(force = true) {
|
|
|
29453
29489
|
await new Promise((r) => setTimeout(r, 200));
|
|
29454
29490
|
}
|
|
29455
29491
|
} catch (e) {
|
|
29456
|
-
(0,
|
|
29492
|
+
(0, import_chunk_X7QCZR3F.log)(e);
|
|
29457
29493
|
}
|
|
29458
29494
|
}
|
|
29459
29495
|
function checkIfSimulatorRunning() {
|
|
@@ -29484,10 +29520,10 @@ function simulateProgram(prg, device, test = false, logger2) {
|
|
|
29484
29520
|
}
|
|
29485
29521
|
}
|
|
29486
29522
|
return getSdkPath().then(
|
|
29487
|
-
(sdk) => (0,
|
|
29523
|
+
(sdk) => (0, import_chunk_X7QCZR3F.spawnByLine)(
|
|
29488
29524
|
path3.resolve(sdk, "bin", isWin ? "monkeydo.bat" : "monkeydo"),
|
|
29489
29525
|
args,
|
|
29490
|
-
logger2 || ((line) => (0,
|
|
29526
|
+
logger2 || ((line) => (0, import_chunk_X7QCZR3F.log)(line))
|
|
29491
29527
|
).then(() => {
|
|
29492
29528
|
return;
|
|
29493
29529
|
})
|
|
@@ -29497,7 +29533,7 @@ var init_launch = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
29497
29533
|
"src/launch.ts"() {
|
|
29498
29534
|
"use strict";
|
|
29499
29535
|
init_sdk_util();
|
|
29500
|
-
(0,
|
|
29536
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
29501
29537
|
}
|
|
29502
29538
|
});
|
|
29503
29539
|
async function analyze_module_types(state) {
|
|
@@ -29518,7 +29554,7 @@ async function analyze_module_types(state) {
|
|
|
29518
29554
|
for (const module2 of modulesSet) {
|
|
29519
29555
|
modulesSet.delete(module2);
|
|
29520
29556
|
const istate = buildTypeInfo(state, module2, false);
|
|
29521
|
-
await (0,
|
|
29557
|
+
await (0, import_chunk_X7QCZR3F.log)();
|
|
29522
29558
|
if (istate?.typeMap) {
|
|
29523
29559
|
moduleMap.set(module2, istate);
|
|
29524
29560
|
istate.dependencies?.forEach((flags, other) => {
|
|
@@ -29597,7 +29633,7 @@ var init_module_types = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
29597
29633
|
init_interp();
|
|
29598
29634
|
init_sub_type();
|
|
29599
29635
|
init_types();
|
|
29600
|
-
(0,
|
|
29636
|
+
(0, import_chunk_X7QCZR3F.init_logger)();
|
|
29601
29637
|
}
|
|
29602
29638
|
});
|
|
29603
29639
|
function relative_path_no_dotdot(relative2) {
|
|
@@ -29618,7 +29654,7 @@ async function getCodeWorkspaceSettings(folder) {
|
|
|
29618
29654
|
let curDir = folder;
|
|
29619
29655
|
try {
|
|
29620
29656
|
while (curDir) {
|
|
29621
|
-
const code_workspaces = await (0,
|
|
29657
|
+
const code_workspaces = await (0, import_chunk_X7QCZR3F.globa)(
|
|
29622
29658
|
path4.resolve(curDir, "*.code-workspace"),
|
|
29623
29659
|
{ onlyFiles: true }
|
|
29624
29660
|
);
|
|
@@ -29746,7 +29782,7 @@ async function createLocalBarrels(targets, options) {
|
|
|
29746
29782
|
optBarrelDir
|
|
29747
29783
|
};
|
|
29748
29784
|
return promise2.then(
|
|
29749
|
-
() => (0,
|
|
29785
|
+
() => (0, import_chunk_X7QCZR3F.copyRecursiveAsNeeded)(
|
|
29750
29786
|
rawBarrelDir,
|
|
29751
29787
|
optBarrelDir,
|
|
29752
29788
|
(src) => !src.endsWith(".mc")
|
|
@@ -30047,7 +30083,7 @@ async function filesFromPaths(workspace, buildDir, inPaths, extension) {
|
|
|
30047
30083
|
const filter = buildDir.startsWith(workspace);
|
|
30048
30084
|
const paths = (await Promise.all(
|
|
30049
30085
|
inPaths?.map(
|
|
30050
|
-
(pattern) => (0,
|
|
30086
|
+
(pattern) => (0, import_chunk_X7QCZR3F.globa)(pattern, { cwd: workspace, mark: true }).then(
|
|
30051
30087
|
(paths2) => paths2.map((p) => ({
|
|
30052
30088
|
path: p,
|
|
30053
30089
|
filter: filter && /^\*\*[\\/]\*\.mc$/i.test(path4.relative(workspace, pattern))
|
|
@@ -30057,7 +30093,7 @@ async function filesFromPaths(workspace, buildDir, inPaths, extension) {
|
|
|
30057
30093
|
)).flat();
|
|
30058
30094
|
const files = await Promise.all(
|
|
30059
30095
|
paths.map(
|
|
30060
|
-
(result) => result.path.endsWith("/") ? (0,
|
|
30096
|
+
(result) => result.path.endsWith("/") ? (0, import_chunk_X7QCZR3F.globa)(`${result.path}**/*${extension}`, {
|
|
30061
30097
|
cwd: workspace,
|
|
30062
30098
|
mark: true
|
|
30063
30099
|
}).then(
|
|
@@ -30184,7 +30220,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
30184
30220
|
})
|
|
30185
30221
|
);
|
|
30186
30222
|
}
|
|
30187
|
-
const actualOptimizedFiles = (await (0,
|
|
30223
|
+
const actualOptimizedFiles = (await (0, import_chunk_X7QCZR3F.globa)(path4.join(output, "**", "*.mc"), { mark: true })).filter((file) => !file.endsWith("/")).sort();
|
|
30188
30224
|
const {
|
|
30189
30225
|
hasTests,
|
|
30190
30226
|
diagnostics: prevDiagnostics,
|
|
@@ -30200,13 +30236,13 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
30200
30236
|
const sdk = await getSdkPath();
|
|
30201
30237
|
const match = sdk.match(/-(\d+\.\d+\.\d+)/);
|
|
30202
30238
|
if ((match && parseSdkVersion(match[1])) === prevSdkVersion) {
|
|
30203
|
-
const source_time = await (0,
|
|
30239
|
+
const source_time = await (0, import_chunk_X7QCZR3F.last_modified)(
|
|
30204
30240
|
Object.keys(fnMap).concat(dependencyFiles)
|
|
30205
30241
|
);
|
|
30206
|
-
const opt_time = await (0,
|
|
30242
|
+
const opt_time = await (0, import_chunk_X7QCZR3F.first_modified)(
|
|
30207
30243
|
Object.values(fnMap).map((v) => v.output)
|
|
30208
30244
|
);
|
|
30209
|
-
if (source_time < opt_time &&
|
|
30245
|
+
if (source_time < opt_time && 1732126457866 < opt_time) {
|
|
30210
30246
|
return {
|
|
30211
30247
|
hasTests,
|
|
30212
30248
|
diagnostics: prevDiagnostics,
|
|
@@ -30244,7 +30280,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
30244
30280
|
hasTests: hasTests2,
|
|
30245
30281
|
diagnostics,
|
|
30246
30282
|
sdkVersion,
|
|
30247
|
-
optimizerVersion: "1.1.
|
|
30283
|
+
optimizerVersion: "1.1.81",
|
|
30248
30284
|
...Object.fromEntries(
|
|
30249
30285
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
30250
30286
|
)
|
|
@@ -30258,7 +30294,7 @@ function getProjectAnalysis(targets, analysis, manifestXML, options) {
|
|
|
30258
30294
|
return getConfig(options).then(
|
|
30259
30295
|
(options2) => getProjectAnalysisHelper(targets, analysis, manifestXML, options2)
|
|
30260
30296
|
).catch(
|
|
30261
|
-
(ex) => Promise.reject(ex instanceof
|
|
30297
|
+
(ex) => Promise.reject(ex instanceof import_chunk_X7QCZR3F.AwaitedError ? ex.resolve() : ex)
|
|
30262
30298
|
);
|
|
30263
30299
|
}
|
|
30264
30300
|
async function getProjectAnalysisHelper(targets, analysis, manifestXML, options) {
|
|
@@ -30383,7 +30419,7 @@ var init_optimizer = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
30383
30419
|
init_sdk_util();
|
|
30384
30420
|
init_interp();
|
|
30385
30421
|
init_module_types();
|
|
30386
|
-
(0,
|
|
30422
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
30387
30423
|
init_worker_pool();
|
|
30388
30424
|
init_optimizer_types();
|
|
30389
30425
|
init_types();
|
|
@@ -30443,7 +30479,7 @@ async function performTask(task) {
|
|
|
30443
30479
|
throw new Error(`Invalid task type ${type}`);
|
|
30444
30480
|
}
|
|
30445
30481
|
return Promise.resolve(handler(task.data)).then(
|
|
30446
|
-
(result) =>
|
|
30482
|
+
(result) => import_chunk_X7QCZR3F.logPromise.then(() => result)
|
|
30447
30483
|
);
|
|
30448
30484
|
}
|
|
30449
30485
|
var workerTaskHandlers;
|
|
@@ -30453,7 +30489,7 @@ var init_worker_task = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
30453
30489
|
init_optimizer();
|
|
30454
30490
|
init_readprg();
|
|
30455
30491
|
init_sdk_util();
|
|
30456
|
-
(0,
|
|
30492
|
+
(0, import_chunk_X7QCZR3F.init_logger)();
|
|
30457
30493
|
workerTaskHandlers = {
|
|
30458
30494
|
buildOptimizedProject(data) {
|
|
30459
30495
|
return buildOptimizedProject(data.product, data.options);
|
|
@@ -30671,7 +30707,7 @@ async function optimizeProgram(filepath, devKey, output, config) {
|
|
|
30671
30707
|
}
|
|
30672
30708
|
function optimizeProgramBuffer(filepath, view, debugXml, apiDebugXml, key, config) {
|
|
30673
30709
|
const { sections } = readPrgWithOffsets(view);
|
|
30674
|
-
(0,
|
|
30710
|
+
(0, import_chunk_X7QCZR3F.logger)("readprg", 5, sections);
|
|
30675
30711
|
const symbolTable = new SymbolTable();
|
|
30676
30712
|
if ((0, import_chunk_JDC43A3I.hasProperty)(sections, 1461170197 .toString())) {
|
|
30677
30713
|
symbolTable.parse(sections[
|
|
@@ -30971,7 +31007,7 @@ var init_readprg = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
30971
31007
|
init_signer();
|
|
30972
31008
|
init_symbols();
|
|
30973
31009
|
init_sdk_util();
|
|
30974
|
-
(0,
|
|
31010
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
30975
31011
|
init_worker_pool();
|
|
30976
31012
|
}
|
|
30977
31013
|
});
|
|
@@ -30983,7 +31019,7 @@ function getSdkPath() {
|
|
|
30983
31019
|
});
|
|
30984
31020
|
}
|
|
30985
31021
|
async function getDeviceInfo() {
|
|
30986
|
-
const files = await (0,
|
|
31022
|
+
const files = await (0, import_chunk_X7QCZR3F.globa)(`${connectiq}/Devices/*/compiler.json`);
|
|
30987
31023
|
if (!files.length) {
|
|
30988
31024
|
throw new Error(
|
|
30989
31025
|
`No devices found at '${connectiq}/Devices'. Check your sdk is correctly installed`
|
|
@@ -31051,7 +31087,7 @@ async function getFunctionDocumentation() {
|
|
|
31051
31087
|
var isWin, appSupport, connectiq;
|
|
31052
31088
|
var init_sdk_util = (0, import_chunk_ABYVSU2C.__esm)({
|
|
31053
31089
|
"src/sdk-util.ts"() {
|
|
31054
|
-
(0,
|
|
31090
|
+
(0, import_chunk_X7QCZR3F.init_util)();
|
|
31055
31091
|
init_xml_util();
|
|
31056
31092
|
init_readprg();
|
|
31057
31093
|
init_bytecode();
|