@markw65/monkeyc-optimizer 1.1.41 → 1.1.43
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 +34 -34
- package/build/{chunk-BJHWDTEM.cjs → chunk-SNXXTHNE.cjs} +37 -22
- package/build/optimizer.cjs +16 -16
- package/build/sdk-util.cjs +14 -14
- package/build/src/api.d.ts +1 -1
- package/build/worker-thread.cjs +3 -3
- package/package.json +3 -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.43
|
|
6
|
+
|
|
7
|
+
- Fix bogus type mismatch errors relating to Rez.Strings.\* under sdk-7.x
|
|
8
|
+
|
|
9
|
+
### 1.1.42
|
|
10
|
+
|
|
11
|
+
- Fix a stack overflow caused by the post build array init optimization
|
|
12
|
+
- Fix a bug allowing overridden methods to be inlined
|
|
13
|
+
|
|
5
14
|
### 1.1.41
|
|
6
15
|
|
|
7
16
|
- Add proper support for tuple types (Sdk-7.x)
|
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_SNXXTHNE.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_SNXXTHNE.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_SNXXTHNE.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_SNXXTHNE.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_SNXXTHNE.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_SNXXTHNE.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_SNXXTHNE.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_SNXXTHNE.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_SNXXTHNE.formatAstLongLines,
|
|
30
|
+
formatScopedName: () => import_chunk_SNXXTHNE.formatScopedName,
|
|
31
|
+
getApiFunctionInfo: () => import_chunk_SNXXTHNE.getApiFunctionInfo,
|
|
32
|
+
getApiMapping: () => import_chunk_SNXXTHNE.getApiMapping,
|
|
33
|
+
getSuperClasses: () => import_chunk_SNXXTHNE.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_SNXXTHNE.isClassVariable,
|
|
36
|
+
isLocal: () => import_chunk_SNXXTHNE.isLocal,
|
|
37
|
+
isLookupCandidate: () => import_chunk_SNXXTHNE.isLookupCandidate,
|
|
38
|
+
isStateNode: () => import_chunk_SNXXTHNE.isStateNode,
|
|
39
|
+
lookupByFullName: () => import_chunk_SNXXTHNE.lookupByFullName,
|
|
40
|
+
lookupNext: () => import_chunk_SNXXTHNE.lookupNext,
|
|
41
|
+
lookupResultContains: () => import_chunk_SNXXTHNE.lookupResultContains,
|
|
42
|
+
lookupWithType: () => import_chunk_SNXXTHNE.lookupWithType,
|
|
43
|
+
makeToyboxLink: () => import_chunk_SNXXTHNE.makeToyboxLink,
|
|
44
|
+
mapVarDeclsByType: () => import_chunk_SNXXTHNE.mapVarDeclsByType,
|
|
45
|
+
markInvokeClassMethod: () => import_chunk_SNXXTHNE.markInvokeClassMethod,
|
|
46
|
+
parseSdkVersion: () => import_chunk_SNXXTHNE.parseSdkVersion,
|
|
47
|
+
resolveDiagnostics: () => import_chunk_SNXXTHNE.resolveDiagnostics,
|
|
48
|
+
resolveDiagnosticsMap: () => import_chunk_SNXXTHNE.resolveDiagnosticsMap,
|
|
49
|
+
sameLookupResult: () => import_chunk_SNXXTHNE.sameLookupResult,
|
|
50
50
|
traverseAst: () => import_chunk_MBTLUWXR.traverseAst,
|
|
51
|
-
variableDeclarationName: () =>
|
|
52
|
-
visitReferences: () =>
|
|
53
|
-
visit_resources: () =>
|
|
54
|
-
visitorNode: () =>
|
|
51
|
+
variableDeclarationName: () => import_chunk_SNXXTHNE.variableDeclarationName,
|
|
52
|
+
visitReferences: () => import_chunk_SNXXTHNE.visitReferences,
|
|
53
|
+
visit_resources: () => import_chunk_SNXXTHNE.visit_resources,
|
|
54
|
+
visitorNode: () => import_chunk_SNXXTHNE.visitorNode
|
|
55
55
|
});
|
|
56
56
|
module.exports = __toCommonJS(api_exports);
|
|
57
|
-
var
|
|
57
|
+
var import_chunk_SNXXTHNE = require("./chunk-SNXXTHNE.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_SNXXTHNE.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_SNXXTHNE_exports = {};
|
|
30
|
+
__export(chunk_SNXXTHNE_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -133,7 +133,7 @@ __export(chunk_BJHWDTEM_exports, {
|
|
|
133
133
|
visitorNode: () => visitorNode,
|
|
134
134
|
xml_util_exports: () => xml_util_exports
|
|
135
135
|
});
|
|
136
|
-
module.exports = __toCommonJS(
|
|
136
|
+
module.exports = __toCommonJS(chunk_SNXXTHNE_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");
|
|
@@ -17152,19 +17152,21 @@ function optimizeCall(istate, node, context) {
|
|
|
17152
17152
|
if (state.currentFunction) {
|
|
17153
17153
|
recordCalledFuncs(state.currentFunction, callees);
|
|
17154
17154
|
}
|
|
17155
|
-
if (callees.length === 1
|
|
17155
|
+
if (callees.length === 1) {
|
|
17156
17156
|
const callee = callees[0].node;
|
|
17157
|
-
if (
|
|
17158
|
-
|
|
17159
|
-
|
|
17160
|
-
|
|
17161
|
-
|
|
17157
|
+
if (callees[0].type === "FunctionDeclaration" && !callee.hasOverride) {
|
|
17158
|
+
if (!context && callee.optimizable && node.arguments.every((n) => (0, import_chunk_MBTLUWXR.getNodeValue)(n)[0] !== null)) {
|
|
17159
|
+
const ret = evaluateFunction(istate, callee, node.arguments);
|
|
17160
|
+
if (ret) {
|
|
17161
|
+
inlineDiagnostic(state, callees[0], node, null);
|
|
17162
|
+
return (0, import_chunk_MBTLUWXR.withLoc)(ret, node, node);
|
|
17163
|
+
}
|
|
17162
17164
|
}
|
|
17163
|
-
|
|
17164
|
-
|
|
17165
|
-
|
|
17166
|
-
|
|
17167
|
-
|
|
17165
|
+
if (shouldInline(state, callees[0], node, context)) {
|
|
17166
|
+
const ret = inlineFunction(state, callees[0], node, context);
|
|
17167
|
+
if (ret) {
|
|
17168
|
+
return ret;
|
|
17169
|
+
}
|
|
17168
17170
|
}
|
|
17169
17171
|
}
|
|
17170
17172
|
}
|
|
@@ -17608,7 +17610,9 @@ function add_one_resource(state, doc, module2, e) {
|
|
|
17608
17610
|
ts: [
|
|
17609
17611
|
{
|
|
17610
17612
|
type: "TypeSpecPart",
|
|
17611
|
-
name: (0, import_chunk_MBTLUWXR.
|
|
17613
|
+
name: (0, import_chunk_MBTLUWXR.makeScopedName)(
|
|
17614
|
+
state && lookupByFullName(state, "Toybox.Lang.ResourceId") ? "Toybox.Lang.ResourceId" : "Toybox.Lang.Symbol"
|
|
17615
|
+
)
|
|
17612
17616
|
}
|
|
17613
17617
|
]
|
|
17614
17618
|
}
|
|
@@ -18964,14 +18968,15 @@ function makeToyboxLink(result) {
|
|
|
18964
18968
|
return null;
|
|
18965
18969
|
}
|
|
18966
18970
|
function lookupByFullName(state, fullName) {
|
|
18967
|
-
|
|
18971
|
+
const sn = state.stack?.[0].sn;
|
|
18972
|
+
return sn ? fullName.split(".").reduce(
|
|
18968
18973
|
(results, part) => {
|
|
18969
18974
|
return results.flatMap(
|
|
18970
18975
|
(result) => isStateNode(result) ? result.decls?.[part] || result.type_decls?.[part] : null
|
|
18971
|
-
).filter((
|
|
18976
|
+
).filter((sn2) => !!sn2);
|
|
18972
18977
|
},
|
|
18973
|
-
[
|
|
18974
|
-
);
|
|
18978
|
+
[sn]
|
|
18979
|
+
) : [];
|
|
18975
18980
|
}
|
|
18976
18981
|
function handleException(state, node, exception) {
|
|
18977
18982
|
try {
|
|
@@ -21399,6 +21404,14 @@ ${blockToString(block, context)}`
|
|
|
21399
21404
|
loop2.taken = loopOffset2;
|
|
21400
21405
|
return true;
|
|
21401
21406
|
}
|
|
21407
|
+
const max = Math.floor(
|
|
21408
|
+
(100 - interpState.stack.length - interpState.locals.length) / 2
|
|
21409
|
+
);
|
|
21410
|
+
if (max < 0)
|
|
21411
|
+
return false;
|
|
21412
|
+
if (putvStarts.length > max) {
|
|
21413
|
+
putvStarts.splice(max);
|
|
21414
|
+
}
|
|
21402
21415
|
if (!tryLocal(3) && putvStarts.length < 4)
|
|
21403
21416
|
return false;
|
|
21404
21417
|
if (local >= 0) {
|
|
@@ -21407,7 +21420,9 @@ ${blockToString(block, context)}`
|
|
|
21407
21420
|
dupsToFix.forEach((x, n) => {
|
|
21408
21421
|
const bc = block.bytecodes[n];
|
|
21409
21422
|
(0, import_node_assert8.default)(bc.op === 46 && bc.arg >= 2);
|
|
21410
|
-
|
|
21423
|
+
if (putvStarts.length > x) {
|
|
21424
|
+
bc.arg += (putvStarts.length - x - 1) * 2;
|
|
21425
|
+
}
|
|
21411
21426
|
});
|
|
21412
21427
|
for (let i2 = putvStarts.length; i2-- > 1; ) {
|
|
21413
21428
|
block.bytecodes.splice(putvStarts[i2], 2);
|
|
@@ -28309,7 +28324,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
28309
28324
|
const opt_time = await (0, import_chunk_SG7ODKRM.first_modified)(
|
|
28310
28325
|
Object.values(fnMap).map((v) => v.output)
|
|
28311
28326
|
);
|
|
28312
|
-
if (source_time < opt_time &&
|
|
28327
|
+
if (source_time < opt_time && 1707958781012 < opt_time) {
|
|
28313
28328
|
return {
|
|
28314
28329
|
hasTests,
|
|
28315
28330
|
diagnostics: prevDiagnostics,
|
|
@@ -28348,7 +28363,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
28348
28363
|
hasTests: hasTests2,
|
|
28349
28364
|
diagnostics,
|
|
28350
28365
|
sdkVersion,
|
|
28351
|
-
optimizerVersion: "1.1.
|
|
28366
|
+
optimizerVersion: "1.1.43",
|
|
28352
28367
|
...Object.fromEntries(
|
|
28353
28368
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
28354
28369
|
)
|
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_SNXXTHNE.StateNodeAttributes,
|
|
22
|
+
buildOptimizedProject: () => import_chunk_SNXXTHNE.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_SNXXTHNE.defaultConfig,
|
|
25
|
+
display: () => import_chunk_SNXXTHNE.display,
|
|
26
|
+
generateOneConfig: () => import_chunk_SNXXTHNE.generateOneConfig,
|
|
27
|
+
generateOptimizedProject: () => import_chunk_SNXXTHNE.generateOptimizedProject,
|
|
28
|
+
getConfig: () => import_chunk_SNXXTHNE.getConfig,
|
|
29
|
+
getProjectAnalysis: () => import_chunk_SNXXTHNE.getProjectAnalysis,
|
|
30
|
+
get_jungle: () => import_chunk_SNXXTHNE.get_jungle,
|
|
31
|
+
isErrorWithLocation: () => import_chunk_SNXXTHNE.isErrorWithLocation,
|
|
32
|
+
launchSimulator: () => import_chunk_SNXXTHNE.launchSimulator,
|
|
33
|
+
manifestProducts: () => import_chunk_SNXXTHNE.manifestProducts,
|
|
34
|
+
mctree: () => import_chunk_SNXXTHNE.mctree,
|
|
35
|
+
simulateProgram: () => import_chunk_SNXXTHNE.simulateProgram
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(optimizer_exports);
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_SNXXTHNE = require("./chunk-SNXXTHNE.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_SNXXTHNE.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_SNXXTHNE.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_SNXXTHNE.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_SNXXTHNE.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_SNXXTHNE.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_SNXXTHNE.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_SNXXTHNE.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_SNXXTHNE.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_SNXXTHNE.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_SNXXTHNE.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_SNXXTHNE.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_SNXXTHNE.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_SNXXTHNE.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_SNXXTHNE = require("./chunk-SNXXTHNE.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_SNXXTHNE.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/api.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare function createDocumentationMap(functionDocumentation: {
|
|
|
35
35
|
doc: string;
|
|
36
36
|
}[]): Promise<Map<string, string>>;
|
|
37
37
|
export declare function makeToyboxLink(result: StateNodeDecl): string | null;
|
|
38
|
-
export declare function lookupByFullName(state:
|
|
38
|
+
export declare function lookupByFullName(state: ProgramState, fullName: string): StateNodeDecl[];
|
|
39
39
|
export declare function findUsingForNode(state: ProgramStateLive, stack: ProgramStateStack, i: number, node: mctree.Identifier): ModuleStateNode | {
|
|
40
40
|
name: string;
|
|
41
41
|
decls: {
|
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_SNXXTHNE = require("./chunk-SNXXTHNE.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_SNXXTHNE.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_SNXXTHNE.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.43",
|
|
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",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"build-debug": "node esbuild.mjs",
|
|
23
23
|
"build-release": "node esbuild.mjs --release",
|
|
24
24
|
"prepack": "node esbuild.mjs --release && mkdir -p bin && cp test/cft-font-info.js bin",
|
|
25
|
-
"test": "npm run test-mocha && npm run test-analysis && npm run test-optimized && npm run test-unopt && npm run test-post-only && npm run test-remote && npm run test-remote-tests && npm run test-personality",
|
|
25
|
+
"test": "npm run test-mocha && npm run test-analysis && npm run test-optimized && npm run test-unopt && npm run test-post-only && npm run test-tiny && npm run test-remote && npm run test-remote-tests && npm run test-personality",
|
|
26
26
|
"test-mocha": "npx mocha --timeout 999999 build/mocha.cjs",
|
|
27
27
|
"test-remote": "node ./test/test.js --showInfo --postOptimize --product=pick-one --github",
|
|
28
28
|
"test-remote-tests": "node ./test/test.js --showInfo --postOptimize --product=pick-one --run-tests --github",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"test-garmin-opt": "node test/test.js --typeCheckLevel Strict --skipOptimization --garminOptLevel=2 --run-tests --product=fenix5 --product=fr235 --jungle ./test/OptimizerTests/monkey.jungle",
|
|
33
33
|
"test-personality": "node test/test-personality.js",
|
|
34
34
|
"test-analysis": "node test/test.js --showInfo --typeCheckLevel Strict --product=fr955 --sourceFile 'test/analysis/*.mc'",
|
|
35
|
+
"test-tiny": "node test/test.js --postOptimize --showInfo --typeCheckLevel Strict --run-tests --product=pick-one --jungle test/tiny/array-overflow/monkey.jungle",
|
|
35
36
|
"eslint": "npx eslint ."
|
|
36
37
|
},
|
|
37
38
|
"bin": {
|