@markw65/monkeyc-optimizer 1.1.92 → 1.1.94

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,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_VAV4N2CL.SectionKinds,
22
- appSupport: () => import_chunk_VAV4N2CL.appSupport,
23
- connectiq: () => import_chunk_VAV4N2CL.connectiq,
24
- getDeviceInfo: () => import_chunk_VAV4N2CL.getDeviceInfo,
25
- getFunctionDocumentation: () => import_chunk_VAV4N2CL.getFunctionDocumentation,
26
- getLanguages: () => import_chunk_VAV4N2CL.getLanguages,
27
- getSdkPath: () => import_chunk_VAV4N2CL.getSdkPath,
28
- isWin: () => import_chunk_VAV4N2CL.isWin,
29
- optimizeProgram: () => import_chunk_VAV4N2CL.optimizeProgram,
30
- readPrg: () => import_chunk_VAV4N2CL.readPrg,
31
- readPrgWithOffsets: () => import_chunk_VAV4N2CL.readPrgWithOffsets,
32
- xmlUtil: () => import_chunk_VAV4N2CL.xml_util_exports
21
+ SectionKinds: () => import_chunk_5SB3QASN.SectionKinds,
22
+ appSupport: () => import_chunk_5SB3QASN.appSupport,
23
+ connectiq: () => import_chunk_5SB3QASN.connectiq,
24
+ getDeviceInfo: () => import_chunk_5SB3QASN.getDeviceInfo,
25
+ getFunctionDocumentation: () => import_chunk_5SB3QASN.getFunctionDocumentation,
26
+ getLanguages: () => import_chunk_5SB3QASN.getLanguages,
27
+ getSdkPath: () => import_chunk_5SB3QASN.getSdkPath,
28
+ isWin: () => import_chunk_5SB3QASN.isWin,
29
+ optimizeProgram: () => import_chunk_5SB3QASN.optimizeProgram,
30
+ readPrg: () => import_chunk_5SB3QASN.readPrg,
31
+ readPrgWithOffsets: () => import_chunk_5SB3QASN.readPrgWithOffsets,
32
+ xmlUtil: () => import_chunk_5SB3QASN.xml_util_exports
33
33
  });
34
34
  module.exports = __toCommonJS(sdk_util_exports);
35
- var import_chunk_VAV4N2CL = require("./chunk-VAV4N2CL.cjs");
35
+ var import_chunk_5SB3QASN = require("./chunk-5SB3QASN.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, import_chunk_VAV4N2CL.init_sdk_util)();
39
+ (0, import_chunk_5SB3QASN.init_sdk_util)();
40
40
  // Annotate the CommonJS export names for ESM import in node:
41
41
  0 && (module.exports = {
42
42
  SectionKinds,
@@ -7,7 +7,7 @@ export declare function recordModifiedDecls(func: FunctionStateNode, lookupDefs:
7
7
  export declare function recordModifiedName(func: FunctionStateNode, name: string): void;
8
8
  export declare function recordModifiedUnknown(func: FunctionStateNode): void;
9
9
  export declare function recordCalledFunc(func: FunctionStateNode, callee: FunctionStateNode): null;
10
- export declare function recordCalledFuncs(func: FunctionStateNode, callees: FunctionStateNode[]): void;
10
+ export declare function recordCalledFuncs(func: FunctionStateNode, callees: FunctionStateNode | FunctionStateNode[]): void;
11
11
  export declare function functionMayModify(state: ProgramStateAnalysis, func: FunctionStateNode, decl: VariableStateNode): boolean;
12
12
  export declare function findCallees(lookupDefs: LookupDefinition[]): FunctionStateNode[] | null;
13
13
  export declare function findCalleesForNew(lookupDefs: LookupDefinition[]): FunctionStateNode[];
@@ -10,6 +10,7 @@ export declare const enum SectionKinds {
10
10
  HEADER = -805253120,
11
11
  HEADER_VERSIONED = -805253107,
12
12
  TEXT = -1059145026,
13
+ EXTENDED = -1059188563,
13
14
  DATA = -629491010,
14
15
  SYMBOLS = 1461170197,
15
16
  LINENUM = -1059161423,
@@ -17,6 +18,10 @@ export declare const enum SectionKinds {
17
18
  SIGNATURE = -507453934,
18
19
  STORE_SIG = 20833
19
20
  }
21
+ export declare const TEXT_SECTION_PC = 268435456;
22
+ export declare const EXTENDED_SECTION_BASE = 1342177280;
23
+ export declare const SECTION_PC_MASK = 4026531840;
24
+ export declare const PC_OFFSET_MASK = 16777215;
20
25
  export type SectionInfo = {
21
26
  offset: number;
22
27
  length: number;
@@ -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_VAV4N2CL = require("./chunk-VAV4N2CL.cjs");
24
+ var import_chunk_5SB3QASN = require("./chunk-5SB3QASN.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, import_chunk_VAV4N2CL.init_worker_task)();
31
+ (0, import_chunk_5SB3QASN.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_VAV4N2CL.performTask)(task));
34
+ return import_node_worker_threads.parentPort.postMessage(await (0, import_chunk_5SB3QASN.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.92",
4
+ "version": "1.1.94",
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.61",
59
+ "@markw65/prettier-plugin-monkeyc": "^1.0.65",
60
60
  "7z-wasm": "^1.2.0"
61
61
  },
62
62
  "devDependencies": {
@@ -64,7 +64,6 @@
64
64
  "@types/chai": "^4.3.4",
65
65
  "@types/glob": "^8.0.0",
66
66
  "@types/mocha": "^10.0.1",
67
- "@types/prettier": "^2.6.1",
68
67
  "@types/priorityqueuejs": "^1.0.1",
69
68
  "@typescript-eslint/eslint-plugin": "^5.28.0",
70
69
  "@typescript-eslint/parser": "^5.28.0",
@@ -74,11 +73,14 @@
74
73
  "fast-glob": "^3.2.12",
75
74
  "mocha": "^10.2.0",
76
75
  "peggy": "^3.0.2",
77
- "prettier": "^2.6.2",
76
+ "prettier": "^3.8.1",
78
77
  "prettier-plugin-pegjs": "^1.0.1",
79
78
  "priorityqueuejs": "^2.0.0",
80
79
  "typescript": "^5.0.4"
81
80
  },
81
+ "prettier": {
82
+ "trailingComma": "es5"
83
+ },
82
84
  "repository": {
83
85
  "type": "git",
84
86
  "url": "git+https://github.com/markw65/monkeyc-optimizer.git"