@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.
@@ -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: () => import_chunk_VZBYW6QS.StateNodeAttributes,
22
- buildConfigDescription: () => import_chunk_VZBYW6QS.buildConfigDescription,
23
- buildOptimizedProject: () => import_chunk_VZBYW6QS.buildOptimizedProject,
24
- copyRecursiveAsNeeded: () => import_chunk_SG7ODKRM.copyRecursiveAsNeeded,
25
- defaultConfig: () => import_chunk_VZBYW6QS.defaultConfig,
26
- display: () => import_chunk_VZBYW6QS.display,
27
- generateOneConfig: () => import_chunk_VZBYW6QS.generateOneConfig,
28
- generateOptimizedProject: () => import_chunk_VZBYW6QS.generateOptimizedProject,
29
- getConfig: () => import_chunk_VZBYW6QS.getConfig,
30
- getProjectAnalysis: () => import_chunk_VZBYW6QS.getProjectAnalysis,
31
- get_jungle: () => import_chunk_VZBYW6QS.get_jungle,
32
- isErrorWithLocation: () => import_chunk_VZBYW6QS.isErrorWithLocation,
33
- launchSimulator: () => import_chunk_VZBYW6QS.launchSimulator,
34
- manifestProducts: () => import_chunk_VZBYW6QS.manifestProducts,
35
- mctree: () => import_chunk_VZBYW6QS.mctree,
36
- simulateProgram: () => import_chunk_VZBYW6QS.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 import_chunk_VZBYW6QS = require("./chunk-VZBYW6QS.cjs");
40
- var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
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, import_chunk_VZBYW6QS.init_optimizer)();
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,
@@ -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: () => import_chunk_VZBYW6QS.SectionKinds,
22
- appSupport: () => import_chunk_VZBYW6QS.appSupport,
23
- connectiq: () => import_chunk_VZBYW6QS.connectiq,
24
- getDeviceInfo: () => import_chunk_VZBYW6QS.getDeviceInfo,
25
- getFunctionDocumentation: () => import_chunk_VZBYW6QS.getFunctionDocumentation,
26
- getLanguages: () => import_chunk_VZBYW6QS.getLanguages,
27
- getSdkPath: () => import_chunk_VZBYW6QS.getSdkPath,
28
- isWin: () => import_chunk_VZBYW6QS.isWin,
29
- optimizeProgram: () => import_chunk_VZBYW6QS.optimizeProgram,
30
- readPrg: () => import_chunk_VZBYW6QS.readPrg,
31
- readPrgWithOffsets: () => import_chunk_VZBYW6QS.readPrgWithOffsets,
32
- xmlUtil: () => import_chunk_VZBYW6QS.xml_util_exports
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 import_chunk_VZBYW6QS = require("./chunk-VZBYW6QS.cjs");
36
- var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
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, import_chunk_VZBYW6QS.init_sdk_util)();
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,
@@ -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: () => import_chunk_SG7ODKRM.AwaitedError,
22
- GenericQueue: () => import_chunk_SG7ODKRM.GenericQueue,
23
- bumpLogging: () => import_chunk_SG7ODKRM.bumpLogging,
24
- copyRecursiveAsNeeded: () => import_chunk_SG7ODKRM.copyRecursiveAsNeeded,
25
- every: () => import_chunk_SG7ODKRM.every,
26
- first_modified: () => import_chunk_SG7ODKRM.first_modified,
27
- forEach: () => import_chunk_SG7ODKRM.forEach,
28
- globSome: () => import_chunk_SG7ODKRM.globSome,
29
- globa: () => import_chunk_SG7ODKRM.globa,
30
- last_modified: () => import_chunk_SG7ODKRM.last_modified,
31
- log: () => import_chunk_SG7ODKRM.log,
32
- logPromise: () => import_chunk_SG7ODKRM.logPromise,
33
- logger: () => import_chunk_SG7ODKRM.logger,
34
- map: () => import_chunk_SG7ODKRM.map,
35
- popcount: () => import_chunk_SG7ODKRM.popcount,
36
- promiseAll: () => import_chunk_SG7ODKRM.promiseAll,
37
- pushUnique: () => import_chunk_SG7ODKRM.pushUnique,
38
- readByLine: () => import_chunk_SG7ODKRM.readByLine,
39
- reduce: () => import_chunk_SG7ODKRM.reduce,
40
- sameArrays: () => import_chunk_SG7ODKRM.sameArrays,
41
- setBanner: () => import_chunk_SG7ODKRM.setBanner,
42
- some: () => import_chunk_SG7ODKRM.some,
43
- spawnByLine: () => import_chunk_SG7ODKRM.spawnByLine,
44
- wouldLog: () => import_chunk_SG7ODKRM.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 import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
47
+ var import_chunk_67LU4GPQ = require("./chunk-67LU4GPQ.cjs");
48
48
  var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
49
- (0, import_chunk_SG7ODKRM.init_util)();
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,
@@ -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 import_chunk_VZBYW6QS = require("./chunk-VZBYW6QS.cjs");
25
- var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
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, import_chunk_VZBYW6QS.init_worker_task)();
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, import_chunk_VZBYW6QS.performTask)(task));
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.64",
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.js --postOptimize --showInfo --typeCheckLevel Strict --run-tests --product=pick-one --jungle test/tiny/array-overflow/monkey.jungle",
39
+ "test-tiny": "node test/test-tiny.js",
40
40
  "eslint": "npx eslint ."
41
41
  },
42
42
  "bin": {