Skip to content

fix(compiler): load UInt32 constants above Int32/MaxValue as raw bits#86

Merged
skydread1 merged 2 commits into
developfrom
fix/85-uint32-constant-emission
Jul 22, 2026
Merged

fix(compiler): load UInt32 constants above Int32/MaxValue as raw bits#86
skydread1 merged 2 commits into
developfrom
fix/85-uint32-constant-emission

Conversation

@skydread1

Copy link
Copy Markdown
Member

Closes #85

load-integer emitted ldc.i4 through a checked int cast, which threw for UInt32 constants above Int32/MaxValue. ldc.i4 is a bit-level load, so the cast is now unchecked-int, matching what csc emits for a uint constant.

  • Regression test pins the compiled constant and its printed value.

…#85)

load-integer emitted ldc.i4 through a checked int cast, which throws
for UInt32 constants above Int32/MaxValue. ldc.i4 is a bit-level load,
so use unchecked-int, matching what csc emits for a uint constant.
@skydread1 skydread1 self-assigned this Jul 22, 2026
@skydread1
skydread1 merged commit b41a0ae into develop Jul 22, 2026
1 check passed
@skydread1
skydread1 deleted the fix/85-uint32-constant-emission branch July 22, 2026 15:46
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.

UInt32 constants above Int32/MaxValue throw Value out of range during emission

1 participant