@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 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.