@markw65/monkeyc-optimizer 1.1.33 → 1.1.35

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_7ANQTFGD.StateNodeAttributes,
22
- buildOptimizedProject: () => import_chunk_7ANQTFGD.buildOptimizedProject,
21
+ StateNodeAttributes: () => import_chunk_Q5WTV4CN.StateNodeAttributes,
22
+ buildOptimizedProject: () => import_chunk_Q5WTV4CN.buildOptimizedProject,
23
23
  copyRecursiveAsNeeded: () => import_chunk_PVBIKZYZ.copyRecursiveAsNeeded,
24
- defaultConfig: () => import_chunk_7ANQTFGD.defaultConfig,
25
- display: () => import_chunk_7ANQTFGD.display,
26
- generateApiMirTests: () => import_chunk_7ANQTFGD.generateApiMirTests,
27
- generateOneConfig: () => import_chunk_7ANQTFGD.generateOneConfig,
28
- generateOptimizedProject: () => import_chunk_7ANQTFGD.generateOptimizedProject,
29
- getConfig: () => import_chunk_7ANQTFGD.getConfig,
30
- getProjectAnalysis: () => import_chunk_7ANQTFGD.getProjectAnalysis,
31
- get_jungle: () => import_chunk_7ANQTFGD.get_jungle,
32
- isErrorWithLocation: () => import_chunk_7ANQTFGD.isErrorWithLocation,
33
- launchSimulator: () => import_chunk_7ANQTFGD.launchSimulator,
34
- manifestProducts: () => import_chunk_7ANQTFGD.manifestProducts,
35
- mctree: () => import_chunk_7ANQTFGD.mctree,
36
- simulateProgram: () => import_chunk_7ANQTFGD.simulateProgram
24
+ defaultConfig: () => import_chunk_Q5WTV4CN.defaultConfig,
25
+ display: () => import_chunk_Q5WTV4CN.display,
26
+ generateApiMirTests: () => import_chunk_Q5WTV4CN.generateApiMirTests,
27
+ generateOneConfig: () => import_chunk_Q5WTV4CN.generateOneConfig,
28
+ generateOptimizedProject: () => import_chunk_Q5WTV4CN.generateOptimizedProject,
29
+ getConfig: () => import_chunk_Q5WTV4CN.getConfig,
30
+ getProjectAnalysis: () => import_chunk_Q5WTV4CN.getProjectAnalysis,
31
+ get_jungle: () => import_chunk_Q5WTV4CN.get_jungle,
32
+ isErrorWithLocation: () => import_chunk_Q5WTV4CN.isErrorWithLocation,
33
+ launchSimulator: () => import_chunk_Q5WTV4CN.launchSimulator,
34
+ manifestProducts: () => import_chunk_Q5WTV4CN.manifestProducts,
35
+ mctree: () => import_chunk_Q5WTV4CN.mctree,
36
+ simulateProgram: () => import_chunk_Q5WTV4CN.simulateProgram
37
37
  });
38
38
  module.exports = __toCommonJS(optimizer_exports);
39
- var import_chunk_7ANQTFGD = require("./chunk-7ANQTFGD.cjs");
39
+ var import_chunk_Q5WTV4CN = require("./chunk-Q5WTV4CN.cjs");
40
40
  var import_chunk_PVBIKZYZ = require("./chunk-PVBIKZYZ.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_7ANQTFGD.init_optimizer)();
43
+ (0, import_chunk_Q5WTV4CN.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_7ANQTFGD.SectionKinds,
22
- appSupport: () => import_chunk_7ANQTFGD.appSupport,
23
- connectiq: () => import_chunk_7ANQTFGD.connectiq,
24
- getDeviceInfo: () => import_chunk_7ANQTFGD.getDeviceInfo,
25
- getFunctionDocumentation: () => import_chunk_7ANQTFGD.getFunctionDocumentation,
26
- getLanguages: () => import_chunk_7ANQTFGD.getLanguages,
27
- getSdkPath: () => import_chunk_7ANQTFGD.getSdkPath,
28
- isWin: () => import_chunk_7ANQTFGD.isWin,
29
- optimizeProgram: () => import_chunk_7ANQTFGD.optimizeProgram,
30
- readPrg: () => import_chunk_7ANQTFGD.readPrg,
31
- readPrgWithOffsets: () => import_chunk_7ANQTFGD.readPrgWithOffsets,
32
- xmlUtil: () => import_chunk_7ANQTFGD.xml_util_exports
21
+ SectionKinds: () => import_chunk_Q5WTV4CN.SectionKinds,
22
+ appSupport: () => import_chunk_Q5WTV4CN.appSupport,
23
+ connectiq: () => import_chunk_Q5WTV4CN.connectiq,
24
+ getDeviceInfo: () => import_chunk_Q5WTV4CN.getDeviceInfo,
25
+ getFunctionDocumentation: () => import_chunk_Q5WTV4CN.getFunctionDocumentation,
26
+ getLanguages: () => import_chunk_Q5WTV4CN.getLanguages,
27
+ getSdkPath: () => import_chunk_Q5WTV4CN.getSdkPath,
28
+ isWin: () => import_chunk_Q5WTV4CN.isWin,
29
+ optimizeProgram: () => import_chunk_Q5WTV4CN.optimizeProgram,
30
+ readPrg: () => import_chunk_Q5WTV4CN.readPrg,
31
+ readPrgWithOffsets: () => import_chunk_Q5WTV4CN.readPrgWithOffsets,
32
+ xmlUtil: () => import_chunk_Q5WTV4CN.xml_util_exports
33
33
  });
