@markw65/monkeyc-optimizer 1.1.55 → 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,18 @@
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
+
12
+ ### 1.1.56
13
+
14
+ - Fix regression caused by the fix to #24 (Fixes #26)
15
+ - Fix bug in the post build optimizer for system 7 devices, caused by not handling the new argcincsp bytecode
16
+
5
17
  ### 1.1.55
6
18
 
7
19
  - Allow class typedef lookups from static methods
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_GWRGLJLB.checkCompilerVersion,
22
- collectNamespaces: () => import_chunk_GWRGLJLB.collectNamespaces,
23
- createDocumentationMap: () => import_chunk_GWRGLJLB.createDocumentationMap,
24
- diagnostic: () => import_chunk_GWRGLJLB.diagnostic,
25
- diagnosticHelper: () => import_chunk_GWRGLJLB.diagnosticHelper,
26
- findNamesInScope: () => import_chunk_GWRGLJLB.findNamesInScope,
27
- findUsingForNode: () => import_chunk_GWRGLJLB.findUsingForNode,
28
- formatAst: () => import_chunk_GWRGLJLB.formatAst,
29
- formatAstLongLines: () => import_chunk_GWRGLJLB.formatAstLongLines,
30
- formatScopedName: () => import_chunk_GWRGLJLB.formatScopedName,
31
- getApiFunctionInfo: () => import_chunk_GWRGLJLB.getApiFunctionInfo,
32
- getApiMapping: () => import_chunk_GWRGLJLB.getApiMapping,
33
- getSuperClasses: () => import_chunk_GWRGLJLB.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_GWRGLJLB.isClassVariable,
36
- isLocal: () => import_chunk_GWRGLJLB.isLocal,
37
- isLookupCandidate: () => import_chunk_GWRGLJLB.isLookupCandidate,
38
- isStateNode: () => import_chunk_GWRGLJLB.isStateNode,
39
- lookupByFullName: () => import_chunk_GWRGLJLB.lookupByFullName,
40
- lookupNext: () => import_chunk_GWRGLJLB.lookupNext,
41
- lookupResultContains: () => import_chunk_GWRGLJLB.lookupResultContains,
42
- lookupWithType: () => import_chunk_GWRGLJLB.lookupWithType,
43
- makeToyboxLink: () => import_chunk_GWRGLJLB.makeToyboxLink,
44
- mapVarDeclsByType: () => import_chunk_GWRGLJLB.mapVarDeclsByType,
45
- markInvokeClassMethod: () => import_chunk_GWRGLJLB.markInvokeClassMethod,
46
- parseSdkVersion: () => import_chunk_GWRGLJLB.parseSdkVersion,
47
- resolveDiagnostics: () => import_chunk_GWRGLJLB.resolveDiagnostics,
48
- resolveDiagnosticsMap: () => import_chunk_GWRGLJLB.resolveDiagnosticsMap,
49
- sameLookupResult: () => import_chunk_GWRGLJLB.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_GWRGLJLB.variableDeclarationName,
52
- visitReferences: () => import_chunk_GWRGLJLB.visitReferences,
53
- visit_resources: () => import_chunk_GWRGLJLB.visit_resources,
54
- visitorNode: () => import_chunk_GWRGLJLB.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_GWRGLJLB = require("./chunk-GWRGLJLB.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_GWRGLJLB.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_GWRGLJLB_exports = {};
30
- __export(chunk_GWRGLJLB_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_GWRGLJLB_exports, {
133
133
  visitorNode: () => visitorNode,
134
134
  xml_util_exports: () => xml_util_exports
135
135
  });
136
- module.exports = __toCommonJS(chunk_GWRGLJLB_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
  }
@@ -18250,40 +18286,42 @@ function lookupNext(state, results, decls, property) {
18250
18286
  const items = [];
18251
18287
  const addToItems = (sns) => sns.forEach((module2) => {
18252
18288
  if (!isStateNode(module2)) {
18253
- if (module2.type === "EnumStringMember") {
18254
- if (!module2.init) {
18255
- addToItems(lookupByFullName(state, "Toybox.Lang.Number"));
18256
- } else if (module2.init.type === "Literal") {
18257
- const [, type] = (0, import_chunk_MBTLUWXR.getNodeValue)(module2.init);
18258
- switch (type) {
18259
- case "Null":
18260
- return;
18261
- case "Boolean":
18262
- case "Char":
18263
- case "Double":
18264
- case "Float":
18265
- case "Long":
18266
- case "Number":
18267
- case "String":
18268
- addToItems(lookupByFullName(state, `Toybox.Lang.${type}`));
18269
- return;
18270
- }
18271
- } else {
18272
- [
18273
- "Boolean",
18274
- "Char",
18275
- "Double",
18276
- "Float",
18277
- "Long",
18278
- "Number",
18279
- "String"
18280
- ].forEach(
18281
- (type) => addToItems(lookupByFullName(state, `Toybox.Lang.${type}`))
18282
- );
18283
- return;
18289
+ if (module2.type !== "EnumStringMember")
18290
+ return;
18291
+ if (!module2.init) {
18292
+ addToItems(lookupByFullName(state, "Toybox.Lang.Number"));
18293
+ return;
18294
+ }
18295
+ if (module2.init.type === "Literal") {
18296
+ const [, type] = (0, import_chunk_MBTLUWXR.getNodeValue)(module2.init);
18297
+ switch (type) {
18298
+ case "Null":
18299
+ break;
18300
+ case "Boolean":
18301
+ case "Char":
18302
+ case "Double":
18303
+ case "Float":
18304
+ case "Long":
18305
+ case "Number":
18306
+ case "String":
18307
+ addToItems(lookupByFullName(state, `Toybox.Lang.${type}`));
18308
+ break;
18309
+ default:
18310
+ unhandledType(type);
18284
18311
  }
18312
+ return;
18285
18313
  }
18286
- addToItems(lookupByFullName(state, "Toybox.Lang.Object"));
18314
+ [
18315
+ "Boolean",
18316
+ "Char",
18317
+ "Double",
18318
+ "Float",
18319
+ "Long",
18320
+ "Number",
18321
+ "String"
18322
+ ].forEach(
18323
+ (type) => addToItems(lookupByFullName(state, `Toybox.Lang.${type}`))
18324
+ );
18287
18325
  return;
18288
18326
  }
18289
18327
  const res = checkOne(state, module2, decls, property);
@@ -19318,6 +19356,7 @@ var init_api = (0, import_chunk_ABYVSU2C.__esm)({
19318
19356
  init_types();
19319
19357
  (0, import_chunk_SG7ODKRM.init_util)();
19320
19358
  (0, import_chunk_MBTLUWXR.init_ast)();
19359
+ init_data_flow();
19321
19360
  init_visitor();
19322
19361
  }
19323
19362
  });
@@ -22612,6 +22651,7 @@ function sizeBasedPRE2(func, context) {
22612
22651
  case 24:
22613
22652
  return BigInt(bc.arg) << 8n | BigInt(bc.op);
22614
22653
  case 1:
22654
+ case 74:
22615
22655
  if (incSp != null) {
22616
22656
  incSp = false;
22617
22657
  }
@@ -22674,7 +22714,7 @@ function sizeBasedPRE2(func, context) {
22674
22714
  }
22675
22715
  });
22676
22716
  });
22677
- let nextSlot = func.argc + (incSp?.arg ?? 0);
22717
+ let nextSlot = func.argc + (incSp?.op === 1 ? incSp.arg : incSp?.arg.incsp ?? 0);
22678
22718
  const bytecode = (op, arg) => {
22679
22719
  const bc = { op, arg, size: opcodeSize(op), offset: context.nextOffset++ };
22680
22720
  if (arg == null)
@@ -22759,7 +22799,11 @@ function sizeBasedPRE2(func, context) {
22759
22799
  }
22760
22800
  });
22761
22801
  if (incSp) {
22762
- incSp.arg += insertionBlocks.size;
22802
+ if (incSp.op === 1) {
22803
+ incSp.arg += insertionBlocks.size;
22804
+ } else {
22805
+ incSp.arg.incsp += insertionBlocks.size;
22806
+ }
22763
22807
  } else {
22764
22808
  const startBlock = func.blocks.get(func.offset);
22765
22809
  const index = startBlock.bytecodes.length === 0 || startBlock.bytecodes[0].op !== 53 ? 0 : 1;
@@ -27522,7 +27566,11 @@ async function default_jungle() {
27522
27566
  assign(id, [qname(base)]);
27523
27567
  }
27524
27568
  rassign(`${id}.resourcePath`, [literal(rez)], base);
27525
- rassign(`${id}.personality`, [literal(rez)], base);
27569
+ rassign(
27570
+ `${id}.personality`,
27571
+ [literal(`${connectiq}/Devices/${id}`), literal(rez)],
27572
+ base
27573
+ );
27526
27574
  languages.forEach(
27527
27575
  (l) => rassign(`${id}.lang.${l.id}`, [literal(`${rez}-${l.id}`)], base)
27528
27576
  );
@@ -28904,17 +28952,9 @@ async function fileInfoFromConfig(workspace, output, buildConfig, extraExcludes,
28904
28952
  buildConfig.sourcePath,
28905
28953
  ".mc"
28906
28954
  );
28907
- let personality = buildConfig.personality;
28908
- if (buildConfig.products) {
28909
- personality = (personality ?? []).concat(
28910
- buildConfig.products.map(
28911
- (product) => `${connectiq}/Devices/${product}/personality.mss`
28912
- )
28913
- );
28914
- }
28915
28955
  const { files: personalityFiles } = await filesFromPaths(
28916
28956
  workspace,
28917
- personality,
28957
+ buildConfig.personality,
28918
28958
  ".mss"
28919
28959
  );
28920
28960
  const excludeAnnotations = Object.assign(
@@ -28998,7 +29038,13 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
28998
29038
  ).then(({ fnMap: fnMap2 }) => fnMap2);
28999
29039
  }).flat()
