Align numeric types API: isZero/isNeg → instance methods, add copy(), fix HL opcode tests#12857
Merged
Simn merged 2 commits intohaxe-numericfrom Mar 21, 2026
Merged
Align numeric types API: isZero/isNeg → instance methods, add copy(), fix HL opcode tests#12857Simn merged 2 commits intohaxe-numericfrom
Simn merged 2 commits intohaxe-numericfrom
Conversation
…align API order, fix HL opcode tests Co-authored-by: Simn <634365+Simn@users.noreply.github.com> Agent-Logs-Url: https://github.com/HaxeFoundation/haxe/sessions/330c2464-c0e6-4f48-b8e5-899473797b40
Copilot
AI
changed the title
[WIP] Unify numeric types API across all targets
Align numeric types API: isZero/isNeg → instance methods, add copy(), fix HL opcode tests
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
isZeroandisNegwere static functions on Int32/UInt32/Int64/UInt64, inconsistent with the rest of the API. Int32/UInt32 were missingcopy()and had different function ordering than Int64/UInt64.Changes
isZero/isNeg→ instance methods on all four types, updated all callers (Int64Helper, tests, Issue12415)Added
copy()to Int32 and UInt32 for consistency with Int64/UInt64Aligned function order in Int32/UInt32 to match Int64/UInt64:
copy → fromInt → toInt → compare → ucompare → isNeg/isZero → parseString → fromFloat → toFloat → implicit casts → operatorsFixed 5 HL opcode test expectations — register numbering changed after the cleanup commit (0e9ebb0) simplified increment/decrement and conversion patterns
Fixed UInt32.compare docstring — incorrectly said "signed mode" despite delegating to
ucompare⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.