@markw65/monkeyc-optimizer 1.1.61 → 1.1.62
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 +8 -0
- package/build/api.cjs +34 -34
- package/build/{chunk-KCCFA2PP.cjs → chunk-WVEFLPTH.cjs} +56 -19
- package/build/optimizer.cjs +16 -16
- package/build/sdk-util.cjs +14 -14
- package/build/worker-thread.cjs +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "monkeyc-optimizer" package will be documented in this file.
|
|
4
4
|
|
|
5
|
+
### 1.1.62
|
|
6
|
+
|
|
7
|
+
- Update to [@markw65/prettier-plugin-monkeyc@1.0.58](https://github.com/markw65/prettier-plugin-monkeyc/blob/main/CHANGELOG.md#1058)
|
|
8
|
+
- Fix an indentation issue with interfaces
|
|
9
|
+
- Track uninitialized fields in class initializers (Part of fix for #35)
|
|
10
|
+
- Fix lookups for MemberExpressions with literal objects (Rest of fix for #35)
|
|
11
|
+
- Don't report parameters as missing symbols in interface functions (Fixes #36)
|
|
12
|
+
|
|
5
13
|
### 1.1.61
|
|
6
14
|
|
|
7
15
|
- Disable more post-build optimizations to allow apps to verify.
|
package/build/api.cjs
CHANGED
|
@@ -18,47 +18,47 @@ 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
|
-
formatScopedName: () =>
|
|
31
|
-
getApiFunctionInfo: () =>
|
|
32
|
-
getApiMapping: () =>
|
|
33
|
-
getSuperClasses: () =>
|
|
21
|
+
checkCompilerVersion: () => import_chunk_WVEFLPTH.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_WVEFLPTH.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_WVEFLPTH.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_WVEFLPTH.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_WVEFLPTH.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_WVEFLPTH.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_WVEFLPTH.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_WVEFLPTH.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_WVEFLPTH.formatAstLongLines,
|
|
30
|
+
formatScopedName: () => import_chunk_WVEFLPTH.formatScopedName,
|
|
31
|
+
getApiFunctionInfo: () => import_chunk_WVEFLPTH.getApiFunctionInfo,
|
|
32
|
+
getApiMapping: () => import_chunk_WVEFLPTH.getApiMapping,
|
|
33
|
+
getSuperClasses: () => import_chunk_WVEFLPTH.getSuperClasses,
|
|
34
34
|
hasProperty: () => import_chunk_MBTLUWXR.hasProperty,
|
|
35
|
-
isClassVariable: () =>
|
|
36
|
-
isLocal: () =>
|
|
37
|
-
isLookupCandidate: () =>
|
|
38
|
-
isStateNode: () =>
|
|
39
|
-
lookupByFullName: () =>
|
|
40
|
-
lookupNext: () =>
|
|
41
|
-
lookupResultContains: () =>
|
|
42
|
-
lookupWithType: () =>
|
|
43
|
-
makeToyboxLink: () =>
|
|
44
|
-
mapVarDeclsByType: () =>
|
|
45
|
-
markInvokeClassMethod: () =>
|
|
46
|
-
parseSdkVersion: () =>
|
|
47
|
-
resolveDiagnostics: () =>
|
|
48
|
-
resolveDiagnosticsMap: () =>
|
|
49
|
-
sameLookupResult: () =>
|
|
35
|
+
isClassVariable: () => import_chunk_WVEFLPTH.isClassVariable,
|
|
36
|
+
isLocal: () => import_chunk_WVEFLPTH.isLocal,
|
|
37
|
+
isLookupCandidate: () => import_chunk_WVEFLPTH.isLookupCandidate,
|
|
38
|
+
isStateNode: () => import_chunk_WVEFLPTH.isStateNode,
|
|
39
|
+
lookupByFullName: () => import_chunk_WVEFLPTH.lookupByFullName,
|
|
40
|
+
lookupNext: () => import_chunk_WVEFLPTH.lookupNext,
|
|
41
|
+
lookupResultContains: () => import_chunk_WVEFLPTH.lookupResultContains,
|
|
42
|
+
lookupWithType: () => import_chunk_WVEFLPTH.lookupWithType,
|
|
43
|
+
makeToyboxLink: () => import_chunk_WVEFLPTH.makeToyboxLink,
|
|
44
|
+
mapVarDeclsByType: () => import_chunk_WVEFLPTH.mapVarDeclsByType,
|
|
45
|
+
markInvokeClassMethod: () => import_chunk_WVEFLPTH.markInvokeClassMethod,
|
|
46
|
+
parseSdkVersion: () => import_chunk_WVEFLPTH.parseSdkVersion,
|
|
47
|
+
resolveDiagnostics: () => import_chunk_WVEFLPTH.resolveDiagnostics,
|
|
48
|
+
resolveDiagnosticsMap: () => import_chunk_WVEFLPTH.resolveDiagnosticsMap,
|
|
49
|
+
sameLookupResult: () => import_chunk_WVEFLPTH.sameLookupResult,
|
|
50
50
|
traverseAst: () => import_chunk_MBTLUWXR.traverseAst,
|
|
51
|
-
variableDeclarationName: () =>
|
|
52
|
-
visitReferences: () =>
|
|
53
|
-
visit_resources: () =>
|
|
54
|
-
visitorNode: () =>
|
|
51
|
+
variableDeclarationName: () => import_chunk_WVEFLPTH.variableDeclarationName,
|
|
52
|
+
visitReferences: () => import_chunk_WVEFLPTH.visitReferences,
|
|
53
|
+
visit_resources: () => import_chunk_WVEFLPTH.visit_resources,
|
|
54
|
+
visitorNode: () => import_chunk_WVEFLPTH.visitorNode
|
|
55
55
|
});
|
|
56
56
|
module.exports = __toCommonJS(api_exports);
|
|
57
|
-
var
|
|
57
|
+
var import_chunk_WVEFLPTH = require("./chunk-WVEFLPTH.cjs");
|
|
58
58
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
59
59
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
60
60
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
61
|
-
(0,
|
|
61
|
+
(0, import_chunk_WVEFLPTH.init_api)();
|
|
62
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
63
63
|
0 && (module.exports = {
|
|
64
64
|
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_WVEFLPTH_exports = {};
|
|
30
|
+
__export(chunk_WVEFLPTH_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -133,7 +133,7 @@ __export(chunk_KCCFA2PP_exports, {
|
|
|
133
133
|
visitorNode: () => visitorNode,
|
|
134
134
|
xml_util_exports: () => xml_util_exports
|
|
135
135
|
});
|
|
136
|
-
module.exports = __toCommonJS(
|
|
136
|
+
module.exports = __toCommonJS(chunk_WVEFLPTH_exports);
|
|
137
137
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
138
138
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
139
139
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
@@ -12477,8 +12477,14 @@ function clearAssocPaths(blockState, decl, v) {
|
|
|
12477
12477
|
}
|
|
12478
12478
|
}
|
|
12479
12479
|
function cloneTypeState(blockState) {
|
|
12480
|
-
const { map: map2, trackedMemberDecls, liveCopyPropEvents, ...rest } = blockState;
|
|
12481
|
-
const clone = {
|
|
12480
|
+
const { map: map2, inited, trackedMemberDecls, liveCopyPropEvents, ...rest } = blockState;
|
|
12481
|
+
const clone = {
|
|
12482
|
+
map: new Map(map2),
|
|
12483
|
+
...rest
|
|
12484
|
+
};
|
|
12485
|
+
if (inited) {
|
|
12486
|
+
clone.inited = new Set(inited);
|
|
12487
|
+
}
|
|
12482
12488
|
clone.map.forEach((value2, key) => {
|
|
12483
12489
|
if (value2.equivSet) {
|
|
12484
12490
|
if (key === Array.from(value2.equivSet)[0]) {
|
|
@@ -12675,6 +12681,7 @@ function mergeTypeState(blockStates, index, from, nodeCopyProp) {
|
|
|
12675
12681
|
tov.curType = result;
|
|
12676
12682
|
changes = true;
|
|
12677
12683
|
});
|
|
12684
|
+
to.inited?.forEach((k) => from.inited.has(k) || to.inited?.delete(k));
|
|
12678
12685
|
return changes;
|
|
12679
12686
|
}
|
|
12680
12687
|
function typeStateEntry(value2, key) {
|
|
@@ -12788,13 +12795,16 @@ function updateAffected(blockState, objectType, baseDecl, assignedPath, affected
|
|
|
12788
12795
|
function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStores, logThisRun) {
|
|
12789
12796
|
const order = getPostOrder(graph).reverse();
|
|
12790
12797
|
const queue = new DataflowQueue();
|
|
12791
|
-
let selfClassDecl = null;
|
|
12792
12798
|
const isStatic = !!(func.attributes & 8);
|
|
12793
12799
|
const klass = func.stack?.[func.stack?.length - 1].sn;
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12800
|
+
const selfClassDecl = klass && klass.type === "ClassDeclaration" ? klass : null;
|
|
12801
|
+
const uninitClassDecls = selfClassDecl && func.name === "initialize" && selfClassDecl.decls ? new Set(
|
|
12802
|
+
Object.values(selfClassDecl.decls).filter(
|
|
12803
|
+
(decls) => decls.some(
|
|
12804
|
+
(decl) => decl.type === "VariableDeclarator" && decl.node.kind === "var" && !decl.node.init
|
|
12805
|
+
)
|
|
12806
|
+
).flat()
|
|
12807
|
+
) : null;
|
|
12798
12808
|
order.forEach((block, i) => {
|
|
12799
12809
|
block.order = i;
|
|
12800
12810
|
});
|
|
@@ -13040,7 +13050,7 @@ function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStore
|
|
|
13040
13050
|
}
|
|
13041
13051
|
return [cur, updateAny];
|
|
13042
13052
|
}
|
|
13043
|
-
function typeConstraint(decls) {
|
|
13053
|
+
function typeConstraint(decls, blockState) {
|
|
13044
13054
|
return (0, import_chunk_SG7ODKRM.reduce)(
|
|
13045
13055
|
decls,
|
|
13046
13056
|
(cur, decl) => {
|
|
@@ -13055,7 +13065,7 @@ function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStore
|
|
|
13055
13065
|
cur,
|
|
13056
13066
|
decl.type === "Literal" ? typeFromLiteral(decl) : typeFromTypeStateNode(state, decl, true)
|
|
13057
13067
|
);
|
|
13058
|
-
if (
|
|
13068
|
+
if (blockState.inited && !blockState.inited.has(decl) && decl.type === "VariableDeclarator" && !decl.node.init && decl.node.kind === "var" && decl.stack[decl.stack.length - 1].sn === selfClassDecl) {
|
|
13059
13069
|
cur.type |= 1;
|
|
13060
13070
|
}
|
|
13061
13071
|
return cur;
|
|
@@ -13112,7 +13122,7 @@ function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStore
|
|
|
13112
13122
|
if (Array.isArray(decl) || decl.type !== "MemberDecl" && decl.type !== "Unknown") {
|
|
13113
13123
|
let tsVal = blockState.map.get(decl);
|
|
13114
13124
|
if (!tsVal) {
|
|
13115
|
-
tsVal = { curType: typeConstraint(decl) };
|
|
13125
|
+
tsVal = { curType: typeConstraint(decl, blockState) };
|
|
13116
13126
|
blockState.map.set(decl, tsVal);
|
|
13117
13127
|
}
|
|
13118
13128
|
return tsVal;
|
|
@@ -13592,7 +13602,9 @@ function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStore
|
|
|
13592
13602
|
}
|
|
13593
13603
|
(0, import_node_assert3.default)(!tsv.copyPropItem);
|
|
13594
13604
|
clearRelatedCopyPropEvents(curState, decl, nodeCopyProp);
|
|
13595
|
-
curState.map.set(decl, {
|
|
13605
|
+
curState.map.set(decl, {
|
|
13606
|
+
curType: typeConstraint(decl, curState)
|
|
13607
|
+
});
|
|
13596
13608
|
} else if (type.type & (32768 | 512 | 1024) && (calleeEffects == null ? calleeEffects = !callees || !(0, import_chunk_SG7ODKRM.every)(callees, (callee) => callee.info === false) : calleeEffects)) {
|
|
13597
13609
|
if (type.value != null && type.type & 32768) {
|
|
13598
13610
|
const odata = getObjectValue(tsv.curType);
|
|
@@ -13615,6 +13627,12 @@ function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStore
|
|
|
13615
13627
|
break;
|
|
13616
13628
|
}
|
|
13617
13629
|
case "def": {
|
|
13630
|
+
if (uninitClassDecls?.size) {
|
|
13631
|
+
(0, import_chunk_SG7ODKRM.forEach)(
|
|
13632
|
+
event.decl,
|
|
13633
|
+
(decl) => uninitClassDecls.has(decl) && curState.inited?.add(decl)
|
|
13634
|
+
);
|
|
13635
|
+
}
|
|
13618
13636
|
const lval = event.node.type === "UpdateExpression" ? event.node.argument : event.node.type === "AssignmentExpression" ? event.node.left : null;
|
|
13619
13637
|
if (lval) {
|
|
13620
13638
|
if (nodeCopyProp.size && lval.type === "MemberExpression") {
|
|
@@ -13701,7 +13719,9 @@ function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStore
|
|
|
13701
13719
|
clearAssocPaths(curState, decls, value2);
|
|
13702
13720
|
}
|
|
13703
13721
|
(0, import_node_assert3.default)(!value2.copyPropItem);
|
|
13704
|
-
curState.map.set(decls, {
|
|
13722
|
+
curState.map.set(decls, {
|
|
13723
|
+
curType: typeConstraint(decls, curState)
|
|
13724
|
+
});
|
|
13705
13725
|
clearRelatedCopyPropEvents(curState, decls, nodeCopyProp);
|
|
13706
13726
|
}
|
|
13707
13727
|
});
|
|
@@ -13818,6 +13838,8 @@ function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStore
|
|
|
13818
13838
|
};
|
|
13819
13839
|
blockStates[0] = { map: /* @__PURE__ */ new Map(), visits: 0 };
|
|
13820
13840
|
const head = blockStates[0];
|
|
13841
|
+
if (uninitClassDecls?.size)
|
|
13842
|
+
head.inited = /* @__PURE__ */ new Set();
|
|
13821
13843
|
func.node.params.forEach((param) => {
|
|
13822
13844
|
setStateEvent(
|
|
13823
13845
|
head,
|
|
@@ -18063,6 +18085,8 @@ function visitReferences(state, ast, name, defn, callback, includeDefs = false,
|
|
|
18063
18085
|
);
|
|
18064
18086
|
}
|
|
18065
18087
|
}
|
|
18088
|
+
} else if (state.inType && node.operator === "as") {
|
|
18089
|
+
return ["right"];
|
|
18066
18090
|
}
|
|
18067
18091
|
break;
|
|
18068
18092
|
case "CallExpression":
|
|
@@ -18560,6 +18584,20 @@ function lookup(state, decls, node, name, maybeStack, nonlocal, ignoreImports) {
|
|
|
18560
18584
|
}
|
|
18561
18585
|
return [null, null];
|
|
18562
18586
|
}
|
|
18587
|
+
case "Literal": {
|
|
18588
|
+
const [, type] = (0, import_chunk_MBTLUWXR.getNodeValue)(node);
|
|
18589
|
+
if (type === "Null")
|
|
18590
|
+
break;
|
|
18591
|
+
return [
|
|
18592
|
+
name ?? `${node.value}`,
|
|
18593
|
+
[
|
|
18594
|
+
{
|
|
18595
|
+
parent: null,
|
|
18596
|
+
results: lookupByFullName(state, `Toybox.Lang.${type}`)
|
|
18597
|
+
}
|
|
18598
|
+
]
|
|
18599
|
+
];
|
|
18600
|
+
}
|
|
18563
18601
|
}
|
|
18564
18602
|
return [false, false];
|
|
18565
18603
|
}
|
|
@@ -19414,6 +19452,7 @@ function getSuperClasses(klass) {
|
|
|
19414
19452
|
var init_api = (0, import_chunk_ABYVSU2C.__esm)({
|
|
19415
19453
|
"src/api.ts"() {
|
|
19416
19454
|
(0, import_chunk_MBTLUWXR.init_ast)();
|
|
19455
|
+
init_data_flow();
|
|
19417
19456
|
init_mc_rewrite();
|
|
19418
19457
|
init_negative_fixups();
|
|
19419
19458
|
init_optimizer_types();
|
|
@@ -19422,8 +19461,6 @@ var init_api = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
19422
19461
|
init_type_flow_util();
|
|
19423
19462
|
init_types();
|
|
19424
19463
|
(0, import_chunk_SG7ODKRM.init_util)();
|
|
19425
|
-
(0, import_chunk_MBTLUWXR.init_ast)();
|
|
19426
|
-
init_data_flow();
|
|
19427
19464
|
init_visitor();
|
|
19428
19465
|
}
|
|
19429
19466
|
});
|
|
@@ -29181,7 +29218,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
29181
29218
|
const opt_time = await (0, import_chunk_SG7ODKRM.first_modified)(
|
|
29182
29219
|
Object.values(fnMap).map((v) => v.output)
|
|
29183
29220
|
);
|
|
29184
|
-
if (source_time < opt_time &&
|
|
29221
|
+
if (source_time < opt_time && 1716742569780 < opt_time) {
|
|
29185
29222
|
return {
|
|
29186
29223
|
hasTests,
|
|
29187
29224
|
diagnostics: prevDiagnostics,
|
|
@@ -29220,7 +29257,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
29220
29257
|
hasTests: hasTests2,
|
|
29221
29258
|
diagnostics,
|
|
29222
29259
|
sdkVersion,
|
|
29223
|
-
optimizerVersion: "1.1.
|
|
29260
|
+
optimizerVersion: "1.1.62",
|
|
29224
29261
|
...Object.fromEntries(
|
|
29225
29262
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
29226
29263
|
)
|
package/build/optimizer.cjs
CHANGED
|
@@ -18,28 +18,28 @@ 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_WVEFLPTH.StateNodeAttributes,
|
|
22
|
+
buildOptimizedProject: () => import_chunk_WVEFLPTH.buildOptimizedProject,
|
|
23
23
|
copyRecursiveAsNeeded: () => import_chunk_SG7ODKRM.copyRecursiveAsNeeded,
|
|
24
|
-
defaultConfig: () =>
|
|
25
|
-
display: () =>
|
|
26
|
-
generateOneConfig: () =>
|
|
27
|
-
generateOptimizedProject: () =>
|
|
28
|
-
getConfig: () =>
|
|
29
|
-
getProjectAnalysis: () =>
|
|
30
|
-
get_jungle: () =>
|
|
31
|
-
isErrorWithLocation: () =>
|
|
32
|
-
launchSimulator: () =>
|
|
33
|
-
manifestProducts: () =>
|
|
34
|
-
mctree: () =>
|
|
35
|
-
simulateProgram: () =>
|
|
24
|
+
defaultConfig: () => import_chunk_WVEFLPTH.defaultConfig,
|
|
25
|
+
display: () => import_chunk_WVEFLPTH.display,
|
|
26
|
+
generateOneConfig: () => import_chunk_WVEFLPTH.generateOneConfig,
|
|
27
|
+
generateOptimizedProject: () => import_chunk_WVEFLPTH.generateOptimizedProject,
|
|
28
|
+
getConfig: () => import_chunk_WVEFLPTH.getConfig,
|
|
29
|
+
getProjectAnalysis: () => import_chunk_WVEFLPTH.getProjectAnalysis,
|
|
30
|
+
get_jungle: () => import_chunk_WVEFLPTH.get_jungle,
|
|
31
|
+
isErrorWithLocation: () => import_chunk_WVEFLPTH.isErrorWithLocation,
|
|
32
|
+
launchSimulator: () => import_chunk_WVEFLPTH.launchSimulator,
|
|
33
|
+
manifestProducts: () => import_chunk_WVEFLPTH.manifestProducts,
|
|
34
|
+
mctree: () => import_chunk_WVEFLPTH.mctree,
|
|
35
|
+
simulateProgram: () => import_chunk_WVEFLPTH.simulateProgram
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(optimizer_exports);
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_WVEFLPTH = require("./chunk-WVEFLPTH.cjs");
|
|
39
39
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
40
40
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
41
41
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
42
|
-
(0,
|
|
42
|
+
(0, import_chunk_WVEFLPTH.init_optimizer)();
|
|
43
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
44
|
0 && (module.exports = {
|
|
45
45
|
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_WVEFLPTH.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_WVEFLPTH.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_WVEFLPTH.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_WVEFLPTH.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_WVEFLPTH.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_WVEFLPTH.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_WVEFLPTH.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_WVEFLPTH.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_WVEFLPTH.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_WVEFLPTH.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_WVEFLPTH.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_WVEFLPTH.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_WVEFLPTH = require("./chunk-WVEFLPTH.cjs");
|
|
36
36
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.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_WVEFLPTH.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_WVEFLPTH = require("./chunk-WVEFLPTH.cjs");
|
|
25
25
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.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_WVEFLPTH.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_WVEFLPTH.performTask)(task));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markw65/monkeyc-optimizer",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.62",
|
|
5
5
|
"description": "Source to source optimizer for Garmin Monkey C code",
|
|
6
6
|
"main": "build/optimizer.cjs",
|
|
7
7
|
"types": "build/src/optimizer.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"author": "markw65",
|
|
57
57
|
"license": "MIT",
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@markw65/prettier-plugin-monkeyc": "^1.0.
|
|
59
|
+
"@markw65/prettier-plugin-monkeyc": "^1.0.58"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@markw65/peggy-optimizer": "^1.0.1",
|