@markw65/monkeyc-optimizer 1.1.31 → 1.1.32
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/README.md +13 -0
- package/build/api.cjs +31 -31
- package/build/{chunk-6OD3V3XN.cjs → chunk-NUE3G2QE.cjs} +102 -50
- package/build/optimizer.cjs +17 -17
- package/build/sdk-util.cjs +14 -14
- package/build/worker-thread.cjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -909,3 +909,16 @@ No functional change, just fixes a typo that broke the typescript exports.
|
|
|
909
909
|
- Update getApiMapping to handle api.mir from sdk-6.2.0
|
|
910
910
|
- Update various tests to work with sdk-6.2.0 (including marking one test as an expected failure)
|
|
911
911
|
- Add a test to catch the export-project-using-barrels bug that was fixed in 1.1.30
|
|
912
|
+
|
|
913
|
+
### 1.1.32
|
|
914
|
+
|
|
915
|
+
- Bug fixes
|
|
916
|
+
|
|
917
|
+
- Don't optimize `do { BODY } while (false);` to `{ BODY }` if `BODY` contains `break` or `continue`
|
|
918
|
+
- In some circumstances, a comparison between a known `Long` and a known `Char` could be inferred to be false, regardless of the values (eg `42l == '*'` which should be `true`). It would eventually be folded to the correct value, but in some circumstances, an incorrect warning could be issued, or an incorrect optimization could have already been performed.
|
|
919
|
+
|
|
920
|
+
- Fixes for sdk-6.2.x
|
|
921
|
+
|
|
922
|
+
- sdk-6.2.x fixes [this finally bug](https://forums.garmin.com/developer/connect-iq/i/bug-reports/finally-doesn-t-work-as-expected), so that now all the examples work correctly (ie the `finally` block always executes, as expected, no matter how you exit the `try` or `catch` blocks). I've updated the way the control flow graph is built to match this behavior.
|
|
923
|
+
|
|
924
|
+
- sdk-6.2.x fixes [this continue in switch issue](https://forums.garmin.com/developer/connect-iq/i/bug-reports/continue-in-a-switch-statement-behaves-surprisingly), by making `continue` in a `switch` continue the loop containing the switch (or its a compile time error if there's no loop). This matches the behavior of C and C++, for example. I've updated the optimizer to interpret `continue` appropriately, depending on the sdk version.
|
package/build/api.cjs
CHANGED
|
@@ -18,44 +18,44 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var api_exports = {};
|
|
20
20
|
__export(api_exports, {
|
|
21
|
-
checkCompilerVersion: () =>
|
|
22
|
-
collectNamespaces: () =>
|
|
23
|
-
createDocumentationMap: () =>
|
|
24
|
-
diagnostic: () =>
|
|
25
|
-
diagnosticHelper: () =>
|
|
26
|
-
findNamesInScope: () =>
|
|
27
|
-
findUsingForNode: () =>
|
|
28
|
-
formatAst: () =>
|
|
29
|
-
formatAstLongLines: () =>
|
|
30
|
-
getApiFunctionInfo: () =>
|
|
31
|
-
getApiMapping: () =>
|
|
32
|
-
getSuperClasses: () =>
|
|
21
|
+
checkCompilerVersion: () => import_chunk_NUE3G2QE.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_NUE3G2QE.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_NUE3G2QE.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_NUE3G2QE.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_NUE3G2QE.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_NUE3G2QE.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_NUE3G2QE.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_NUE3G2QE.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_NUE3G2QE.formatAstLongLines,
|
|
30
|
+
getApiFunctionInfo: () => import_chunk_NUE3G2QE.getApiFunctionInfo,
|
|
31
|
+
getApiMapping: () => import_chunk_NUE3G2QE.getApiMapping,
|
|
32
|
+
getSuperClasses: () => import_chunk_NUE3G2QE.getSuperClasses,
|
|
33
33
|
hasProperty: () => import_chunk_MBTLUWXR.hasProperty,
|
|
34
|
-
isClassVariable: () =>
|
|
35
|
-
isLocal: () =>
|
|
36
|
-
isLookupCandidate: () =>
|
|
37
|
-
isStateNode: () =>
|
|
38
|
-
lookupByFullName: () =>
|
|
39
|
-
lookupNext: () =>
|
|
40
|
-
lookupResultContains: () =>
|
|
41
|
-
lookupWithType: () =>
|
|
42
|
-
makeToyboxLink: () =>
|
|
43
|
-
mapVarDeclsByType: () =>
|
|
44
|
-
markInvokeClassMethod: () =>
|
|
45
|
-
parseSdkVersion: () =>
|
|
46
|
-
sameLookupResult: () =>
|
|
34
|
+
isClassVariable: () => import_chunk_NUE3G2QE.isClassVariable,
|
|
35
|
+
isLocal: () => import_chunk_NUE3G2QE.isLocal,
|
|
36
|
+
isLookupCandidate: () => import_chunk_NUE3G2QE.isLookupCandidate,
|
|
37
|
+
isStateNode: () => import_chunk_NUE3G2QE.isStateNode,
|
|
38
|
+
lookupByFullName: () => import_chunk_NUE3G2QE.lookupByFullName,
|
|
39
|
+
lookupNext: () => import_chunk_NUE3G2QE.lookupNext,
|
|
40
|
+
lookupResultContains: () => import_chunk_NUE3G2QE.lookupResultContains,
|
|
41
|
+
lookupWithType: () => import_chunk_NUE3G2QE.lookupWithType,
|
|
42
|
+
makeToyboxLink: () => import_chunk_NUE3G2QE.makeToyboxLink,
|
|
43
|
+
mapVarDeclsByType: () => import_chunk_NUE3G2QE.mapVarDeclsByType,
|
|
44
|
+
markInvokeClassMethod: () => import_chunk_NUE3G2QE.markInvokeClassMethod,
|
|
45
|
+
parseSdkVersion: () => import_chunk_NUE3G2QE.parseSdkVersion,
|
|
46
|
+
sameLookupResult: () => import_chunk_NUE3G2QE.sameLookupResult,
|
|
47
47
|
traverseAst: () => import_chunk_MBTLUWXR.traverseAst,
|
|
48
|
-
variableDeclarationName: () =>
|
|
49
|
-
visitReferences: () =>
|
|
50
|
-
visit_resources: () =>
|
|
51
|
-
visitorNode: () =>
|
|
48
|
+
variableDeclarationName: () => import_chunk_NUE3G2QE.variableDeclarationName,
|
|
49
|
+
visitReferences: () => import_chunk_NUE3G2QE.visitReferences,
|
|
50
|
+
visit_resources: () => import_chunk_NUE3G2QE.visit_resources,
|
|
51
|
+
visitorNode: () => import_chunk_NUE3G2QE.visitorNode
|
|
52
52
|
});
|
|
53
53
|
module.exports = __toCommonJS(api_exports);
|
|
54
|
-
var
|
|
54
|
+
var import_chunk_NUE3G2QE = require("./chunk-NUE3G2QE.cjs");
|
|
55
55
|
var import_chunk_PVBIKZYZ = require("./chunk-PVBIKZYZ.cjs");
|
|
56
56
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
57
57
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
58
|
-
(0,
|
|
58
|
+
(0, import_chunk_NUE3G2QE.init_api)();
|
|
59
59
|
// Annotate the CommonJS export names for ESM import in node:
|
|
60
60
|
0 && (module.exports = {
|
|
61
61
|
checkCompilerVersion,
|
|
@@ -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_NUE3G2QE_exports = {};
|
|
30
|
+
__export(chunk_NUE3G2QE_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -122,7 +122,7 @@ __export(chunk_6OD3V3XN_exports, {
|
|
|
122
122
|
visitorNode: () => visitorNode,
|
|
123
123
|
xml_util_exports: () => xml_util_exports
|
|
124
124
|
});
|
|
125
|
-
module.exports = __toCommonJS(
|
|
125
|
+
module.exports = __toCommonJS(chunk_NUE3G2QE_exports);
|
|
126
126
|
var import_chunk_PVBIKZYZ = require("./chunk-PVBIKZYZ.cjs");
|
|
127
127
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
128
128
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
@@ -8899,6 +8899,9 @@ function buildReducedGraph(state, func, refsForUpdate, notice) {
|
|
|
8899
8899
|
case "TryStatement": {
|
|
8900
8900
|
const top = localState.push(node);
|
|
8901
8901
|
const catches = top.throw = {};
|
|
8902
|
+
if (node.finalizer) {
|
|
8903
|
+
top.finally = {};
|
|
8904
|
+
}
|
|
8902
8905
|
localState.addEdge(localState.curBlock, top.throw);
|
|
8903
8906
|
localState.newBlock();
|
|
8904
8907
|
tryActive++;
|
|
@@ -8907,43 +8910,37 @@ function buildReducedGraph(state, func, refsForUpdate, notice) {
|
|
|
8907
8910
|
delete top.throw;
|
|
8908
8911
|
top.posttry = {};
|
|
8909
8912
|
const tryFallsThrough = !localState.unreachable;
|
|
8910
|
-
if (
|
|
8911
|
-
|
|
8912
|
-
top.throw = top.finally = {};
|
|
8913
|
-
localState.addEdge(localState.curBlock, top.finally);
|
|
8914
|
-
} else {
|
|
8915
|
-
if (!localState.unreachable) {
|
|
8916
|
-
localState.addEdge(localState.curBlock, top.posttry);
|
|
8917
|
-
}
|
|
8913
|
+
if (tryFallsThrough) {
|
|
8914
|
+
localState.addEdge(localState.curBlock, top.finally ?? top.posttry);
|
|
8918
8915
|
}
|
|
8919
8916
|
localState.unreachable = true;
|
|
8920
8917
|
localState.newBlock(catches);
|
|
8921
8918
|
if (node.handler) {
|
|
8922
8919
|
state.traverse(node.handler);
|
|
8923
|
-
if (top.throw) {
|
|
8924
|
-
tryActive--;
|
|
8925
|
-
delete top.throw;
|
|
8926
|
-
}
|
|
8927
8920
|
if (localState.curBlock.preds) {
|
|
8928
8921
|
localState.terminal("ThrowStatement");
|
|
8929
8922
|
}
|
|
8930
8923
|
}
|
|
8931
|
-
if (top.throw) {
|
|
8932
|
-
tryActive--;
|
|
8933
|
-
delete top.throw;
|
|
8934
|
-
}
|
|
8935
8924
|
if (node.finalizer) {
|
|
8936
8925
|
localState.unreachable = true;
|
|
8937
8926
|
localState.newBlock(top.finally);
|
|
8938
8927
|
delete top.finally;
|
|
8939
8928
|
state.traverse(node.finalizer);
|
|
8940
|
-
if (
|
|
8941
|
-
|
|
8929
|
+
if (!localState.unreachable) {
|
|
8930
|
+
if (tryFallsThrough) {
|
|
8931
|
+
localState.addEdge(localState.curBlock, top.posttry);
|
|
8932
|
+
}
|
|
8933
|
+
top.postfinally?.forEach(
|
|
8934
|
+
(post2) => localState.addEdge(localState.curBlock, post2)
|
|
8935
|
+
);
|
|
8942
8936
|
}
|
|
8943
8937
|
localState.terminal("ThrowStatement");
|
|
8944
8938
|
}
|
|
8945
8939
|
localState.unreachable = true;
|
|
8946
8940
|
localState.newBlock(top.posttry);
|
|
8941
|
+
if (!top.posttry.preds) {
|
|
8942
|
+
localState.unreachable = true;
|
|
8943
|
+
}
|
|
8947
8944
|
return [];
|
|
8948
8945
|
}
|
|
8949
8946
|
case "CatchClause": {
|
|
@@ -8958,13 +8955,11 @@ function buildReducedGraph(state, func, refsForUpdate, notice) {
|
|
|
8958
8955
|
localState.newBlock();
|
|
8959
8956
|
}
|
|
8960
8957
|
state.traverse(node.body);
|
|
8961
|
-
if (top.finally) {
|
|
8962
|
-
localState.addEdge(localState.curBlock, top.finally);
|
|
8963
|
-
}
|
|
8964
8958
|
if (!localState.unreachable) {
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8959
|
+
localState.addEdge(
|
|
8960
|
+
localState.curBlock,
|
|
8961
|
+
top.finally ?? top.posttry
|
|
8962
|
+
);
|
|
8968
8963
|
}
|
|
8969
8964
|
localState.unreachable = true;
|
|
8970
8965
|
localState.newBlock(next);
|
|
@@ -9352,13 +9347,29 @@ var init_control_flow = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
9352
9347
|
}
|
|
9353
9348
|
terminal(type) {
|
|
9354
9349
|
const re = Terminals[type];
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9350
|
+
let finalies = null;
|
|
9351
|
+
for (let i = this.stack.length; i--; ) {
|
|
9352
|
+
const fin = this.stack[i].finally;
|
|
9353
|
+
if (fin && (re !== "throw" || !this.stack[i].throw)) {
|
|
9354
|
+
this.addEdge(this.curBlock, fin);
|
|
9355
|
+
if (!finalies) {
|
|
9356
|
+
finalies = /* @__PURE__ */ new Set();
|
|
9361
9357
|
}
|
|
9358
|
+
finalies.add(i);
|
|
9359
|
+
}
|
|
9360
|
+
if (!re)
|
|
9361
|
+
continue;
|
|
9362
|
+
const target = this.stack[i][re];
|
|
9363
|
+
if (target) {
|
|
9364
|
+
this.addEdge(this.curBlock, target);
|
|
9365
|
+
finalies?.forEach((i2) => {
|
|
9366
|
+
const elm = this.stack[i2];
|
|
9367
|
+
if (!elm.postfinally) {
|
|
9368
|
+
elm.postfinally = /* @__PURE__ */ new Set();
|
|
9369
|
+
}
|
|
9370
|
+
elm.postfinally.add(target);
|
|
9371
|
+
});
|
|
9372
|
+
break;
|
|
9362
9373
|
}
|
|
9363
9374
|
}
|
|
9364
9375
|
this.unreachable = true;
|
|
@@ -10063,7 +10074,7 @@ function restrictExactTypesByEquality(a, b) {
|
|
|
10063
10074
|
};
|
|
10064
10075
|
if (value_bits && !(value_bits & value_bits - 1)) {
|
|
10065
10076
|
if (a.value != null) {
|
|
10066
|
-
v.value = value_bits === 16 ? BigInt(a.value) : Number(a.value);
|
|
10077
|
+
v.value = value_bits === 128 ? String.fromCharCode(Number(a.value)) : value_bits === 16 ? BigInt(a.value) : Number(a.value);
|
|
10067
10078
|
if (b.value && !couldBe(v, b)) {
|
|
10068
10079
|
v.type = 0;
|
|
10069
10080
|
delete v.value;
|
|
@@ -16720,9 +16731,46 @@ function beforeEvaluate(istate, node) {
|
|
|
16720
16731
|
case "WhileStatement":
|
|
16721
16732
|
case "DoWhileStatement": {
|
|
16722
16733
|
const test = popIstate(istate, node.test);
|
|
16723
|
-
if (!test.embeddedEffects) {
|
|
16724
|
-
if (
|
|
16725
|
-
return
|
|
16734
|
+
if (!test.embeddedEffects && mustBeFalse(test.value)) {
|
|
16735
|
+
if (node.type === "WhileStatement") {
|
|
16736
|
+
return false;
|
|
16737
|
+
}
|
|
16738
|
+
let ok = true;
|
|
16739
|
+
let switchDepth = 0;
|
|
16740
|
+
(0, import_chunk_MBTLUWXR.traverseAst)(
|
|
16741
|
+
node.body,
|
|
16742
|
+
(n) => {
|
|
16743
|
+
if (!ok)
|
|
16744
|
+
return false;
|
|
16745
|
+
switch (n.type) {
|
|
16746
|
+
case "DoWhileStatement":
|
|
16747
|
+
case "WhileStatement":
|
|
16748
|
+
case "ForStatement":
|
|
16749
|
+
return false;
|
|
16750
|
+
case "SwitchStatement":
|
|
16751
|
+
if ((istate.state.sdkVersion ?? 0) < 6002e3) {
|
|
16752
|
+
return false;
|
|
16753
|
+
}
|
|
16754
|
+
switchDepth++;
|
|
16755
|
+
break;
|
|
16756
|
+
case "BreakStatement":
|
|
16757
|
+
if (switchDepth) {
|
|
16758
|
+
break;
|
|
16759
|
+
}
|
|
16760
|
+
case "ContinueStatement":
|
|
16761
|
+
ok = false;
|
|
16762
|
+
break;
|
|
16763
|
+
}
|
|
16764
|
+
return null;
|
|
16765
|
+
},
|
|
16766
|
+
(n) => {
|
|
16767
|
+
if (n.type === "SwitchStatement") {
|
|
16768
|
+
switchDepth--;
|
|
16769
|
+
}
|
|
16770
|
+
}
|
|
16771
|
+
);
|
|
16772
|
+
if (ok) {
|
|
16773
|
+
return node.body;
|
|
16726
16774
|
}
|
|
16727
16775
|
}
|
|
16728
16776
|
istate.stack.push(test);
|
|
@@ -29836,18 +29884,22 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
29836
29884
|
if (hasTests != null && !config.checkBuildPragmas && configOptionsToCheck.every(
|
|
29837
29885
|
(option) => prevOptions[option] === config[option]
|
|
29838
29886
|
) && actualOptimizedFiles.length === mcFiles.length && mcFiles.map((v) => v.output).sort().every((f, i) => f === actualOptimizedFiles[i])) {
|
|
29839
|
-
const
|
|
29840
|
-
|
|
29841
|
-
)
|
|
29842
|
-
|
|
29843
|
-
|
|
29844
|
-
|
|
29845
|
-
|
|
29846
|
-
|
|
29847
|
-
|
|
29848
|
-
|
|
29849
|
-
|
|
29850
|
-
|
|
29887
|
+
const sdk = await getSdkPath();
|
|
29888
|
+
const match = sdk.match(/-(\d+\.\d+\.\d+)/);
|
|
29889
|
+
if ((match && parseSdkVersion(match[1])) === prevSdkVersion) {
|
|
29890
|
+
const source_time = await (0, import_chunk_PVBIKZYZ.last_modified)(
|
|
29891
|
+
Object.keys(fnMap).concat(dependencyFiles)
|
|
29892
|
+
);
|
|
29893
|
+
const opt_time = await (0, import_chunk_PVBIKZYZ.first_modified)(
|
|
29894
|
+
Object.values(fnMap).map((v) => v.output)
|
|
29895
|
+
);
|
|
29896
|
+
if (source_time < opt_time && 1690215897566 < opt_time) {
|
|
29897
|
+
return {
|
|
29898
|
+
hasTests,
|
|
29899
|
+
diagnostics: prevDiagnostics,
|
|
29900
|
+
sdkVersion: prevSdkVersion
|
|
29901
|
+
};
|
|
29902
|
+
}
|
|
29851
29903
|
}
|
|
29852
29904
|
}
|
|
29853
29905
|
const [, , prettierConfig] = await Promise.all([
|
|
@@ -29879,7 +29931,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
29879
29931
|
hasTests: hasTests2,
|
|
29880
29932
|
diagnostics,
|
|
29881
29933
|
sdkVersion,
|
|
29882
|
-
optimizerVersion: "1.1.
|
|
29934
|
+
optimizerVersion: "1.1.32",
|
|
29883
29935
|
...Object.fromEntries(
|
|
29884
29936
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
29885
29937
|
)
|
package/build/optimizer.cjs
CHANGED
|
@@ -18,29 +18,29 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var optimizer_exports = {};
|
|
20
20
|
__export(optimizer_exports, {
|
|
21
|
-
StateNodeAttributes: () =>
|
|
22
|
-
buildOptimizedProject: () =>
|
|
21
|
+
StateNodeAttributes: () => import_chunk_NUE3G2QE.StateNodeAttributes,
|
|
22
|
+
buildOptimizedProject: () => import_chunk_NUE3G2QE.buildOptimizedProject,
|
|
23
23
|
copyRecursiveAsNeeded: () => import_chunk_PVBIKZYZ.copyRecursiveAsNeeded,
|
|
24
|
-
defaultConfig: () =>
|
|
25
|
-
display: () =>
|
|
26
|
-
generateApiMirTests: () =>
|
|
27
|
-
generateOneConfig: () =>
|
|
28
|
-
generateOptimizedProject: () =>
|
|
29
|
-
getConfig: () =>
|
|
30
|
-
getProjectAnalysis: () =>
|
|
31
|
-
get_jungle: () =>
|
|
32
|
-
isErrorWithLocation: () =>
|
|
33
|
-
launchSimulator: () =>
|
|
34
|
-
manifestProducts: () =>
|
|
35
|
-
mctree: () =>
|
|
36
|
-
simulateProgram: () =>
|
|
24
|
+
defaultConfig: () => import_chunk_NUE3G2QE.defaultConfig,
|
|
25
|
+
display: () => import_chunk_NUE3G2QE.display,
|
|
26
|
+
generateApiMirTests: () => import_chunk_NUE3G2QE.generateApiMirTests,
|
|
27
|
+
generateOneConfig: () => import_chunk_NUE3G2QE.generateOneConfig,
|
|
28
|
+
generateOptimizedProject: () => import_chunk_NUE3G2QE.generateOptimizedProject,
|
|
29
|
+
getConfig: () => import_chunk_NUE3G2QE.getConfig,
|
|
30
|
+
getProjectAnalysis: () => import_chunk_NUE3G2QE.getProjectAnalysis,
|
|
31
|
+
get_jungle: () => import_chunk_NUE3G2QE.get_jungle,
|
|
32
|
+
isErrorWithLocation: () => import_chunk_NUE3G2QE.isErrorWithLocation,
|
|
33
|
+
launchSimulator: () => import_chunk_NUE3G2QE.launchSimulator,
|
|
34
|
+
manifestProducts: () => import_chunk_NUE3G2QE.manifestProducts,
|
|
35
|
+
mctree: () => import_chunk_NUE3G2QE.mctree,
|
|
36
|
+
simulateProgram: () => import_chunk_NUE3G2QE.simulateProgram
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(optimizer_exports);
|
|
39
|
-
var
|
|
39
|
+
var import_chunk_NUE3G2QE = require("./chunk-NUE3G2QE.cjs");
|
|
40
40
|
var import_chunk_PVBIKZYZ = require("./chunk-PVBIKZYZ.cjs");
|
|
41
41
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
42
42
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
43
|
-
(0,
|
|
43
|
+
(0, import_chunk_NUE3G2QE.init_optimizer)();
|
|
44
44
|
// Annotate the CommonJS export names for ESM import in node:
|
|
45
45
|
0 && (module.exports = {
|
|
46
46
|
StateNodeAttributes,
|
package/build/sdk-util.cjs
CHANGED
|
@@ -18,25 +18,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var sdk_util_exports = {};
|
|
20
20
|
__export(sdk_util_exports, {
|
|
21
|
-
SectionKinds: () =>
|
|
22
|
-
appSupport: () =>
|
|
23
|
-
connectiq: () =>
|
|
24
|
-
getDeviceInfo: () =>
|
|
25
|
-
getFunctionDocumentation: () =>
|
|
26
|
-
getLanguages: () =>
|
|
27
|
-
getSdkPath: () =>
|
|
28
|
-
isWin: () =>
|
|
29
|
-
optimizeProgram: () =>
|
|
30
|
-
readPrg: () =>
|
|
31
|
-
readPrgWithOffsets: () =>
|
|
32
|
-
xmlUtil: () =>
|
|
21
|
+
SectionKinds: () => import_chunk_NUE3G2QE.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_NUE3G2QE.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_NUE3G2QE.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_NUE3G2QE.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_NUE3G2QE.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_NUE3G2QE.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_NUE3G2QE.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_NUE3G2QE.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_NUE3G2QE.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_NUE3G2QE.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_NUE3G2QE.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_NUE3G2QE.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_NUE3G2QE = require("./chunk-NUE3G2QE.cjs");
|
|
36
36
|
var import_chunk_PVBIKZYZ = require("./chunk-PVBIKZYZ.cjs");
|
|
37
37
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
38
38
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
39
|
-
(0,
|
|
39
|
+
(0, import_chunk_NUE3G2QE.init_sdk_util)();
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
41
|
0 && (module.exports = {
|
|
42
42
|
SectionKinds,
|
package/build/worker-thread.cjs
CHANGED
|
@@ -21,17 +21,17 @@ __export(worker_thread_exports, {
|
|
|
21
21
|
default: () => worker_thread_default
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(worker_thread_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_NUE3G2QE = require("./chunk-NUE3G2QE.cjs");
|
|
25
25
|
var import_chunk_PVBIKZYZ = require("./chunk-PVBIKZYZ.cjs");
|
|
26
26
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
27
27
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
28
28
|
var import_node_worker_threads = require("node:worker_threads");
|
|
29
29
|
var require_worker_thread = (0, import_chunk_ABYVSU2C.__commonJS)({
|
|
30
30
|
"src/worker-thread.ts"() {
|
|
31
|
-
(0,
|
|
31
|
+
(0, import_chunk_NUE3G2QE.init_worker_task)();
|
|
32
32
|
if (import_node_worker_threads.parentPort) {
|
|
33
33
|
import_node_worker_threads.parentPort.on("message", async (task) => {
|
|
34
|
-
return import_node_worker_threads.parentPort.postMessage(await (0,
|
|
34
|
+
return import_node_worker_threads.parentPort.postMessage(await (0, import_chunk_NUE3G2QE.performTask)(task));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED