fix(memory-reference-resolver): preserve float64 metadata bounds by jinchuntan · Pull Request #1091 · 8f4e/8f4e · GitHub
Skip to content

fix(memory-reference-resolver): preserve float64 metadata bounds - #1091

Open
jinchuntan wants to merge 1 commit into
8f4e:mainfrom
jinchuntan:fix/float64-metadata-bounds
Open

jinchuntan wants to merge 1 commit into
8f4e:mainfrom
jinchuntan:fix/float64-metadata-bounds

Conversation

@jinchuntan

@jinchuntan jinchuntan commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1064.

min(value) and max(value) dropped the float64 type. That caused type mismatches or converted finite bounds to infinity. The resolver now preserves the type for memory and pointer queries.

Added tests for local and intermodule queries, pointers and arithmetic using the bounds. Pointer to pointer queries keep integer bounds.

Tested on Node 24.16.0:

  • npx nx run-many --targets=test,typecheck --projects=@8f4e/memory-reference-resolver,@8f4e/compiler --parallel=1 --output-style=static - 373 tests and both type checks passed.

Biome and the repository pre commit checks also passed.

Keep float64 type information on min/max results for declarations and pointer targets. Cover finite bounds and arithmetic while preserving integer pointer-slot bounds.

Fixes 8f4e#1064

Assisted-by: Codex
@irimias57 irimias57 added contributor compiler Compiler, tokenizer, codegen, and language-semantics work labels Oct 18, 2026

@irimias57 irimias57 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this, @jinchuntan! Please update this branch from main and regenerate and commit the compiler snapshot with npx nx run @8f4e/compiler:test --update, because main renamed the memory-layout fields from wordAlignedAddress/wordAlignedSize to allocationUnitAddress/allocationUnitCount after this branch was created.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler Compiler, tokenizer, codegen, and language-semantics work contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve float64 typing in min/max metadata queries

2 participants