Skip to content

Interpreter enum map keys, plain nan everywhere, Round half away from zero - #4288

Merged
BaseMax merged 1 commit into
mainfrom
fix-interp
Nov 26, 2026
Merged

BaseMax merged 1 commit into
mainfrom
fix-interp

Conversation

@BaseMax

@BaseMax BaseMax commented Nov 26, 2026

Copy link
Copy Markdown
Member
  • Interpreter: enum values stored through pointers came back as raw words, so HashMap<Color, int> added a new entry on every Put, Vector compared false and printed . Enums now load and store as their backing type; maps, sets and vectors of enums match native.
  • NaN prints as nan on every backend. Native and LLVM printed -nan for a negative NaN; the sign of NaN carries no meaning, and Python, JS and Rust print it plain. -inf is unchanged.
  • math.Round and RoundF32 round halves away from zero, like C and Rust: Round(-2.5) is -3 (was -2), Round(-0.5) is -1, Round(-0.4) is -0. Exact for every double.

enum_map_keys, nan_sign and round_half_away run in general, exec, llvm and js, English and Persian.

@BaseMax
BaseMax requested a review from a team as a code owner November 26, 2026 19:46
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@BaseMax
BaseMax merged commit b63cf50 into main Nov 26, 2026
14 of 16 checks passed
@BaseMax
BaseMax deleted the fix-interp branch November 26, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant