@markw65/monkeyc-optimizer 1.1.14 → 1.1.16
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 +32 -0
- package/build/api.cjs +86 -14496
- package/build/chunk-IAUHYWVN.cjs +5717 -0
- package/build/chunk-K32K3YD4.cjs +145 -0
- package/build/chunk-TQHOJQYY.cjs +4660 -0
- package/build/chunk-VVIZ2ADY.cjs +23697 -0
- package/build/chunk-WIPYYCBN.cjs +54 -0
- package/build/optimizer.cjs +56 -16995
- package/build/sdk-util.cjs +49 -10567
- package/build/src/api.d.ts +1 -1
- package/build/src/logger.d.ts +2 -0
- package/build/src/optimizer-types.d.ts +1 -0
- package/build/src/optimizer.d.ts +2 -2
- package/build/src/readprg/array-init.d.ts +2 -0
- package/build/src/readprg/bytecode.d.ts +14 -0
- package/build/src/readprg/dce.d.ts +2 -2
- package/build/src/readprg/emit.d.ts +2 -0
- package/build/src/readprg/exceptions.d.ts +2 -1
- package/build/src/readprg/opcodes.d.ts +3 -0
- package/build/src/readprg/sharing.d.ts +2 -0
- package/build/src/type-flow/dead-store.d.ts +1 -1
- package/build/src/util.d.ts +2 -2
- package/build/util.cjs +66 -8006
- package/package.json +9 -10
package/README.md
CHANGED
|
@@ -726,3 +726,35 @@ Bug Fixes
|
|
|
726
726
|
- Remove stores to dead locals
|
|
727
727
|
- Remove side-effect free code that produces an unused result
|
|
728
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).
|
|
729
|
+
|
|
730
|
+
### 1.1.15
|
|
731
|
+
|
|
732
|
+
- Post build optimizer improvements
|
|
733
|
+
|
|
734
|
+
- Simplify LogicalExpressions. This generally saves 3 bytes per `&&` or `||`, and also makes them faster
|
|
735
|
+
- Adds a simple code sharing pass. If multiple code paths converge to the same point (or leave the function via return) and they end with the same sequence of bytecode, they're merged into one.
|
|
736
|
+
- Flips branch-true to branch-false or vice versa if the fall through block has multiple predecessors, and the target block has just one. This often leads to better control flow, reducing the number of "goto" bytecodes required.
|
|
737
|
+
|
|
738
|
+
- Source to Source Optimizer improvements
|
|
739
|
+
- Adds an `Iterate Optimizer` option that causes the optimizer to keep re-running until it finds nothing to remove. Defaults to false.
|
|
740
|
+
|
|
741
|
+
### 1.1.16
|
|
742
|
+
|
|
743
|
+
- Project infrastructure
|
|
744
|
+
|
|
745
|
+
- Update to [@markw65/prettier-plugin-monkeyc@1.0.46](https://github.com/markw65/prettier-plugin-monkeyc#1046)
|
|
746
|
+
- no functional change.
|
|
747
|
+
- switch from webpack to esbuild, for faster builds, and better packaging.
|
|
748
|
+
- mark the package as `commonjs` so that prettier-extension-monkeyc can set `moduleResolution: nodenext`
|
|
749
|
+
|
|
750
|
+
- Optimizations
|
|
751
|
+
- Make local dce smarter
|
|
752
|
+
- all locals are dead at function exits
|
|
753
|
+
- Make block sharing smarter
|
|
754
|
+
- allow partial blocks to be merged
|
|
755
|
+
- better heuristics for when its advantageous to merge small blocks
|
|
756
|
+
- Better control flow optimizations
|
|
757
|
+
- Merge "linear" blocks, where the first has a single successor, and the second has a single predecessor
|
|
758
|
+
- Avoid `goto` when the target is fewer than 3 bytes
|
|
759
|
+
- Optimize array initialization by using a loop
|
|
760
|
+
- Identify arrays that are unused, and make it possible for dce to clean up their initializers.
|