@markw65/monkeyc-optimizer 1.1.21 → 1.1.23
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 +18 -1
- package/build/api.cjs +33 -33
- package/build/{chunk-ZDTW2QRS.cjs → chunk-27ZJJM2Y.cjs} +1142 -757
- package/build/optimizer.cjs +17 -17
- package/build/sdk-util.cjs +14 -14
- package/build/src/api.d.ts +1 -1
- package/build/src/optimizer-types.d.ts +1 -0
- package/build/src/readprg/array-init.d.ts +2 -1
- package/build/src/readprg/bytecode.d.ts +2 -0
- package/build/src/readprg/cflow.d.ts +8 -1
- package/build/src/readprg/interp.d.ts +7 -6
- package/build/src/readprg/locals.d.ts +3 -2
- package/build/src/readprg.d.ts +4 -3
- package/build/src/type-flow/type-flow-util.d.ts +1 -1
- package/build/src/worker-task.d.ts +1 -0
- package/build/worker-thread.cjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -794,7 +794,7 @@ Bug Fixes
|
|
|
794
794
|
- Optimizations
|
|
795
795
|
- Improve dce in the post build optimizer a little, by computing which locals are live out of each block.
|
|
796
796
|
|
|
797
|
-
### 1.1.
|
|
797
|
+
### 1.1.21
|
|
798
798
|
|
|
799
799
|
- Bug fixes
|
|
800
800
|
|
|
@@ -811,3 +811,20 @@ Bug Fixes
|
|
|
811
811
|
- Keep better track of exceptional edges in dce, allowing it to be more aggressive.
|
|
812
812
|
- Add a (very simple) bytecode interpreter which keeps track of the values in locals, and on the stack. This allows us to opportunistically replace constants (typically 5+ bytes) with a 2 byte load from a register, or from a stack location. This (together with dce) will form the infrastructure for a future minimize-locals pass.
|
|
813
813
|
- when replacing constants with locals/stack accesses, look for uses of `~`. Eg if the value `2` is in the local `x`, and we need to produce the value `-3`, we can use `~x` (costing 3 bytes, instead of 5).
|
|
814
|
+
|
|
815
|
+
### 1.1.22
|
|
816
|
+
|
|
817
|
+
- Bug fixes
|
|
818
|
+
|
|
819
|
+
- [Fixes a bug in Single Use Copy Prop](https://github.com/markw65/prettier-extension-monkeyc/issues/8)
|
|
820
|
+
|
|
821
|
+
- Post Build Optimizations
|
|
822
|
+
- Updates the array-init optimizations to include `ByteArray`s
|
|
823
|
+
- Integrate the array-init optimization with the new interp pass, so that changes made by interp don't interfere with array-init
|
|
824
|
+
- Handle more bytecodes in interp
|
|
825
|
+
- If an array is initialized to its default value, drop the initializers
|
|
826
|
+
- Add an option to [remove argc bytecodes](https://github.com/markw65/monkeyc-optimizer/wiki/Post-Build-Optimizer#remove-argc)
|
|
827
|
+
|
|
828
|
+
### 1.1.23
|
|
829
|
+
|
|
830
|
+
No functional change, just fixes a typo that broke the typescript exports.
|
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: () =>
|
|
22
|
-
collectNamespaces: () =>
|
|
23
|
-
createDocumentationMap: () =>
|
|
24
|
-
diagnostic: () =>
|
|
25
|
-
diagnosticHelper: () =>
|
|
26
|
-
findNamesInScope: () =>
|
|
27
|
-
findUsingForNode: () =>
|
|
28
|
-
formatAst: () =>
|
|
29
|
-
formatAstLongLines: () =>
|
|
30
|
-
getApiFunctionInfo: () =>
|
|
31
|
-
getApiMapping: () =>
|
|
32
|
-
getSuperClasses: () =>
|
|
33
|
-
hasProperty: () =>
|
|
34
|
-
isClassVariable: () =>
|
|
35
|
-
isLocal: () =>
|
|
36
|
-
isLookupCandidate: () =>
|
|
37
|
-
isStateNode: () =>
|
|
38
|
-
lookupByFullName: () =>
|
|
39
|
-
lookupNext: () =>
|
|
40
|
-
lookupResultContains: () =>
|
|
41
|
-
lookupWithType: () =>
|
|
42
|
-
makeToyboxLink: () =>
|
|
43
|
-
mapVarDeclsByType: () =>
|
|
44
|
-
markInvokeClassMethod: () =>
|
|
45
|
-
parseSdkVersion: () =>
|
|
46
|
-
sameLookupResult: () =>
|
|
47
|
-
traverseAst: () =>
|
|
48
|
-
variableDeclarationName: () =>
|
|
49
|
-
visitReferences: () =>
|
|
50
|
-
visit_resources: () =>
|
|
51
|
-
visitorNode: () =>
|
|
21
|
+
checkCompilerVersion: () => import_chunk_27ZJJM2Y.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_27ZJJM2Y.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_27ZJJM2Y.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_27ZJJM2Y.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_27ZJJM2Y.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_27ZJJM2Y.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_27ZJJM2Y.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_27ZJJM2Y.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_27ZJJM2Y.formatAstLongLines,
|
|
30
|
+
getApiFunctionInfo: () => import_chunk_27ZJJM2Y.getApiFunctionInfo,
|
|
31
|
+
getApiMapping: () => import_chunk_27ZJJM2Y.getApiMapping,
|
|
32
|
+
getSuperClasses: () => import_chunk_27ZJJM2Y.getSuperClasses,
|
|
33
|
+
hasProperty: () => import_chunk_27ZJJM2Y.hasProperty,
|
|
34
|
+
isClassVariable: () => import_chunk_27ZJJM2Y.isClassVariable,
|
|
35
|
+
isLocal: () => import_chunk_27ZJJM2Y.isLocal,
|
|
36
|
+
isLookupCandidate: () => import_chunk_27ZJJM2Y.isLookupCandidate,
|
|
37
|
+
isStateNode: () => import_chunk_27ZJJM2Y.isStateNode,
|
|
38
|
+
lookupByFullName: () => import_chunk_27ZJJM2Y.lookupByFullName,
|
|
39
|
+
lookupNext: () => import_chunk_27ZJJM2Y.lookupNext,
|
|
40
|
+
lookupResultContains: () => import_chunk_27ZJJM2Y.lookupResultContains,
|
|
41
|
+
lookupWithType: () => import_chunk_27ZJJM2Y.lookupWithType,
|
|
42
|
+
makeToyboxLink: () => import_chunk_27ZJJM2Y.makeToyboxLink,
|
|
43
|
+
mapVarDeclsByType: () => import_chunk_27ZJJM2Y.mapVarDeclsByType,
|
|
44
|
+
markInvokeClassMethod: () => import_chunk_27ZJJM2Y.markInvokeClassMethod,
|
|
45
|
+
parseSdkVersion: () => import_chunk_27ZJJM2Y.parseSdkVersion,
|
|
46
|
+
sameLookupResult: () => import_chunk_27ZJJM2Y.sameLookupResult,
|
|
47
|
+
traverseAst: () => import_chunk_27ZJJM2Y.traverseAst,
|
|
48
|
+
variableDeclarationName: () => import_chunk_27ZJJM2Y.variableDeclarationName,
|
|
49
|
+
visitReferences: () => import_chunk_27ZJJM2Y.visitReferences,
|
|
50
|
+
visit_resources: () => import_chunk_27ZJJM2Y.visit_resources,
|
|
51
|
+
visitorNode: () => import_chunk_27ZJJM2Y.visitorNode
|
|
52
52
|
});
|
|
53
53
|
module.exports = __toCommonJS(api_exports);
|
|
54
|
-
var
|
|
54
|
+
var import_chunk_27ZJJM2Y = require("./chunk-27ZJJM2Y.cjs");
|
|
55
55
|
var import_chunk_HHQDDCTP = require("./chunk-HHQDDCTP.cjs");
|
|
56
|
-
(0,
|
|
56
|
+
(0, import_chunk_27ZJJM2Y.init_api)();
|
|
57
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
58
58
|
0 && (module.exports = {
|
|
59
59
|
checkCompilerVersion,
|