Skip to content

asm: add const literal builder helpers#82

Merged
waywardmonkeys merged 1 commit into
forest-rs:mainfrom
waywardmonkeys:mine/program-builder-const-literals
May 30, 2026
Merged

asm: add const literal builder helpers#82
waywardmonkeys merged 1 commit into
forest-rs:mainfrom
waywardmonkeys:mine/program-builder-const-literals

Conversation

@waywardmonkeys
Copy link
Copy Markdown
Contributor

Add ProgramBuilder::const_str and ProgramBuilder::const_bytes as small convenience wrappers around the existing constant-pool interner.

The helpers keep lowering code from spelling out Const::Str and Const::Bytes directly while preserving the same deduplication behavior. Add coverage that the helpers intern with constant(Const::...) and round-trip through Program.

Add ProgramBuilder::const_str and ProgramBuilder::const_bytes as small convenience wrappers around the existing constant-pool interner.

The helpers keep lowering code from spelling out Const::Str and Const::Bytes directly while preserving the same deduplication behavior. Add coverage that the helpers intern with constant(Const::...) and round-trip through Program.
@waywardmonkeys waywardmonkeys merged commit 0eb6092 into forest-rs:main May 30, 2026
15 checks passed
@waywardmonkeys waywardmonkeys deleted the mine/program-builder-const-literals branch May 30, 2026 11:42
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