Add loop expressions.
This commit is contained in:
@@ -10,6 +10,7 @@ Bug fixes
|
||||
* `Engine::parse_json` now returns an error on unquoted keys to be consistent with JSON specifications.
|
||||
* `import` statements inside `eval` no longer cause errors in subsequent code.
|
||||
* Functions marked `global` in `import`ed modules with no alias names now work properly.
|
||||
* Incorrect loop optimizations that are too aggressive (e.g. unrolling a `do { ... } until true` with a `break` statement inside) and cause crashes are removed.
|
||||
|
||||
Speed Improvements
|
||||
------------------
|
||||
@@ -19,6 +20,12 @@ Speed Improvements
|
||||
New features
|
||||
------------
|
||||
|
||||
### Loop expressions
|
||||
|
||||
* Loops (such as `loop`, `do`, `while` and `for`) can now act as _expressions_, with the `break` statement returning an optional value.
|
||||
* Normal loops return `()` as the value.
|
||||
* Loop expressions can be enabled/disabled via `Engine::set_allow_loop_expressions`
|
||||
|
||||
### Stable hashing
|
||||
|
||||
* It is now possible to specify a fixed _seed_ for use with the `ahash` hasher, via an environment variable, in order to force stable (i.e. deterministic) hashes for function signatures.
|
||||
|
Reference in New Issue
Block a user