Skip to content

feat(analyser): record each native's registry slot 🔢 - #231

Merged
timfennis merged 1 commit into
feat/new-analyserfrom
feat/native-slots
Oct 13, 2026
Merged

timfennis merged 1 commit into
feat/new-analyserfrom
feat/native-slots

Conversation

@timfennis

Copy link
Copy Markdown
Owner

Phase 2, step 1, stacked on #226. Later steps will stack on this branch.

The layout pass in phase 2 will turn native symbols into the VM's global slots, so it needs each native's position in the function registry. That position happened to equal the native's SymbolId, because natives are declared first, but nothing guaranteed it. This makes the mapping explicit.

  • NameResolver records native_slots, from each native symbol to its registry index. Overloads of the same name keep separate slots.
  • Nothing reads it yet, so the field is marked expect(dead_code) outside tests, like the other fields waiting for later passes.

No behaviour change.

🤖 Generated with Claude Code

The resolver records each native symbol's position in the function
registry, which is the global slot the VM gives it. The layout pass
will turn these into global storage instead of relying on natives
being declared first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T14:43:31.948869Z d15a34f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@timfennis
timfennis merged commit 98391ca into feat/new-analyser Oct 13, 2026
1 check passed
@timfennis
timfennis deleted the feat/native-slots branch October 13, 2026 14:44
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