@markw65/monkeyc-optimizer 1.0.38 → 1.0.40
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 +53 -0
- package/build/api.cjs +645 -186
- package/build/optimizer.cjs +476 -6950
- package/build/sdk-util.cjs +212 -7146
- package/build/src/api.d.ts +13 -4
- package/build/src/inliner.d.ts +2 -2
- package/build/src/jungles.d.ts +5 -1
- package/build/src/launch.d.ts +2 -2
- package/build/src/manifest.d.ts +2 -63
- package/build/src/mc-rewrite.d.ts +4 -2
- package/build/src/optimizer-types.d.ts +16 -7
- package/build/src/optimizer.d.ts +16 -3
- package/build/src/projects.d.ts +2 -0
- package/build/src/resources.d.ts +5 -0
- package/build/src/sdk-util.d.ts +5 -1
- package/build/src/visitor.d.ts +1 -0
- package/build/src/xml-util.d.ts +140 -0
- package/build/util.cjs +1491 -1565
- package/package.json +10 -11
package/README.md
CHANGED
|
@@ -432,3 +432,56 @@ Bug Fixes
|
|
|
432
432
|
- Allow inlining the argument to an if-statement, with the same constraints as inlining in assignment context
|
|
433
433
|
- Expand `assignment`, `declaration` and `if` contexts to include (recursively) the left operand of any binary operator, the operand of any unary operator, the `test` operand of any conditional operator or the `object` of a member-expression. So now it will inline `inlinableFunction` in:
|
|
434
434
|
- `var x = !((inlinableFunction() + 4) == 42 ? foo() : bar());`
|
|
435
|
+
|
|
436
|
+
### 1.0.39
|
|
437
|
+
|
|
438
|
+
- Improvements
|
|
439
|
+
|
|
440
|
+
- Upgrade to [@markw65/prettier-plugin-monkeyc@1.0.36](https://github.com/markw65/prettier-plugin-monkeyc#1036).
|
|
441
|
+
- Upgrade all other npm dependencies to the latest versions, and fix a few issues that showed up as a result.
|
|
442
|
+
- Report missing symbols after optimization, rather than before. Results in fewer false negatives. eg Given `if (foo has :bar) { return foo.bar; }`, where the compiler knows that foo.bar doesn't exist, the whole thing will be optimized away, rather than generate a diagnostic that foo.bar doesn't exist.
|
|
443
|
+
- Stop reporting `X has :Y` as a missing symbol, even when we know that X does not have Y.
|
|
444
|
+
- Implement our own xml parser. This was prompted by wanting to tag the parsed xml with source locations.
|
|
445
|
+
- Since we were already parsing all the resource files to look for `<build>` instructions, additionally identify all the symbols that will get generated. This allows us to detect references to undefined resources, and also makes `Goto Definition` just work for things like `Rez.Strings.foo`.
|
|
446
|
+
|
|
447
|
+
- Optimizations
|
|
448
|
+
|
|
449
|
+
- Optimize has expressions that are guaranteed to be false.
|
|
450
|
+
|
|
451
|
+
- Bugs
|
|
452
|
+
|
|
453
|
+
- Fix an issue with launchSimulator, which caused it to sometimes not bring the simulator window into focus when it should have done.
|
|
454
|
+
- Fix an issue that caused simulateProgram to fail on windows.
|
|
455
|
+
- Fix a bug looking up self when not part of a member-expression (this didn't happen until I added optimizations for "has" expressions, in this release)
|
|
456
|
+
- Add barrel sources to project analysis. This didn't affect optimization, which already included the sources, but did affect `Goto Definition` etc in the vscode extension, and caused lots of diagnostics about missing symbols.
|
|
457
|
+
- ciq-3.2.0 and later devices don't declare "widget" as a supported type, but the compiler does allow you to compile widget projects for them anyway. Fix that when determining the allowable devices in the manifest.
|
|
458
|
+
- Don't drop the `x` in `var x = new X();` even if `x` isn't used, because the monkeyc compiler doesn't generate any code for a bare `new X();`.
|
|
459
|
+
|
|
460
|
+
- Tests
|
|
461
|
+
- Better error reporting in the driver script.
|
|
462
|
+
- Handle relative jungle paths correctly.
|
|
463
|
+
- Add more tests for strange monkeyc behavior, pre and post compiler2
|
|
464
|
+
- Better identification of compilers that support compiler2
|
|
465
|
+
|
|
466
|
+
### 1.0.40
|
|
467
|
+
|
|
468
|
+
- Improvements
|
|
469
|
+
|
|
470
|
+
- Upgrade to [@markw65/prettier-plugin-monkeyc@1.0.37](https://github.com/markw65/prettier-plugin-monkeyc#1037).
|
|
471
|
+
- Report locations of errors in manifest.xml (rather than just reporting an error somewhere in the file)
|
|
472
|
+
- Minor improvements to Goto References etc
|
|
473
|
+
- Keep a cache of parsed resource files, and update errors/warnings relating to resources as you type, rather than when the resource file is saved.
|
|
474
|
+
- Add diagnostics for known issues in sdk-4.1.6
|
|
475
|
+
- Add diagnostics for changes in behavior between compiler1 and compiler2
|
|
476
|
+
- Fix lookups to be aware of compiler1 vs compiler2. Add an option to always use compiler1 rules, or always use compiler2 rules.
|
|
477
|
+
- Fix lookups in static methods, under a new option that defaults to true.
|
|
478
|
+
|
|
479
|
+
- Testing
|
|
480
|
+
|
|
481
|
+
- Fix pragma checker to sort the diagnostics properly
|
|
482
|
+
- Allow specifying which test to run on the command line
|
|
483
|
+
- Update all tests to work with 4.1.6 and 4.1.7
|
|
484
|
+
|
|
485
|
+
- Bug fixes
|
|
486
|
+
- Fix optimization of `and` and `or` (alternate names for `&&` and `||`)
|
|
487
|
+
- Fix a bug that could sometimes prevent the `has` optimization from kicking in.
|