29000
29040
  );
29001
- 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
+ );
29002
29048
  }
29003
29049
  const actualOptimizedFiles = (await (0, import_chunk_SG7ODKRM.globa)(path4.join(output, "**", "*.mc"), { mark: true })).filter((file) => !file.endsWith("/")).sort();
29004
29050
  const {
@@ -29022,7 +29068,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
29022
29068
  const opt_time = await (0, import_chunk_SG7ODKRM.first_modified)(
29023
29069
  Object.values(fnMap).map((v) => v.output)
29024
29070
  );
29025
- if (source_time < opt_time && 1713229195228 < opt_time) {
29071
+ if (source_time < opt_time && 1713624391103 < opt_time) {
29026
29072
  return {
29027
29073
  hasTests,
29028
29074
  diagnostics: prevDiagnostics,
@@ -29061,7 +29107,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
29061
29107
  hasTests: hasTests2,
29062
29108
  diagnostics,
29063
29109
  sdkVersion,
29064
- optimizerVersion: "1.1.55",
29110
+ optimizerVersion: "1.1.57",
29065
29111
  ...Object.fromEntries(
29066
29112
  configOptionsToCheck.map((option) => [option, config[option]])
29067
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_GWRGLJLB.StateNodeAttributes,
22
- buildOptimizedProject: () => import_chunk_GWRGLJLB.buildOptimizedProject,
21
+ StateNodeAttributes: () => import_chunk_PUEG4GNZ.StateNodeAttributes,
22
+ buildOptimizedProject: () => import_chunk_PUEG4GNZ.buildOptimizedProject,
23
23
  copyRecursiveAsNeeded: () => import_chunk_SG7ODKRM.copyRecursiveAsNeeded,
24
- defaultConfig: () => import_chunk_GWRGLJLB.defaultConfig,
25
- display: () => import_chunk_GWRGLJLB.display,
26
- generateOneConfig: () => import_chunk_GWRGLJLB.generateOneConfig,
27
- generateOptimizedProject: () => import_chunk_GWRGLJLB.generateOptimizedProject,
28
- getConfig: () => import_chunk_GWRGLJLB.getConfig,
29
- getProjectAnalysis: () => import_chunk_GWRGLJLB.getProjectAnalysis,
30
- get_jungle: () => import_chunk_GWRGLJLB.get_jungle,
31
- isErrorWithLocation: () => import_chunk_GWRGLJLB.isErrorWithLocation,
32
- launchSimulator: () => import_chunk_GWRGLJLB.launchSimulator,
33
- manifestProducts: () => import_chunk_GWRGLJLB.manifestProducts,
34
- mctree: () => import_chunk_GWRGLJLB.mctree,
35
- simulateProgram: () => import_chunk_GWRGLJLB.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_GWRGLJLB = require("./chunk-GWRGLJLB.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_GWRGLJLB.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_GWRGLJLB.SectionKinds,
22
- appSupport: () => import_chunk_GWRGLJLB.appSupport,
23
- connectiq: () => import_chunk_GWRGLJLB.connectiq,
24
- getDeviceInfo: () => import_chunk_GWRGLJLB.getDeviceInfo,
25
- getFunctionDocumentation: () => import_chunk_GWRGLJLB.getFunctionDocumentation,
26
- getLanguages: () => import_chunk_GWRGLJLB.getLanguages,
27
- getSdkPath: () => import_chunk_GWRGLJLB.getSdkPath,
28
- isWin: () => import_chunk_GWRGLJLB.isWin,
29
- optimizeProgram: () => import_chunk_GWRGLJLB.optimizeProgram,
30
- readPrg: () => import_chunk_GWRGLJLB.readPrg,
31
- readPrgWithOffsets: () => import_chunk_GWRGLJLB.readPrgWithOffsets,
32
- xmlUtil: () => import_chunk_GWRGLJLB.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_GWRGLJLB = require("./chunk-GWRGLJLB.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_GWRGLJLB.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_GWRGLJLB = require("./chunk-GWRGLJLB.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_GWRGLJLB.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_GWRGLJLB.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.55",
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",