Repository navigation
MoonCompiler 2.5.4
MoonCompiler 2.5.4: safe case dispatch for unknown values
An enum or integer subrange read from a binary stream can contain a value
outside its declaration. case now routes unmatched stored values to else,
or continues after the statement when there is no else, instead of indexing
beyond a jump table or selecting an incorrect branch. This includes dense,
sparse, grouped and range-based dispatch, with optimizations and runtime range
checks enabled or disabled. The selector is still evaluated once.
The compiler uses the selector's storage width and signedness for dispatch;
it retains jump tables and comparison optimizations. Ordinary assignments keep
their existing type and range checks. Raw stream reads still copy bytes without
validating the destination's declared type.
The same review fixes optimized comparison trees with UInt64 labels above
High(Int64) and explicitly typed, constant and inlined Boolean cases.
ByteBool, WordBool and LongBool labels use Boolean truth consistently.
Full Boolean ranges preserve selector calls, short-circuit evaluation and
checked exceptions instead of discarding their evaluation.
On Windows with Developer Mode, TDirectory.Copy can also create symbolic-link
copies without administrator privileges. Relative targets and dangling file or
directory links retain their meaning; referenced files are not copied instead.
The allocator's optional diagnostic mode correctly validates empty internal
small-block pools awaiting deferred release. These pools have no user-allocation
registry entry; they no longer cause a false heap-corruption report. Physical
block boundaries, ownership and list corruption remain checked. Ordinary
allocation and release paths are unchanged.
Install the complete SDK and rebuild application and third-party PPUs, including
units that contain case statements. MoonORMot 17 is required.
MOONCOMPILER_FULLVERSION is 20504; CompilerVersion remains 2.5.
Download the archive for your platform and follow the Quick Start. SHA256SUMS and GitHub artifact attestations accompany the binaries.