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
Fix apparent nondeterminism in pattern matching compilation.
Fixes#7465
Pattern matching compilation has some code to find if some exit is used at least 3 times. This is done by iterating on a hash table.
However, the exit id is generated based on a global counter, which determines which exit value `n` is generated. This can affect the order in which the hash table is traversed, as the exit id is hashed.
This PR makes the code generation deterministic by adding a tie-breaker if more than id leads to the same exit being used at least 3 times: take the smaller id.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@
39
39
- Prop punning when types don't match results in I/O error: _none_: No such file or directory. https://github.com/rescript-lang/rescript/pull/7533
40
40
- Fix partial application with user-defined function types. https://github.com/rescript-lang/rescript/pull/7548
41
41
- Fix doc comment before variant throwing syntax error. https://github.com/rescript-lang/rescript/pull/7535
42
+
- Fix apparent non-determinism in generated code for pattern matching. https://github.com/rescript-lang/rescript/pull/7557
0 commit comments