You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mindcode incorrectly warned about possible loss of precision for integer literals larger than 252-1. The correct maximum safe integer value is 253-1.
Added missing setrule instruction variants (canGameOver, dragMultiplier, ban, unban and unitMineSpeed) for target 8.
Added
Added support for the new setmarker outline instruction.
Added the new @operations property.
Added the target-guard compiler option. When set, generates a guard code which verifies the code is run by a Mindustry version compatible with both the target and builtin-evaluation options.
Added a new compatibility system library. The library provides a function that verifies Mindcode's compatibility with the Mindustry version in which it is run.
Changed
Breaking: the target-optimization compiler option has been replaced with the builtin-evaluation option. Instead of #set target-optimization = specific; use #set builtin-evaluation = full;.
The optimization now processes integer case expression with ranges too if ranges do not overlap other ranges or standalone values.
The optimization now uses bisection search to locate the proper segment when performing Jump Table Compression.
The jump table can be padded not just towards zero, but also towards the maximum value, to remove the need for the range check. Requires builtin-evaluation to be set to full.
The case-optimization-strength option now has a range from 0 to 6. Each additional value significantly increases the number of segment arrangements considered, as well as optimization time. The value of 0 doesn't consider any other configuration except a full jump table, effectively turning Jump Table compression off.
When case-optimization-strength is greater than zero, the optimizer also generates segment configuration for a full bisection search. This may improve case expressions which are too small for a full jump table optimization.
The bodies of when branches are moved into correct places inside the case expression when possible, to avoid unnecessary jumps.
On the experimental optimization level, the bodies of when branches may be duplicated to avoid even more jumps at the cost of additional code size increase. This optimization usually only kicks in with jump table compression for small branch bodies, since for larger code increases, a better performing solution can be achieved by a different segment arrangement.
The performance of the Case Switching optimization (in terms of compilation time) has been significantly improved.
Small improvements to the printExactHex and printExactFast functions in the printing library.
Miscellaneous
Added a legacy attribute to the Blocks metadata.
Added new types of metadata corresponding to all opcode selectors.
Updated the BE version metadata to the latest available BE build.
Added automatic test for verifying that existing instruction opcodes correspond one-to-one to the known metadata.