@markw65/monkeyc-optimizer 1.1.56 → 1.1.57

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 CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to the "monkeyc-optimizer" package will be documented in this file.
4
4
 
5
+ ### 1.1.57
6
+
7
+ - Include ConditionalExpression and LogicalExpression in evaluateFunction
8
+ - Fix personality search path (Fixes # 27)
9
+ - Use fully qualified names for enum typedefs (Fixes # 28)
10
+ - Fix auto-inlining of protected functions (Fixes #29)
11
+
5
12
  ### 1.1.56
6
13
 
7
14
  - Fix regression caused by the fix to #24 (Fixes #26)
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: () => import_chunk_M3LMSSY7.checkCompilerVersion,
22
- collectNamespaces: () => import_chunk_M3LMSSY7.collectNamespaces,
23
- createDocumentationMap: () => import_chunk_M3LMSSY7.createDocumentationMap,
24
- diagnostic: () => import_chunk_M3LMSSY7.diagnostic,
25
- diagnosticHelper: () => import_chunk_M3LMSSY7.diagnosticHelper,
26
- findNamesInScope: () => import_chunk_M3LMSSY7.findNamesInScope,
27
- findUsingForNode: () => import_chunk_M3LMSSY7.findUsingForNode,
28
- formatAst: () => import_chunk_M3LMSSY7.formatAst,
29
- formatAstLongLines: () => import_chunk_M3LMSSY7.formatAstLongLines,
30
- formatScopedName: () => import_chunk_M3LMSSY7.formatScopedName,
31
- getApiFunctionInfo: () => import_chunk_M3LMSSY7.getApiFunctionInfo,
32
- getApiMapping: () => import_chunk_M3LMSSY7.getApiMapping,
33
- getSuperClasses: () => import_chunk_M3LMSSY7.getSuperClasses,
21
+ checkCompilerVersion: () => import_chunk_PUEG4GNZ.checkCompilerVersion,
22
+ collectNamespaces: () => import_chunk_PUEG4GNZ.collectNamespaces,
23
+ createDocumentationMap: () => import_chunk_PUEG4GNZ.createDocumentationMap,
24
+ diagnostic: () => import_chunk_PUEG4GNZ.diagnostic,
25
+ diagnosticHelper: () => import_chunk_PUEG4GNZ.diagnosticHelper,
26
+ findNamesInScope: () => import_chunk_PUEG4GNZ.findNamesInScope,
27
+ findUsingForNode: () => import_chunk_PUEG4GNZ.findUsingForNode,
28
+ formatAst: () => import_chunk_PUEG4GNZ.formatAst,
29
+ formatAstLongLines: () => import_chunk_PUEG4GNZ.formatAstLongLines,
30
+ formatScopedName: () => import_chunk_PUEG4GNZ.formatScopedName,
31
+ getApiFunctionInfo: () => import_chunk_PUEG4GNZ.getApiFunctionInfo,
32
+ getApiMapping: () => import_chunk_PUEG4GNZ.getApiMapping,
33
+ getSuperClasses: () => import_chunk_PUEG4GNZ.getSuperClasses,
34
34
  hasProperty: () => import_chunk_MBTLUWXR.hasProperty,
35
- isClassVariable: () => import_chunk_M3LMSSY7.isClassVariable,
36
- isLocal: () => import_chunk_M3LMSSY7.isLocal,
37
- isLookupCandidate: () => import_chunk_M3LMSSY7.isLookupCandidate,
38
- isStateNode: () => import_chunk_M3LMSSY7.isStateNode,
39
- lookupByFullName: () => import_chunk_M3LMSSY7.lookupByFullName,
40
- lookupNext: () => import_chunk_M3LMSSY7.lookupNext,
41
- lookupResultContains: () => import_chunk_M3LMSSY7.lookupResultContains,
42
- lookupWithType: () => import_chunk_M3LMSSY7.lookupWithType,
43
- makeToyboxLink: () => import_chunk_M3LMSSY7.makeToyboxLink,
44
- mapVarDeclsByType: () => import_chunk_M3LMSSY7.mapVarDeclsByType,
45
- markInvokeClassMethod: () => import_chunk_M3LMSSY7.markInvokeClassMethod,
46
- parseSdkVersion: () => import_chunk_M3LMSSY7.parseSdkVersion,
47
- resolveDiagnostics: () => import_chunk_M3LMSSY7.resolveDiagnostics,
48
- resolveDiagnosticsMap: () => import_chunk_M3LMSSY7.resolveDiagnosticsMap,
49
- sameLookupResult: () => import_chunk_M3LMSSY7.sameLookupResult,
35
+ isClassVariable: () => import_chunk_PUEG4GNZ.isClassVariable,
36
+ isLocal: () => import_chunk_PUEG4GNZ.isLocal,
37
+ isLookupCandidate: () => import_chunk_PUEG4GNZ.isLookupCandidate,
38
+ isStateNode: () => import_chunk_PUEG4GNZ.isStateNode,
39
+ lookupByFullName: () => import_chunk_PUEG4GNZ.lookupByFullName,
40
+ lookupNext: () => import_chunk_PUEG4GNZ.lookupNext,
41
+ lookupResultContains: () => import_chunk_PUEG4GNZ.lookupResultContains,
42
+ lookupWithType: () => import_chunk_PUEG4GNZ.lookupWithType,
43
+ makeToyboxLink: () => import_chunk_PUEG4GNZ.makeToyboxLink,
44
+ mapVarDeclsByType: () => import_chunk_PUEG4GNZ.mapVarDeclsByType,
45
+ markInvokeClassMethod: () => import_chunk_PUEG4GNZ.markInvokeClassMethod,
46
+ parseSdkVersion: () => import_chunk_PUEG4GNZ.parseSdkVersion,
47
+ resolveDiagnostics: () => import_chunk_PUEG4GNZ.resolveDiagnostics,
48
+ resolveDiagnosticsMap: () => import_chunk_PUEG4GNZ.resolveDiagnosticsMap,
49
+ sameLookupResult: () => import_chunk_PUEG4GNZ.sameLookupResult,
50
50
  traverseAst: () => import_chunk_MBTLUWXR.traverseAst,
51
- variableDeclarationName: () => import_chunk_M3LMSSY7.variableDeclarationName,
52
- visitReferences: () => import_chunk_M3LMSSY7.visitReferences,
53
- visit_resources: () => import_chunk_M3LMSSY7.visit_resources,
54
- visitorNode: () => import_chunk_M3LMSSY7.visitorNode
51
+ variableDeclarationName: () => import_chunk_PUEG4GNZ.variableDeclarationName,
52
+ visitReferences: () => import_chunk_PUEG4GNZ.visitReferences,
53
+ visit_resources: () => import_chunk_PUEG4GNZ.visit_resources,
54
+ visitorNode: () => import_chunk_PUEG4GNZ.visitorNode
55
55
  });
56
56
  module.exports = __toCommonJS(api_exports);
57
- var import_chunk_M3LMSSY7 = require("./chunk-M3LMSSY7.cjs");
57
+ var import_chunk_PUEG4GNZ = require("./chunk-PUEG4GNZ.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, import_chunk_M3LMSSY7.init_api)();
61
+ (0, import_chunk_PUEG4GNZ.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 chunk_M3LMSSY7_exports = {};
30
- __export(chunk_M3LMSSY7_exports, {
29
+ var chunk_PUEG4GNZ_exports = {};
30
+ __export(chunk_PUEG4GNZ_exports, {
31
31
  EnumTagsConst: () => EnumTagsConst,
32
32
  LastTypeTag: () => LastTypeTag,
33
33
  ObjectLikeTagsConst: () => ObjectLikeTagsConst,
@@ -133,7 +133,7 @@ __export(chunk_M3LMSSY7_exports, {
133
133
  visitorNode: () => visitorNode,
134
134
  xml_util_exports: () => xml_util_exports
135
135
  });
136
- module.exports = __toCommonJS(chunk_M3LMSSY7_exports);
136
+ module.exports = __toCommonJS(chunk_PUEG4GNZ_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");
@@ -5560,6 +5560,20 @@ var init_function_info = (0, import_chunk_ABYVSU2C.__esm)({
5560
5560
  (0, import_chunk_MBTLUWXR.init_ast)();
5561
5561
  }
5562
5562
  });
5563
+ var StateNodeAttributes;
5564
+ var init_optimizer_types = (0, import_chunk_ABYVSU2C.__esm)({
5565
+ "src/optimizer-types.ts"() {
5566
+ "use strict";
5567
+ StateNodeAttributes = /* @__PURE__ */ ((StateNodeAttributes2) => {
5568
+ StateNodeAttributes2[StateNodeAttributes2["NONE"] = 0] = "NONE";
5569
+ StateNodeAttributes2[StateNodeAttributes2["PUBLIC"] = 1] = "PUBLIC";
5570
+ StateNodeAttributes2[StateNodeAttributes2["PROTECTED"] = 2] = "PROTECTED";
5571
+ StateNodeAttributes2[StateNodeAttributes2["PRIVATE"] = 4] = "PRIVATE";
5572
+ StateNodeAttributes2[StateNodeAttributes2["STATIC"] = 8] = "STATIC";
5573
+ return StateNodeAttributes2;
5574
+ })(StateNodeAttributes || {});
5575
+ }
5576
+ });
5563
5577
  function renameIdentifier(ident, newName) {
5564
5578
  if (!ident.original) {
5565
5579
  ident.original = ident.name;
@@ -5826,7 +5840,7 @@ function canInline(state, func, args) {
5826
5840
  }
5827
5841
  return safeArgs.every((arg) => arg !== null);
5828
5842
  }
5829
- function inliningLooksUseful(func, node) {
5843
+ function inliningLooksUseful(state, func, node) {
5830
5844
  while (true) {
5831
5845
  if (node.type === "BinaryExpression" && node.operator === "as") {
5832
5846
  node = node.left;
@@ -5839,10 +5853,42 @@ function inliningLooksUseful(func, node) {
5839
5853
  if (node.type === "Literal")
5840
5854
  return true;
5841
5855
  if (node.type === "Identifier") {
5842
- if (func.params.length === 1 && variableDeclarationName(func.params[0]) === node.name) {
5856
+ if (func.node.params.length === 1 && variableDeclarationName(func.node.params[0]) === node.name) {
5843
5857
  return 1;
5844
5858
  }
5845
- return true;
5859
+ const stack = func.stack;
5860
+ if (!stack)
5861
+ return false;
5862
+ const calleeClass = stack[stack.length - 1].sn;
5863
+ if (calleeClass.type !== "ClassDeclaration") {
5864
+ return true;
5865
+ }
5866
+ const [, results] = state.lookupNonlocal(node, null, stack);
5867
+ if (!results)
5868
+ return false;
5869
+ const attrs = results.reduce(
5870
+ (attrs2, result) => attrs2 | result.results.reduce(
5871
+ (attrs3, sn) => attrs3 | (isStateNode(sn) ? sn.attributes & (4 | 2) : 0),
5872
+ 0
5873
+ ),
5874
+ 0
5875
+ );
5876
+ if (!attrs)
5877
+ return true;
5878
+ if (state.stack[stack.length - 1] === stack[stack.length - 1]) {
5879
+ return true;
5880
+ }
5881
+ if (attrs & 4)
5882
+ return false;
5883
+ for (let i = state.stack.length; i--; ) {
5884
+ const callerClass = state.stack[i].sn;
5885
+ if (callerClass.type === "ClassDeclaration") {
5886
+ if (getSuperClasses(callerClass)?.has(calleeClass)) {
5887
+ return true;
5888
+ }
5889
+ break;
5890
+ }
5891
+ }
5846
5892
  }
5847
5893
  return false;
5848
5894
  }
@@ -5868,7 +5914,8 @@ function shouldInline(state, func, call, context) {
5868
5914
  if (func.node.body && func.node.body.body.length === 1 && func.node.body.body[0].type === "ReturnStatement" && func.node.body.body[0].argument && func.node.params.length === args.length) {
5869
5915
  inlineAsExpression = true;
5870
5916
  autoInline = inliningLooksUseful(
5871
- func.node,
5917
+ state,
5918
+ func,
5872
5919
  func.node.body.body[0].argument
5873
5920
  );
5874
5921
  }
@@ -6492,23 +6539,10 @@ var init_inliner = (0, import_chunk_ABYVSU2C.__esm)({
6492
6539
  init_api();
6493
6540
  (0, import_chunk_MBTLUWXR.init_ast)();
6494
6541
  init_function_info();
6542
+ init_optimizer_types();
6495
6543
  init_variable_renamer();
6496
6544
  }
6497
6545
  });
6498
- var StateNodeAttributes;
6499
- var init_optimizer_types = (0, import_chunk_ABYVSU2C.__esm)({
6500
- "src/optimizer-types.ts"() {
6501
- "use strict";
6502
- StateNodeAttributes = /* @__PURE__ */ ((StateNodeAttributes2) => {
6503
- StateNodeAttributes2[StateNodeAttributes2["NONE"] = 0] = "NONE";
6504
- StateNodeAttributes2[StateNodeAttributes2["PUBLIC"] = 1] = "PUBLIC";
6505
- StateNodeAttributes2[StateNodeAttributes2["PROTECTED"] = 2] = "PROTECTED";
6506
- StateNodeAttributes2[StateNodeAttributes2["PRIVATE"] = 4] = "PRIVATE";
6507
- StateNodeAttributes2[StateNodeAttributes2["STATIC"] = 8] = "STATIC";
6508
- return StateNodeAttributes2;
6509
- })(StateNodeAttributes || {});
6510
- }
6511
- });
6512
6546
  function pragmaChecker(state, ast, diagnostics) {
6513
6547
  const comments = ast.comments;
6514
6548
  if (!comments)
@@ -16535,6 +16569,8 @@ function evaluateFunction(istate, func, args) {
16535
16569
  case "ReturnStatement":
16536
16570
  case "UnaryExpression":
16537
16571
  case "BinaryExpression":
16572
+ case "ConditionalExpression":
16573
+ case "LogicalExpression":
16538
16574
  case "Literal":
16539
16575
  case "Identifier":
16540
16576
  return;
@@ -17132,7 +17168,7 @@ function cleanup(state, node, ast) {
17132
17168
  })
17133
17169
  );
17134
17170
  if (!enumType.has(null)) {
17135
- node.enumType = [...enumType].join(" or ");
17171
+ node.enumType = [...enumType].map((t) => t === "Null" ? t : `Toybox.Lang.${t}`).join(" or ");
17136
17172
  node.members.splice(0);
17137
17173
  }
17138
17174
  }
@@ -27530,7 +27566,11 @@ async function default_jungle() {
27530
27566
  assign(id, [qname(base)]);
27531
27567
  }
27532
27568
  rassign(`${id}.resourcePath`, [literal(rez)], base);
27533
- rassign(`${id}.personality`, [literal(rez)], base);
27569
+ rassign(
27570
+ `${id}.personality`,
27571
+ [literal(`${connectiq}/Devices/${id}`), literal(rez)],
27572
+ base
27573
+ );
27534
27574
  languages.forEach(
27535
27575
  (l) => rassign(`${id}.lang.${l.id}`, [literal(`${rez}-${l.id}`)], base)
27536
27576
  );
@@ -28912,17 +28952,9 @@ async function fileInfoFromConfig(workspace, output, buildConfig, extraExcludes,
28912
28952
  buildConfig.sourcePath,
28913
28953
  ".mc"
28914
28954
  );
28915
- let personality = buildConfig.personality;
28916
- if (buildConfig.products) {
28917
- personality = (personality ?? []).concat(
28918
- buildConfig.products.map(
28919
- (product) => `${connectiq}/Devices/${product}/personality.mss`
28920
- )
28921
- );
28922
- }
28923
28955
  const { files: personalityFiles } = await filesFromPaths(
28924
28956
  workspace,
28925
- personality,
28957
+ buildConfig.personality,
28926
28958
  ".mss"
28927
28959
  );
28928
28960
  const excludeAnnotations = Object.assign(
@@ -29006,7 +29038,13 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
29006
29038
  ).then(({ fnMap: fnMap2 }) => fnMap2);
29007
29039
  }).flat()
29008
29040
  );
29009
- barrelFnMaps.forEach((barrelFnMap) => Object.assign(fnMap, barrelFnMap));
29041
+ barrelFnMaps.forEach(
29042
+ (barrelFnMap) => Object.entries(barrelFnMap).forEach(([key, value2]) => {
29043
+ if (!(0, import_chunk_MBTLUWXR.hasProperty)(fnMap, key)) {
29044
+ fnMap[key] = value2;
29045
+ }
29046
+ })
29047
+ );
29010
29048
  }
29011
29049
  const actualOptimizedFiles = (await (0, import_chunk_SG7ODKRM.globa)(path4.join(output, "**", "*.mc"), { mark: true })).filter((file) => !file.endsWith("/")).sort();
29012
29050
  const {
@@ -29030,7 +29068,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
29030
29068
  const opt_time = await (0, import_chunk_SG7ODKRM.first_modified)(
29031
29069
  Object.values(fnMap).map((v) => v.output)
29032
29070
  );
29033
- if (source_time < opt_time && 1713286417604 < opt_time) {
29071
+ if (source_time < opt_time && 1713624391103 < opt_time) {
29034
29072
  return {
29035
29073
  hasTests,
29036
29074
  diagnostics: prevDiagnostics,
@@ -29069,7 +29107,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
29069
29107
  hasTests: hasTests2,
29070
29108
  diagnostics,
29071
29109
  sdkVersion,
29072
- optimizerVersion: "1.1.56",
29110
+ optimizerVersion: "1.1.57",
29073
29111
  ...Object.fromEntries(
29074
29112
  configOptionsToCheck.map((option) => [option, config[option]])
29075
29113
  )
@@ -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: () => import_chunk_M3LMSSY7.StateNodeAttributes,
22
- buildOptimizedProject: () => import_chunk_M3LMSSY7.buildOptimizedProject,
21
+ StateNodeAttributes: () => import_chunk_PUEG4GNZ.StateNodeAttributes,
22
+ buildOptimizedProject: () => import_chunk_PUEG4GNZ.buildOptimizedProject,
23
23
  copyRecursiveAsNeeded: () => import_chunk_SG7ODKRM.copyRecursiveAsNeeded,
24
- defaultConfig: () => import_chunk_M3LMSSY7.defaultConfig,
25
- display: () => import_chunk_M3LMSSY7.display,
26
- generateOneConfig: () => import_chunk_M3LMSSY7.generateOneConfig,
27
- generateOptimizedProject: () => import_chunk_M3LMSSY7.generateOptimizedProject,
28
- getConfig: () => import_chunk_M3LMSSY7.getConfig,
29
- getProjectAnalysis: () => import_chunk_M3LMSSY7.getProjectAnalysis,
30
- get_jungle: () => import_chunk_M3LMSSY7.get_jungle,
31
- isErrorWithLocation: () => import_chunk_M3LMSSY7.isErrorWithLocation,
32
- launchSimulator: () => import_chunk_M3LMSSY7.launchSimulator,
33
- manifestProducts: () => import_chunk_M3LMSSY7.manifestProducts,
34
- mctree: () => import_chunk_M3LMSSY7.mctree,
35
- simulateProgram: () => import_chunk_M3LMSSY7.simulateProgram
24
+ defaultConfig: () => import_chunk_PUEG4GNZ.defaultConfig,
25
+ display: () => import_chunk_PUEG4GNZ.display,
26
+ generateOneConfig: () => import_chunk_PUEG4GNZ.generateOneConfig,
27
+ generateOptimizedProject: () => import_chunk_PUEG4GNZ.generateOptimizedProject,
28
+ getConfig: () => import_chunk_PUEG4GNZ.getConfig,
29
+ getProjectAnalysis: () => import_chunk_PUEG4GNZ.getProjectAnalysis,
30
+ get_jungle: () => import_chunk_PUEG4GNZ.get_jungle,
31
+ isErrorWithLocation: () => import_chunk_PUEG4GNZ.isErrorWithLocation,
32
+ launchSimulator: () => import_chunk_PUEG4GNZ.launchSimulator,
33
+ manifestProducts: () => import_chunk_PUEG4GNZ.manifestProducts,
34
+ mctree: () => import_chunk_PUEG4GNZ.mctree,
35
+ simulateProgram: () => import_chunk_PUEG4GNZ.simulateProgram
36
36
  });
37
37
  module.exports = __toCommonJS(optimizer_exports);
38
- var import_chunk_M3LMSSY7 = require("./chunk-M3LMSSY7.cjs");
38
+ var import_chunk_PUEG4GNZ = require("./chunk-PUEG4GNZ.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, import_chunk_M3LMSSY7.init_optimizer)();
42
+ (0, import_chunk_PUEG4GNZ.init_optimizer)();
43
43
  // Annotate the CommonJS export names for ESM import in node:
44
44
  0 && (module.exports = {
45
45
  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_M3LMSSY7.SectionKinds,
22
- appSupport: () => import_chunk_M3LMSSY7.appSupport,
23
- connectiq: () => import_chunk_M3LMSSY7.connectiq,
24
- getDeviceInfo: () => import_chunk_M3LMSSY7.getDeviceInfo,
25
- getFunctionDocumentation: () => import_chunk_M3LMSSY7.getFunctionDocumentation,
26
- getLanguages: () => import_chunk_M3LMSSY7.getLanguages,
27
- getSdkPath: () => import_chunk_M3LMSSY7.getSdkPath,
28
- isWin: () => import_chunk_M3LMSSY7.isWin,
29
- optimizeProgram: () => import_chunk_M3LMSSY7.optimizeProgram,
30
- readPrg: () => import_chunk_M3LMSSY7.readPrg,
31
- readPrgWithOffsets: () => import_chunk_M3LMSSY7.readPrgWithOffsets,
32
- xmlUtil: () => import_chunk_M3LMSSY7.xml_util_exports
21
+ SectionKinds: () => import_chunk_PUEG4GNZ.SectionKinds,
22
+ appSupport: () => import_chunk_PUEG4GNZ.appSupport,
23
+ connectiq: () => import_chunk_PUEG4GNZ.connectiq,
24
+ getDeviceInfo: () => import_chunk_PUEG4GNZ.getDeviceInfo,
25
+ getFunctionDocumentation: () => import_chunk_PUEG4GNZ.getFunctionDocumentation,
26
+ getLanguages: () => import_chunk_PUEG4GNZ.getLanguages,
27
+ getSdkPath: () => import_chunk_PUEG4GNZ.getSdkPath,
28
+ isWin: () => import_chunk_PUEG4GNZ.isWin,
29
+ optimizeProgram: () => import_chunk_PUEG4GNZ.optimizeProgram,
30
+ readPrg: () => import_chunk_PUEG4GNZ.readPrg,
31
+ readPrgWithOffsets: () => import_chunk_PUEG4GNZ.readPrgWithOffsets,
32
+ xmlUtil: () => import_chunk_PUEG4GNZ.xml_util_exports
33
33
  });
34
34
  module.exports = __toCommonJS(sdk_util_exports);
35
- var import_chunk_M3LMSSY7 = require("./chunk-M3LMSSY7.cjs");
35
+ var import_chunk_PUEG4GNZ = require("./chunk-PUEG4GNZ.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, import_chunk_M3LMSSY7.init_sdk_util)();
39
+ (0, import_chunk_PUEG4GNZ.init_sdk_util)();
40
40
  // Annotate the CommonJS export names for ESM import in node:
41
41
  0 && (module.exports = {
42
42
  SectionKinds,
@@ -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_M3LMSSY7 = require("./chunk-M3LMSSY7.cjs");
24
+ var import_chunk_PUEG4GNZ = require("./chunk-PUEG4GNZ.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, import_chunk_M3LMSSY7.init_worker_task)();
31
+ (0, import_chunk_PUEG4GNZ.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_M3LMSSY7.performTask)(task));
34
+ return import_node_worker_threads.parentPort.postMessage(await (0, import_chunk_PUEG4GNZ.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.56",
4
+ "version": "1.1.57",
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",