@markw65/monkeyc-optimizer 1.1.64 → 1.1.66
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 +15 -0
- package/build/api.cjs +35 -35
- package/build/{chunk-SG7ODKRM.cjs → chunk-67LU4GPQ.cjs} +54 -49
- package/build/{chunk-VZBYW6QS.cjs → chunk-UDJNFXSX.cjs} +435 -368
- package/build/optimizer.cjs +19 -19
- package/build/sdk-util.cjs +15 -15
- package/build/src/ast.d.ts +1 -13
- package/build/src/build-config.d.ts +1 -0
- package/build/util.cjs +26 -26
- package/build/worker-thread.cjs +4 -4
- package/package.json +2 -2
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
|
-
buildConfigDescription: () =>
|
|
23
|
-
buildOptimizedProject: () =>
|
|
24
|
-
copyRecursiveAsNeeded: () =>
|
|
25
|
-
defaultConfig: () =>
|
|
26
|
-
display: () =>
|
|
27
|
-
generateOneConfig: () =>
|
|
28
|
-
generateOptimizedProject: () =>
|
|
29
|
-
getConfig: () =>
|
|
30
|
-
getProjectAnalysis: () =>
|
|
31
|
-
get_jungle: () =>
|
|
32
|
-
isErrorWithLocation: () =>
|
|
33
|
-
launchSimulator: () =>
|
|
34
|
-
manifestProducts: () =>
|
|
35
|
-
mctree: () =>
|
|
36
|
-
simulateProgram: () =>
|
|
21
|
+
StateNodeAttributes: () => import_chunk_UDJNFXSX.StateNodeAttributes,
|
|
22
|
+
buildConfigDescription: () => import_chunk_UDJNFXSX.buildConfigDescription,
|
|
23
|
+
buildOptimizedProject: () => import_chunk_UDJNFXSX.buildOptimizedProject,
|
|
24
|
+
copyRecursiveAsNeeded: () => import_chunk_67LU4GPQ.copyRecursiveAsNeeded,
|
|
25
|
+
defaultConfig: () => import_chunk_UDJNFXSX.defaultConfig,
|
|
26
|
+
display: () => import_chunk_UDJNFXSX.display,
|
|
27
|
+
generateOneConfig: () => import_chunk_UDJNFXSX.generateOneConfig,
|
|
28
|
+
generateOptimizedProject: () => import_chunk_UDJNFXSX.generateOptimizedProject,
|
|
29
|
+
getConfig: () => import_chunk_UDJNFXSX.getConfig,
|
|
30
|
+
getProjectAnalysis: () => import_chunk_UDJNFXSX.getProjectAnalysis,
|
|
31
|
+
get_jungle: () => import_chunk_UDJNFXSX.get_jungle,
|
|
32
|
+
isErrorWithLocation: () => import_chunk_UDJNFXSX.isErrorWithLocation,
|
|
33
|
+
launchSimulator: () => import_chunk_UDJNFXSX.launchSimulator,
|
|
34
|
+
manifestProducts: () => import_chunk_UDJNFXSX.manifestProducts,
|
|
35
|
+
mctree: () => import_chunk_UDJNFXSX.mctree,
|
|
36
|
+
simulateProgram: () => import_chunk_UDJNFXSX.simulateProgram
|
|
37
37
|
});
|
|
38
38
|
module.exports = __toCommonJS(optimizer_exports);
|
|
39
|
-
var
|
|
40
|
-
var
|
|
39
|
+
var import_chunk_UDJNFXSX = require("./chunk-UDJNFXSX.cjs");
|
|
40
|
+
var import_chunk_67LU4GPQ = require("./chunk-67LU4GPQ.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_UDJNFXSX.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_UDJNFXSX.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_UDJNFXSX.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_UDJNFXSX.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_UDJNFXSX.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_UDJNFXSX.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_UDJNFXSX.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_UDJNFXSX.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_UDJNFXSX.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_UDJNFXSX.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_UDJNFXSX.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_UDJNFXSX.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_UDJNFXSX.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
36
|
-
var
|
|
35
|
+
var import_chunk_UDJNFXSX = require("./chunk-UDJNFXSX.cjs");
|
|
36
|
+
var import_chunk_67LU4GPQ = require("./chunk-67LU4GPQ.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_UDJNFXSX.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/ast.d.ts
CHANGED
|
@@ -36,19 +36,7 @@ export declare function locRange(start: mctree.SourceLocation, end: mctree.Sourc
|
|
|
36
36
|
start: mctree.Position;
|
|
37
37
|
end: mctree.Position;
|
|
38
38
|
};
|
|
39
|
-
export declare function adjustLoc(loc: xmlUtil.SourceLocation, start?: number, end?: number):
|
|
40
|
-
readonly source: string | null | undefined;
|
|
41
|
-
readonly start: {
|
|
42
|
-
readonly offset: number;
|
|
43
|
-
readonly line: number;
|
|
44
|
-
readonly column: number;
|
|
45
|
-
};
|
|
46
|
-
readonly end: {
|
|
47
|
-
readonly offset: number;
|
|
48
|
-
readonly line: number;
|
|
49
|
-
readonly column: number;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
39
|
+
export declare function adjustLoc(loc: xmlUtil.SourceLocation, start?: number, end?: number): xmlUtil.SourceLocation;
|
|
52
40
|
export declare function makeIdentifier(name: string, loc?: mctree.SourceLocation | null | undefined): {
|
|
53
41
|
type: "Identifier";
|
|
54
42
|
name: string;
|
|
@@ -30,6 +30,7 @@ export type BuildConfig = {
|
|
|
30
30
|
compilerLookupRules?: LookupRules;
|
|
31
31
|
enforceStatic?: EnforceStatic;
|
|
32
32
|
sizeBasedPRE?: boolean | string;
|
|
33
|
+
preSkipLiterals?: boolean;
|
|
33
34
|
prettier?: Record<string, unknown>;
|
|
34
35
|
extensionVersion?: string;
|
|
35
36
|
useLocalOptimizer?: boolean;
|
package/build/util.cjs
CHANGED
|
@@ -18,35 +18,35 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var util_exports = {};
|
|
20
20
|
__export(util_exports, {
|
|
21
|
-
AwaitedError: () =>
|
|
22
|
-
GenericQueue: () =>
|
|
23
|
-
bumpLogging: () =>
|
|
24
|
-
copyRecursiveAsNeeded: () =>
|
|
25
|
-
every: () =>
|
|
26
|
-
first_modified: () =>
|
|
27
|
-
forEach: () =>
|
|
28
|
-
globSome: () =>
|
|
29
|
-
globa: () =>
|
|
30
|
-
last_modified: () =>
|
|
31
|
-
log: () =>
|
|
32
|
-
logPromise: () =>
|
|
33
|
-
logger: () =>
|
|
34
|
-
map: () =>
|
|
35
|
-
popcount: () =>
|
|
36
|
-
promiseAll: () =>
|
|
37
|
-
pushUnique: () =>
|
|
38
|
-
readByLine: () =>
|
|
39
|
-
reduce: () =>
|
|
40
|
-
sameArrays: () =>
|
|
41
|
-
setBanner: () =>
|
|
42
|
-
some: () =>
|
|
43
|
-
spawnByLine: () =>
|
|
44
|
-
wouldLog: () =>
|
|
21
|
+
AwaitedError: () => import_chunk_67LU4GPQ.AwaitedError,
|
|
22
|
+
GenericQueue: () => import_chunk_67LU4GPQ.GenericQueue,
|
|
23
|
+
bumpLogging: () => import_chunk_67LU4GPQ.bumpLogging,
|
|
24
|
+
copyRecursiveAsNeeded: () => import_chunk_67LU4GPQ.copyRecursiveAsNeeded,
|
|
25
|
+
every: () => import_chunk_67LU4GPQ.every,
|
|
26
|
+
first_modified: () => import_chunk_67LU4GPQ.first_modified,
|
|
27
|
+
forEach: () => import_chunk_67LU4GPQ.forEach,
|
|
28
|
+
globSome: () => import_chunk_67LU4GPQ.globSome,
|
|
29
|
+
globa: () => import_chunk_67LU4GPQ.globa,
|
|
30
|
+
last_modified: () => import_chunk_67LU4GPQ.last_modified,
|
|
31
|
+
log: () => import_chunk_67LU4GPQ.log,
|
|
32
|
+
logPromise: () => import_chunk_67LU4GPQ.logPromise,
|
|
33
|
+
logger: () => import_chunk_67LU4GPQ.logger,
|
|
34
|
+
map: () => import_chunk_67LU4GPQ.map,
|
|
35
|
+
popcount: () => import_chunk_67LU4GPQ.popcount,
|
|
36
|
+
promiseAll: () => import_chunk_67LU4GPQ.promiseAll,
|
|
37
|
+
pushUnique: () => import_chunk_67LU4GPQ.pushUnique,
|
|
38
|
+
readByLine: () => import_chunk_67LU4GPQ.readByLine,
|
|
39
|
+
reduce: () => import_chunk_67LU4GPQ.reduce,
|
|
40
|
+
sameArrays: () => import_chunk_67LU4GPQ.sameArrays,
|
|
41
|
+
setBanner: () => import_chunk_67LU4GPQ.setBanner,
|
|
42
|
+
some: () => import_chunk_67LU4GPQ.some,
|
|
43
|
+
spawnByLine: () => import_chunk_67LU4GPQ.spawnByLine,
|
|
44
|
+
wouldLog: () => import_chunk_67LU4GPQ.wouldLog
|
|
45
45
|
});
|
|
46
46
|
module.exports = __toCommonJS(util_exports);
|
|
47
|
-
var
|
|
47
|
+
var import_chunk_67LU4GPQ = require("./chunk-67LU4GPQ.cjs");
|
|
48
48
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
49
|
-
(0,
|
|
49
|
+
(0, import_chunk_67LU4GPQ.init_util)();
|
|
50
50
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
51
|
0 && (module.exports = {
|
|
52
52
|
AwaitedError,
|
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
|
|
25
|
-
var
|
|
24
|
+
var import_chunk_UDJNFXSX = require("./chunk-UDJNFXSX.cjs");
|
|
25
|
+
var import_chunk_67LU4GPQ = require("./chunk-67LU4GPQ.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_UDJNFXSX.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_UDJNFXSX.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.66",
|
|
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",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"test-garmin-opt": "node test/test.js --typeCheckLevel Strict --skipOptimization --garminOptLevel=2 --run-tests --product=fenix5 --product=fr235 --jungle ./test/OptimizerTests/monkey.jungle",
|
|
37
37
|
"test-personality": "node test/test-personality.js",
|
|
38
38
|
"test-analysis": "node test/test.js --showInfo --typeCheckLevel Strict --product=fr955 --sourceFile 'test/analysis/*.mc'",
|
|
39
|
-
"test-tiny": "node test/test
|
|
39
|
+
"test-tiny": "node test/test-tiny.js",
|
|
40
40
|
"eslint": "npx eslint ."
|
|
41
41
|
},
|
|
42
42
|
"bin": {
|