34
34
  module.exports = __toCommonJS(sdk_util_exports);
35
- var import_chunk_7ANQTFGD = require("./chunk-7ANQTFGD.cjs");
35
+ var import_chunk_Q5WTV4CN = require("./chunk-Q5WTV4CN.cjs");
36
36
  var import_chunk_PVBIKZYZ = require("./chunk-PVBIKZYZ.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_7ANQTFGD.init_sdk_util)();
39
+ (0, import_chunk_Q5WTV4CN.init_sdk_util)();
40
40
  // Annotate the CommonJS export names for ESM import in node:
41
41
  0 && (module.exports = {
42
42
  SectionKinds,
@@ -1,9 +1,7 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import * as crypto from "node:crypto";
4
3
  import { BuildConfig } from "./optimizer-types";
5
4
  import { SectionInfo } from "./readprg/bytecode";
6
- import { xmlUtil } from "./sdk-util";
7
5
  export declare function readPrg(path: string): Promise<{
8
6
  [k: string]: number;
9
7
  }>;
@@ -16,10 +14,6 @@ export declare function readPrgWithOffsets(view: DataView): {
16
14
  sections: Record<number, SectionInfo>;
17
15
  };
18
16
  export declare function optimizeProgram(filepath: string, devKey?: string | undefined, output?: string, config?: BuildConfig): Promise<unknown>;
19
- export declare function optimizeProgramBuffer(filepath: string, view: DataView, debugXml: xmlUtil.Document, key: crypto.KeyObject | undefined, config: BuildConfig | undefined): {
20
- signature: Buffer | undefined;
21
- buffer: Buffer;
22
- };
23
17
  export declare function optimizePrgAndDebug(prgName: string, prgBuffer: ArrayBuffer, prgOffset: number, prgLength: number, xmlName: string, xmlBuffer: ArrayBuffer, xmlOffset: number, xmlLength: number, key: crypto.KeyObject, config: BuildConfig | undefined): Promise<{
24
18
  sigBuffer: ArrayBufferLike | undefined;
25
19
  sigOffset: number | undefined;
@@ -1,6 +1,6 @@
1
1
  import { mctree } from "@markw65/prettier-plugin-monkeyc";
2
2
  import { DiagnosticType, FunctionStateNode, ProgramStateAnalysis } from "../optimizer-types";
3
- import { ExactOrUnion } from "./types";
3
+ import { ExactOrUnion, ObjectType } from "./types";
4
4
  export type TypeMap = Map<mctree.Node, ExactOrUnion>;
5
5
  export type InterpStackElem = {
6
6
  value: ExactOrUnion;
@@ -29,3 +29,5 @@ export declare function deEnumerate(t: ExactOrUnion): ExactOrUnion;
29
29
  export declare function evaluateNode(istate: InterpState, node: mctree.Node): void;
30
30
  export declare function roundToFloat(value: number): number;
31
31
  export declare function mustBeIdentical(a: ExactOrUnion, b: ExactOrUnion): boolean;
32
+ export declare function isByteArray(object: ExactOrUnion): boolean | undefined;
33
+ export declare function isByteArrayData(objectData: NonNullable<ObjectType["value"]>): boolean | undefined;
@@ -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_7ANQTFGD = require("./chunk-7ANQTFGD.cjs");
24
+ var import_chunk_Q5WTV4CN = require("./chunk-Q5WTV4CN.cjs");
25
25
  var import_chunk_PVBIKZYZ = require("./chunk-PVBIKZYZ.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_7ANQTFGD.init_worker_task)();
31
+ (0, import_chunk_Q5WTV4CN.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_7ANQTFGD.performTask)(task));
34
+ return import_node_worker_threads.parentPort.postMessage(await (0, import_chunk_Q5WTV4CN.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.33",
4
+ "version": "1.1.35",
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,6 +36,7 @@
36
36
  "cft-font-info": "bin/cft-font-info.js"
37
37
  },
38
38
  "files": [
39
+ "CHANGELOG.md",
39
40
  "build/optimizer.cjs",
40
41
  "build/util.cjs",
41
42
  "build/sdk-util.cjs",
@@ -1,5 +0,0 @@
1
- import { Block, FuncEntry } from "./bytecode";
2
- export declare function isSwitchLike(func: FuncEntry, block: Block, index: number): false | {
3
- xpush: import("./opcodes").Ipush | import("./opcodes").Fpush | import("./opcodes").Spush | import("./opcodes").Bpush | import("./opcodes").Lpush | import("./opcodes").Dpush | import("./opcodes").Cpush;
4
- index: number;
5
- };