@markw65/monkeyc-optimizer 1.1.12 → 1.1.14
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 +15 -0
- package/build/api.cjs +385 -205
- package/build/optimizer.cjs +376 -202
- package/build/sdk-util.cjs +10357 -615
- package/build/src/api.d.ts +1 -1
- package/build/src/logger.d.ts +4 -0
- package/build/src/optimizer-types.d.ts +2 -0
- package/build/src/optimizer.d.ts +5 -0
- package/build/src/readprg/bytecode.d.ts +50 -0
- package/build/src/readprg/data.d.ts +4 -0
- package/build/src/readprg/dce.d.ts +2 -0
- package/build/src/readprg/emit.d.ts +12 -0
- package/build/src/readprg/exceptions.d.ts +9 -0
- package/build/src/readprg/linenum.d.ts +29 -0
- package/build/src/readprg/opcodes.d.ts +260 -0
- package/build/src/readprg/optimize.d.ts +3 -0
- package/build/src/readprg/signer.d.ts +8 -0
- package/build/src/readprg/symbols.d.ts +18 -0
- package/build/src/readprg.d.ts +21 -5
- package/build/src/sdk-util.d.ts +2 -1
- package/build/src/type-flow/minimize-locals.d.ts +2 -0
- package/build/src/type-flow/minimize-modules.d.ts +3 -0
- package/build/src/type-flow/types.d.ts +1 -1
- package/build/src/util.d.ts +1 -0
- package/build/src/xml-util.d.ts +2 -2
- package/build/util.cjs +48 -2
- package/package.json +9 -5
- package/build/src/type-flow/live-range.d.ts +0 -0
package/README.md
CHANGED
|
@@ -711,3 +711,18 @@ Bug Fixes
|
|
|
711
711
|
- Streamline some of the data structures used for `Minimise Locals` and `Single Copy Prop` to reduce memory use, and speed things up a little.
|
|
712
712
|
- Fix a bug that could cause incorrect copy propagation in loops
|
|
713
713
|
- Add support for update assignments in copy propagation (so that `var x = a; x += b; return x` goes to `return a + b`)
|
|
714
|
+
|
|
715
|
+
### 1.1.13
|
|
716
|
+
|
|
717
|
+
- Adds a new [Minimize Modules](https://github.com/markw65/monkeyc-optimizer/wiki/Optimizing-module-imports#minimize-modules) pass, which attempts to ensure that every module referenced by the program is imported.
|
|
718
|
+
|
|
719
|
+
### 1.1.14
|
|
720
|
+
|
|
721
|
+
- Fixes a bug that could crash the optimizer if it tried to inline a function in a non-local variable's initializer.
|
|
722
|
+
- Adds a post build optimizer. This step takes the built .prg file, and optimizes the bytecode. Currently the optimizations are:
|
|
723
|
+
- Remove unreachable code
|
|
724
|
+
- simplify control flow by removing branches to branches
|
|
725
|
+
- Remove empty "finally" handlers (every try/catch gets an empty finally handler)
|
|
726
|
+
- Remove stores to dead locals
|
|
727
|
+
- Remove side-effect free code that produces an unused result
|
|
728
|
+
- Optimize shift left by constant to multiply, since the bytecode is smaller (this seems to be a bug in the garmin tools; they consider shift left and shift right to have an 8-bit argument, but its always zero, and the simulator and devices treat it as a one byte shift instruction, followed by a one byte nop).
|