Unroll switch ranges if possible.

This commit is contained in:
Stephen Chung
2022-07-18 08:54:10 +08:00
parent 107193e35f
commit 4b760d1d0f
5 changed files with 132 additions and 60 deletions

View File

@@ -17,6 +17,7 @@ Enhancements
* `switch` cases can now include multiple values separated by `|`.
* `EvalContext::eval_expression_tree_raw` and `Expression::eval_with_context_raw` are added to allow for not rewinding the `Scope` at the end of a statements block.
* A new `range` function variant that takes an exclusive range with a step.
* Ranges in `switch` statements that are small (currently no more than 16 items) are unrolled if possible.
Version 1.8.0