@markw65/monkeyc-optimizer 1.1.95 → 1.1.96
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 +9 -0
- package/build/api.cjs +39 -39
- package/build/{chunk-LUAKJ7GM.cjs → chunk-4C4RQPFP.cjs} +25 -14
- package/build/optimizer.cjs +18 -18
- package/build/sdk-util.cjs +14 -14
- package/build/src/readprg.d.ts +3 -1
- package/build/worker-thread.cjs +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "monkeyc-optimizer" package will be documented in this file.
|
|
4
4
|
|
|
5
|
+
### 1.1.96
|
|
6
|
+
|
|
7
|
+
- Update to [@markw65/prettier-plugin-monkeyc@1.0.66](https://github.com/markw65/prettier-plugin-monkeyc/blob/main/CHANGELOG.md#1066)
|
|
8
|
+
- Insert a single space after the comma in a list of exclusions if there was at least one space already.
|
|
9
|
+
- Fix [Minor documentation issue regarding running the optimizer via the command line](https://github.com/markw65/monkeyc-optimizer/issues/68)
|
|
10
|
+
- Fix ["Export Optimized Project" fails with "doc.processRefs is not a function"](https://github.com/markw65/monkeyc-optimizer/issues/69)
|
|
11
|
+
- Fix ["Export Optimized Project" fails if extended code takes up more than one page](https://github.com/markw65/monkeyc-optimizer/issues/70)
|
|
12
|
+
- Fix ["Undefined symbol" due to variable resolution issue in jungle file](https://github.com/markw65/monkeyc-optimizer/issues/71)
|
|
13
|
+
|
|
5
14
|
### 1.1.95
|
|
6
15
|
|
|
7
16
|
- Fix a regression introduced in `1.1.94`
|
package/build/api.cjs
CHANGED
|
@@ -18,52 +18,52 @@ 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
|
-
clearDiagnostics: () =>
|
|
23
|
-
collectNamespaces: () =>
|
|
24
|
-
createDocumentationMap: () =>
|
|
25
|
-
declKey: () =>
|
|
26
|
-
diagnostic: () =>
|
|
27
|
-
diagnosticHelper: () =>
|
|
28
|
-
findNamesInScope: () =>
|
|
29
|
-
findUsingForNode: () =>
|
|
30
|
-
formatAst: () =>
|
|
31
|
-
formatAstLongLines: () =>
|
|
32
|
-
formatScopedName: () =>
|
|
33
|
-
getApiFunctionInfo: () =>
|
|
34
|
-
getApiMapping: () =>
|
|
35
|
-
getSuperClasses: () =>
|
|
36
|
-
handleImportUsing: () =>
|
|
21
|
+
checkCompilerVersion: () => import_chunk_4C4RQPFP.checkCompilerVersion,
|
|
22
|
+
clearDiagnostics: () => import_chunk_4C4RQPFP.clearDiagnostics,
|
|
23
|
+
collectNamespaces: () => import_chunk_4C4RQPFP.collectNamespaces,
|
|
24
|
+
createDocumentationMap: () => import_chunk_4C4RQPFP.createDocumentationMap,
|
|
25
|
+
declKey: () => import_chunk_4C4RQPFP.declKey,
|
|
26
|
+
diagnostic: () => import_chunk_4C4RQPFP.diagnostic,
|
|
27
|
+
diagnosticHelper: () => import_chunk_4C4RQPFP.diagnosticHelper,
|
|
28
|
+
findNamesInScope: () => import_chunk_4C4RQPFP.findNamesInScope,
|
|
29
|
+
findUsingForNode: () => import_chunk_4C4RQPFP.findUsingForNode,
|
|
30
|
+
formatAst: () => import_chunk_4C4RQPFP.formatAst,
|
|
31
|
+
formatAstLongLines: () => import_chunk_4C4RQPFP.formatAstLongLines,
|
|
32
|
+
formatScopedName: () => import_chunk_4C4RQPFP.formatScopedName,
|
|
33
|
+
getApiFunctionInfo: () => import_chunk_4C4RQPFP.getApiFunctionInfo,
|
|
34
|
+
getApiMapping: () => import_chunk_4C4RQPFP.getApiMapping,
|
|
35
|
+
getSuperClasses: () => import_chunk_4C4RQPFP.getSuperClasses,
|
|
36
|
+
handleImportUsing: () => import_chunk_4C4RQPFP.handleImportUsing,
|
|
37
37
|
hasProperty: () => import_chunk_UBAYZSM3.hasProperty,
|
|
38
|
-
isClassVariable: () =>
|
|
39
|
-
isLocal: () =>
|
|
40
|
-
isLookupCandidate: () =>
|
|
41
|
-
isStateNode: () =>
|
|
42
|
-
lookupByFullName: () =>
|
|
43
|
-
lookupNext: () =>
|
|
44
|
-
lookupResultContains: () =>
|
|
45
|
-
lookupWithType: () =>
|
|
46
|
-
makeToyboxLink: () =>
|
|
47
|
-
mapVarDeclsByType: () =>
|
|
48
|
-
markInvokeClassMethod: () =>
|
|
49
|
-
parseSdkVersion: () =>
|
|
50
|
-
popRootNode: () =>
|
|
51
|
-
pushRootNode: () =>
|
|
52
|
-
resolveDiagnostics: () =>
|
|
53
|
-
resolveDiagnosticsMap: () =>
|
|
54
|
-
sameLookupResult: () =>
|
|
38
|
+
isClassVariable: () => import_chunk_4C4RQPFP.isClassVariable,
|
|
39
|
+
isLocal: () => import_chunk_4C4RQPFP.isLocal,
|
|
40
|
+
isLookupCandidate: () => import_chunk_4C4RQPFP.isLookupCandidate,
|
|
41
|
+
isStateNode: () => import_chunk_4C4RQPFP.isStateNode,
|
|
42
|
+
lookupByFullName: () => import_chunk_4C4RQPFP.lookupByFullName,
|
|
43
|
+
lookupNext: () => import_chunk_4C4RQPFP.lookupNext,
|
|
44
|
+
lookupResultContains: () => import_chunk_4C4RQPFP.lookupResultContains,
|
|
45
|
+
lookupWithType: () => import_chunk_4C4RQPFP.lookupWithType,
|
|
46
|
+
makeToyboxLink: () => import_chunk_4C4RQPFP.makeToyboxLink,
|
|
47
|
+
mapVarDeclsByType: () => import_chunk_4C4RQPFP.mapVarDeclsByType,
|
|
48
|
+
markInvokeClassMethod: () => import_chunk_4C4RQPFP.markInvokeClassMethod,
|
|
49
|
+
parseSdkVersion: () => import_chunk_4C4RQPFP.parseSdkVersion,
|
|
50
|
+
popRootNode: () => import_chunk_4C4RQPFP.popRootNode,
|
|
51
|
+
pushRootNode: () => import_chunk_4C4RQPFP.pushRootNode,
|
|
52
|
+
resolveDiagnostics: () => import_chunk_4C4RQPFP.resolveDiagnostics,
|
|
53
|
+
resolveDiagnosticsMap: () => import_chunk_4C4RQPFP.resolveDiagnosticsMap,
|
|
54
|
+
sameLookupResult: () => import_chunk_4C4RQPFP.sameLookupResult,
|
|
55
55
|
traverseAst: () => import_chunk_UBAYZSM3.traverseAst,
|
|
56
|
-
variableDeclarationName: () =>
|
|
57
|
-
visitReferences: () =>
|
|
58
|
-
visit_resources: () =>
|
|
59
|
-
visitorNode: () =>
|
|
56
|
+
variableDeclarationName: () => import_chunk_4C4RQPFP.variableDeclarationName,
|
|
57
|
+
visitReferences: () => import_chunk_4C4RQPFP.visitReferences,
|
|
58
|
+
visit_resources: () => import_chunk_4C4RQPFP.visit_resources,
|
|
59
|
+
visitorNode: () => import_chunk_4C4RQPFP.visitorNode
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(api_exports);
|
|
62
|
-
var
|
|
62
|
+
var import_chunk_4C4RQPFP = require("./chunk-4C4RQPFP.cjs");
|
|
63
63
|
var import_chunk_IJS7AYMN = require("./chunk-IJS7AYMN.cjs");
|
|
64
64
|
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
65
65
|
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
66
|
-
(0,
|
|
66
|
+
(0, import_chunk_4C4RQPFP.init_api)();
|
|
67
67
|
// Annotate the CommonJS export names for ESM import in node:
|
|
68
68
|
0 && (module.exports = {
|
|
69
69
|
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_4C4RQPFP_exports = {};
|
|
30
|
+
__export(chunk_4C4RQPFP_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -140,7 +140,7 @@ __export(chunk_LUAKJ7GM_exports, {
|
|
|
140
140
|
visitorNode: () => visitorNode,
|
|
141
141
|
xml_util_exports: () => xml_util_exports
|
|
142
142
|
});
|
|
143
|
-
module.exports = __toCommonJS(
|
|
143
|
+
module.exports = __toCommonJS(chunk_4C4RQPFP_exports);
|
|
144
144
|
var import_chunk_IJS7AYMN = require("./chunk-IJS7AYMN.cjs");
|
|
145
145
|
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
146
146
|
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
@@ -23261,9 +23261,14 @@ function markLocals(context) {
|
|
|
23261
23261
|
context.debugXml.body.children("localVars").children("entry").elements.forEach((entry) => {
|
|
23262
23262
|
const { startPc, endPc, stackId, name, arg } = entry.attr;
|
|
23263
23263
|
(0, import_node_assert16.default)(startPc && endPc && stackId && name);
|
|
23264
|
-
const
|
|
23265
|
-
const
|
|
23264
|
+
const spcRaw = Number(startPc.value.value);
|
|
23265
|
+
const epcRaw = Number(endPc.value.value) + 1;
|
|
23266
23266
|
const sid = Number(stackId.value.value);
|
|
23267
|
+
if ((spcRaw & SECTION_PC_MASK) !== TEXT_SECTION_PC || (epcRaw & SECTION_PC_MASK) !== TEXT_SECTION_PC) {
|
|
23268
|
+
return;
|
|
23269
|
+
}
|
|
23270
|
+
const spc = spcRaw & PC_OFFSET_MASK;
|
|
23271
|
+
const epc = epcRaw & PC_OFFSET_MASK;
|
|
23267
23272
|
let locals = localMap.get(spc);
|
|
23268
23273
|
if (!locals) {
|
|
23269
23274
|
locals = [];
|
|
@@ -23292,9 +23297,7 @@ function markLocals(context) {
|
|
|
23292
23297
|
}
|
|
23293
23298
|
const locals = localMap.get(bc.offset);
|
|
23294
23299
|
locals?.forEach((localInfo) => {
|
|
23295
|
-
|
|
23296
|
-
(0, import_node_assert16.default)(!live.has(localInfo.sid));
|
|
23297
|
-
}
|
|
23300
|
+
(0, import_node_assert16.default)(!live.has(localInfo.sid));
|
|
23298
23301
|
live.set(localInfo.sid, localInfo);
|
|
23299
23302
|
const e = ends.get(localInfo.epc);
|
|
23300
23303
|
if (e == null) {
|
|
@@ -25888,11 +25891,11 @@ function evaluate_locals(assignments) {
|
|
|
25888
25891
|
const newLength = Object.keys(locals).length;
|
|
25889
25892
|
if (newLength === localsLength) break;
|
|
25890
25893
|
localsLength = newLength;
|
|
25891
|
-
const process_list = (values) => {
|
|
25894
|
+
const process_list = (names, values) => {
|
|
25892
25895
|
for (let i = values.length; i--; ) {
|
|
25893
25896
|
const v = values[i];
|
|
25894
25897
|
if (v.type === "Compound") {
|
|
25895
|
-
process_list(v.values);
|
|
25898
|
+
process_list(null, v.values);
|
|
25896
25899
|
if (v.values.every((s) => s.type === "Literal")) {
|
|
25897
25900
|
values[i] = {
|
|
25898
25901
|
type: "Literal",
|
|
@@ -25901,12 +25904,15 @@ function evaluate_locals(assignments) {
|
|
|
25901
25904
|
}
|
|
25902
25905
|
} else if (v.type === "QualifiedName" && v.names.length === 1 && (0, import_chunk_UBAYZSM3.hasProperty)(locals, v.names[0])) {
|
|
25903
25906
|
values.splice(i, 1, ...locals[v.names[0]]);
|
|
25907
|
+
if (names?.length === 1 && values.every((v2) => v2.type === "Literal")) {
|
|
25908
|
+
locals[names[0]] = values;
|
|
25909
|
+
}
|
|
25904
25910
|
} else if (v.type === "SubList") {
|
|
25905
|
-
process_list(v.values);
|
|
25911
|
+
process_list(null, v.values);
|
|
25906
25912
|
}
|
|
25907
25913
|
}
|
|
25908
25914
|
};
|
|
25909
|
-
assignments.forEach((a) => process_list(a.values));
|
|
25915
|
+
assignments.forEach((a) => process_list(a.names, a.values));
|
|
25910
25916
|
}
|
|
25911
25917
|
return assignments;
|
|
25912
25918
|
}
|
|
@@ -27437,7 +27443,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
27437
27443
|
const opt_time = await (0, import_chunk_IJS7AYMN.first_modified)(
|
|
27438
27444
|
Object.values(fnMap).map((v) => v.output)
|
|
27439
27445
|
);
|
|
27440
|
-
if (source_time < opt_time &&
|
|
27446
|
+
if (source_time < opt_time && 1772064318337 < opt_time) {
|
|
27441
27447
|
return {
|
|
27442
27448
|
hasTests,
|
|
27443
27449
|
diagnostics: prevDiagnostics,
|
|
@@ -27475,7 +27481,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
27475
27481
|
hasTests: hasTests2,
|
|
27476
27482
|
diagnostics,
|
|
27477
27483
|
sdkVersion,
|
|
27478
|
-
optimizerVersion: "1.1.
|
|
27484
|
+
optimizerVersion: "1.1.96",
|
|
27479
27485
|
...Object.fromEntries(
|
|
27480
27486
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
27481
27487
|
)
|
|
@@ -27655,12 +27661,16 @@ function restoreQualifier(qualifier) {
|
|
|
27655
27661
|
}
|
|
27656
27662
|
if (qualifier.barrelMap) {
|
|
27657
27663
|
Object.values(qualifier.barrelMap).forEach((barrel) => {
|
|
27664
|
+
Object.values(barrel.resources).forEach((res) => restoreDocument(res));
|
|
27658
27665
|
restoreQualifier(barrel.qualifier);
|
|
27659
27666
|
restoreDocument(barrel.xml);
|
|
27660
27667
|
});
|
|
27661
27668
|
}
|
|
27662
27669
|
}
|
|
27663
27670
|
function restoreDocument(obj) {
|
|
27671
|
+
if (obj instanceof xml_util_exports.Document) {
|
|
27672
|
+
return;
|
|
27673
|
+
}
|
|
27664
27674
|
Object.setPrototypeOf(obj, xml_util_exports.Document.prototype);
|
|
27665
27675
|
const doc = obj;
|
|
27666
27676
|
if (doc.body.elements) {
|
|
@@ -28143,6 +28153,7 @@ async function optimizePackage(filepath, devKey, output, config) {
|
|
|
28143
28153
|
} finally {
|
|
28144
28154
|
stopPool();
|
|
28145
28155
|
}
|
|
28156
|
+
return { output };
|
|
28146
28157
|
}
|
|
28147
28158
|
function optimizePrgAndDebug(prgName, prgBuffer, prgOffset, prgLength, xmlName, xmlBuffer, xmlOffset, xmlLength, key, config) {
|
|
28148
28159
|
const xmlString = Buffer.from(xmlBuffer, xmlOffset, xmlLength).toString();
|
package/build/optimizer.cjs
CHANGED
|
@@ -18,30 +18,30 @@ 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
|
-
buildConfigDescription: () =>
|
|
23
|
-
buildOptimizedProject: () =>
|
|
21
|
+
StateNodeAttributes: () => import_chunk_4C4RQPFP.StateNodeAttributes,
|
|
22
|
+
buildConfigDescription: () => import_chunk_4C4RQPFP.buildConfigDescription,
|
|
23
|
+
buildOptimizedProject: () => import_chunk_4C4RQPFP.buildOptimizedProject,
|
|
24
24
|
copyRecursiveAsNeeded: () => import_chunk_IJS7AYMN.copyRecursiveAsNeeded,
|
|
25
|
-
defaultConfig: () =>
|
|
26
|
-
display: () =>
|
|
27
|
-
generateOneConfig: () =>
|
|
28
|
-
generateOptimizedProject: () =>
|
|
29
|
-
getConfig: () =>
|
|
30
|
-
getFnMapAnalysis: () =>
|
|
31
|
-
getProjectAnalysis: () =>
|
|
32
|
-
get_jungle: () =>
|
|
33
|
-
isErrorWithLocation: () =>
|
|
34
|
-
launchSimulator: () =>
|
|
35
|
-
manifestProducts: () =>
|
|
36
|
-
mctree: () =>
|
|
37
|
-
simulateProgram: () =>
|
|
25
|
+
defaultConfig: () => import_chunk_4C4RQPFP.defaultConfig,
|
|
26
|
+
display: () => import_chunk_4C4RQPFP.display,
|
|
27
|
+
generateOneConfig: () => import_chunk_4C4RQPFP.generateOneConfig,
|
|
28
|
+
generateOptimizedProject: () => import_chunk_4C4RQPFP.generateOptimizedProject,
|
|
29
|
+
getConfig: () => import_chunk_4C4RQPFP.getConfig,
|
|
30
|
+
getFnMapAnalysis: () => import_chunk_4C4RQPFP.getFnMapAnalysis,
|
|
31
|
+
getProjectAnalysis: () => import_chunk_4C4RQPFP.getProjectAnalysis,
|
|
32
|
+
get_jungle: () => import_chunk_4C4RQPFP.get_jungle,
|
|
33
|
+
isErrorWithLocation: () => import_chunk_4C4RQPFP.isErrorWithLocation,
|
|
34
|
+
launchSimulator: () => import_chunk_4C4RQPFP.launchSimulator,
|
|
35
|
+
manifestProducts: () => import_chunk_4C4RQPFP.manifestProducts,
|
|
36
|
+
mctree: () => import_chunk_4C4RQPFP.mctree,
|
|
37
|
+
simulateProgram: () => import_chunk_4C4RQPFP.simulateProgram
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(optimizer_exports);
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_4C4RQPFP = require("./chunk-4C4RQPFP.cjs");
|
|
41
41
|
var import_chunk_IJS7AYMN = require("./chunk-IJS7AYMN.cjs");
|
|
42
42
|
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
43
43
|
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
44
|
-
(0,
|
|
44
|
+
(0, import_chunk_4C4RQPFP.init_optimizer)();
|
|
45
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
46
|
0 && (module.exports = {
|
|
47
47
|
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_4C4RQPFP.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_4C4RQPFP.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_4C4RQPFP.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_4C4RQPFP.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_4C4RQPFP.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_4C4RQPFP.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_4C4RQPFP.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_4C4RQPFP.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_4C4RQPFP.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_4C4RQPFP.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_4C4RQPFP.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_4C4RQPFP.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_4C4RQPFP = require("./chunk-4C4RQPFP.cjs");
|
|
36
36
|
var import_chunk_IJS7AYMN = require("./chunk-IJS7AYMN.cjs");
|
|
37
37
|
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
38
38
|
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
39
|
-
(0,
|
|
39
|
+
(0, import_chunk_4C4RQPFP.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/src/readprg.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ export declare function readPrgWithOffsets(view: DataView): {
|
|
|
12
12
|
view: DataView<ArrayBufferLike>;
|
|
13
13
|
sections: Record<number, SectionInfo>;
|
|
14
14
|
};
|
|
15
|
-
export declare function optimizeProgram(filepath: string, devKey?: string | undefined, output?: string, config?: BuildConfig): Promise<
|
|
15
|
+
export declare function optimizeProgram(filepath: string, devKey?: string | undefined, output?: string, config?: BuildConfig): Promise<{
|
|
16
|
+
output: string;
|
|
17
|
+
} | {
|
|
16
18
|
signature: Buffer<ArrayBuffer> | undefined;
|
|
17
19
|
output: string;
|
|
18
20
|
}>;
|
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_4C4RQPFP = require("./chunk-4C4RQPFP.cjs");
|
|
25
25
|
var import_chunk_IJS7AYMN = require("./chunk-IJS7AYMN.cjs");
|
|
26
26
|
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
27
27
|
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
28
28
|
var import_node_worker_threads = require("node:worker_threads");
|
|
29
29
|
var require_worker_thread = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
30
30
|
"src/worker-thread.ts"() {
|
|
31
|
-
(0,
|
|
31
|
+
(0, import_chunk_4C4RQPFP.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_4C4RQPFP.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.96",
|
|
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.66",
|
|
60
60
|
"7z-wasm": "^1.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|