@markw65/monkeyc-optimizer 1.1.18 → 1.1.19

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/README.md CHANGED
@@ -771,3 +771,16 @@ Bug Fixes
771
771
  ### 1.1.18
772
772
 
773
773
  - add missing `worker-thread.cjs` and `worker-pool.cjs` files to the package.
774
+
775
+ ### 1.1.19
776
+
777
+ - Bug fixes
778
+
779
+ - Fix "Minimize Modules" in background/glance scopes
780
+ - due to a [bug in the monkeyc compiler](https://forums.garmin.com/developer/connect-iq/i/bug-reports/import-rez-or-using-rez-breaks-background-resources), adding "using Rez;" when a resource may be loaded by a background or glance app causes it to crash. This release won't import Rez into anything marked :background or :glance. This fixes [prettier-extension-monkeyc#7](https://github.com/markw65/prettier-extension-monkeyc/issues/7)
781
+ - Update background and glance offsets in the program header. I had assumed these offsets were obtained from the symbols, which already get updated, but it turns out they're stored as offsets in the header. This didn't break anything, but it did mean that the background and glance code sizes were unchanged, even though the post build optimizer had in fact made them smaller.
782
+
783
+ - Optimizations
784
+ - better optimization for arrays whose elements are all initialized to the same value (eg `[42, 42, 42, 42]`)
785
+ - more efficient tests for symbols in case statements (ie `case: :foo`)
786
+ - parallelize the post build optimizer when exporting a project
package/build/api.cjs CHANGED
@@ -18,42 +18,42 @@ 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_YCLY27QH.checkCompilerVersion,
22
- collectNamespaces: () => import_chunk_YCLY27QH.collectNamespaces,
23
- createDocumentationMap: () => import_chunk_YCLY27QH.createDocumentationMap,
24
- diagnostic: () => import_chunk_YCLY27QH.diagnostic,
25
- diagnosticHelper: () => import_chunk_YCLY27QH.diagnosticHelper,
26
- findNamesInScope: () => import_chunk_YCLY27QH.findNamesInScope,
27
- findUsingForNode: () => import_chunk_YCLY27QH.findUsingForNode,
28
- formatAst: () => import_chunk_YCLY27QH.formatAst,
29
- formatAstLongLines: () => import_chunk_YCLY27QH.formatAstLongLines,
30
- getApiFunctionInfo: () => import_chunk_YCLY27QH.getApiFunctionInfo,
31
- getApiMapping: () => import_chunk_YCLY27QH.getApiMapping,
32
- getSuperClasses: () => import_chunk_YCLY27QH.getSuperClasses,
33
- hasProperty: () => import_chunk_YCLY27QH.hasProperty,
34
- isClassVariable: () => import_chunk_YCLY27QH.isClassVariable,
35
- isLocal: () => import_chunk_YCLY27QH.isLocal,
36
- isLookupCandidate: () => import_chunk_YCLY27QH.isLookupCandidate,
37
- isStateNode: () => import_chunk_YCLY27QH.isStateNode,
38
- lookupByFullName: () => import_chunk_YCLY27QH.lookupByFullName,
39
- lookupNext: () => import_chunk_YCLY27QH.lookupNext,
40
- lookupResultContains: () => import_chunk_YCLY27QH.lookupResultContains,
41
- lookupWithType: () => import_chunk_YCLY27QH.lookupWithType,
42
- makeToyboxLink: () => import_chunk_YCLY27QH.makeToyboxLink,
43
- mapVarDeclsByType: () => import_chunk_YCLY27QH.mapVarDeclsByType,
44
- markInvokeClassMethod: () => import_chunk_YCLY27QH.markInvokeClassMethod,
45
- parseSdkVersion: () => import_chunk_YCLY27QH.parseSdkVersion,
46
- sameLookupResult: () => import_chunk_YCLY27QH.sameLookupResult,
47
- traverseAst: () => import_chunk_YCLY27QH.traverseAst,
48
- variableDeclarationName: () => import_chunk_YCLY27QH.variableDeclarationName,
49
- visitReferences: () => import_chunk_YCLY27QH.visitReferences,
50
- visit_resources: () => import_chunk_YCLY27QH.visit_resources,
51
- visitorNode: () => import_chunk_YCLY27QH.visitorNode
21
+ checkCompilerVersion: () => import_chunk_O5LFMOIG.checkCompilerVersion,
22
+ collectNamespaces: () => import_chunk_O5LFMOIG.collectNamespaces,
23
+ createDocumentationMap: () => import_chunk_O5LFMOIG.createDocumentationMap,
24
+ diagnostic: () => import_chunk_O5LFMOIG.diagnostic,
25
+ diagnosticHelper: () => import_chunk_O5LFMOIG.diagnosticHelper,
26
+ findNamesInScope: () => import_chunk_O5LFMOIG.findNamesInScope,
27
+ findUsingForNode: () => import_chunk_O5LFMOIG.findUsingForNode,
28
+ formatAst: () => import_chunk_O5LFMOIG.formatAst,
29
+ formatAstLongLines: () => import_chunk_O5LFMOIG.formatAstLongLines,
30
+ getApiFunctionInfo: () => import_chunk_O5LFMOIG.getApiFunctionInfo,
31
+ getApiMapping: () => import_chunk_O5LFMOIG.getApiMapping,
32
+ getSuperClasses: () => import_chunk_O5LFMOIG.getSuperClasses,
33
+ hasProperty: () => import_chunk_O5LFMOIG.hasProperty,
34
+ isClassVariable: () => import_chunk_O5LFMOIG.isClassVariable,
35
+ isLocal: () => import_chunk_O5LFMOIG.isLocal,
36
+ isLookupCandidate: () => import_chunk_O5LFMOIG.isLookupCandidate,
37
+ isStateNode: () => import_chunk_O5LFMOIG.isStateNode,
38
+ lookupByFullName: () => import_chunk_O5LFMOIG.lookupByFullName,
39
+ lookupNext: () => import_chunk_O5LFMOIG.lookupNext,
40
+ lookupResultContains: () => import_chunk_O5LFMOIG.lookupResultContains,
41
+ lookupWithType: () => import_chunk_O5LFMOIG.lookupWithType,
42
+ makeToyboxLink: () => import_chunk_O5LFMOIG.makeToyboxLink,
43
+ mapVarDeclsByType: () => import_chunk_O5LFMOIG.mapVarDeclsByType,
44
+ markInvokeClassMethod: () => import_chunk_O5LFMOIG.markInvokeClassMethod,
45
+ parseSdkVersion: () => import_chunk_O5LFMOIG.parseSdkVersion,
46
+ sameLookupResult: () => import_chunk_O5LFMOIG.sameLookupResult,
47
+ traverseAst: () => import_chunk_O5LFMOIG.traverseAst,
48
+ variableDeclarationName: () => import_chunk_O5LFMOIG.variableDeclarationName,
49
+ visitReferences: () => import_chunk_O5LFMOIG.visitReferences,
50
+ visit_resources: () => import_chunk_O5LFMOIG.visit_resources,
51
+ visitorNode: () => import_chunk_O5LFMOIG.visitorNode
52
52
  });
53
53
  module.exports = __toCommonJS(api_exports);
54
- var import_chunk_YCLY27QH = require("./chunk-YCLY27QH.cjs");
54
+ var import_chunk_O5LFMOIG = require("./chunk-O5LFMOIG.cjs");
55
55
  var import_chunk_IAUHYWVN = require("./chunk-IAUHYWVN.cjs");
56
- (0, import_chunk_YCLY27QH.init_api)();
56
+ (0, import_chunk_O5LFMOIG.init_api)();
57
57
  // Annotate the CommonJS export names for ESM import in node:
58
58
  0 && (module.exports = {
59
59
  checkCompilerVersion,