Skip to content

refactor(sv): pass constant functions explicitly instead of installing them - #2674

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/refactor/analyzer-explicit-state/pass-constant-funcs-explicitly-instead-installing--cbacebc1
Oct 31, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/refactor/analyzer-explicit-state/pass-constant-funcs-explicitly-instead-installing--cbacebc1

Conversation

@tignear

@tignear tignear commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

The constant functions visible in a scope were installed into the shared
analysis state behind a RefCell, swapped by guards and tracked by a
revision, and the evaluator kept its call depth and the fuel and two-state
mode of runtime evaluation in Cells of the same state. The functions are
now a value of the analysis context, which entering a module, a generate
block or an interface scope derives with the functions it sees, and the
constant evaluator takes them as an argument. The depth, fuel and mode are
a budget each evaluation owns and lends to its frames, and a call's frame
sees the constants of its caller's scope rather than the caller's frame.
Code that evaluates constants of an analyzed module takes a context with
the module's functions.

@tignear

tignear commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 refactor(sv): pass constant functions explicitly instead of installing them #2674 👈
2 refactor(sv): carry interface instances and time scopes in the context #2675
3 refactor(sv)!: pass the analysis session explicitly instead of sharing it through RefCell #2695

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 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-31T07:15:13.799356Z aa2e4aa New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dab7b9c2c8

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@tignear
tignear force-pushed the stack/tignear/refactor/analyzer-explicit-state/carry-imports-scope-analysis-context--082a6f20 branch from 89c31dc to 9e38238 Compare October 30, 2026 18:24
@tignear
tignear force-pushed the stack/tignear/refactor/analyzer-explicit-state/pass-constant-funcs-explicitly-instead-installing--cbacebc1 branch from dab7b9c to b0e50cf Compare October 30, 2026 18:24
@tignear

tignear commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial dab7b9c 2026-10-30 18:24 UTC
2 rebase dab7b9c → b0e50cf (rebase only) 2026-10-30 18:24 UTC
3 content b0e50cf → be2cdc1 Calls the typechecker evaluates inside a constant function, such as one in a select index, now spend the budget of the evaluation that made them, so recursion through them stops at the depth bound an… 2026-10-31 05:19 UTC
4 content be2cdc1 → 6383870 Rebased on master and resolved the conflict with #2672 (shared class scope tables): the method signature resolves its return type with the context's constant functions. 2026-10-31 06:59 UTC
5 content 6383870 → aa2e4aa Formatted the resolved return type of class method signatures (rustfmt). 2026-10-31 07:12 UTC

@mergify

mergify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

Base automatically changed from stack/tignear/refactor/analyzer-explicit-state/carry-imports-scope-analysis-context--082a6f20 to master October 31, 2026 05:02
@tignear
tignear force-pushed the stack/tignear/refactor/analyzer-explicit-state/pass-constant-funcs-explicitly-instead-installing--cbacebc1 branch from b0e50cf to be2cdc1 Compare October 31, 2026 05:20
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 31, 2026
@tignear
tignear force-pushed the stack/tignear/refactor/analyzer-explicit-state/pass-constant-funcs-explicitly-instead-installing--cbacebc1 branch from be2cdc1 to 6383870 Compare October 31, 2026 06:59
@tignear tignear removed the merge-ready Request merging through Mergify after required checks label Oct 31, 2026
…g them

The constant functions visible in a scope were installed into the shared
analysis state behind a RefCell, swapped by guards and tracked by a
revision, and the evaluator kept its call depth and the fuel and two-state
mode of runtime evaluation in Cells of the same state. The functions are
now a value of the analysis context, which entering a module, a generate
block or an interface scope derives with the functions it sees, and the
constant evaluator takes them as an argument. The depth, fuel and mode are
a budget each evaluation owns and lends to its frames, and a call's frame
sees the constants of its caller's scope rather than the caller's frame.
Code that evaluates constants of an analyzed module takes a context with
the module's functions.

Change-Id: Icbacebc1ba8721afe2ea0352b393fe06ff625091
@tignear
tignear force-pushed the stack/tignear/refactor/analyzer-explicit-state/pass-constant-funcs-explicitly-instead-installing--cbacebc1 branch from 6383870 to aa2e4aa Compare October 31, 2026 07:12
@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 31, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 31, 2026
@mergify

mergify Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as 03aa78f at 07:55 UTC

Merged together with #2675. 11 min in the queue, 9 min of it CI.

So far

10 merge conditions met
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • check-success = Verify workflow lockfile
  • depends-on=celox-sim/celox#2674
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Queue validation
    • check-neutral = @github-actions/Queue validation
    • check-skipped = @github-actions/Queue validation
  • any of · required by GitHub repository ruleset rule master:
    • check-success = @github-actions/Verify workflow lockfile
    • check-neutral = @github-actions/Verify workflow lockfile
    • check-skipped = @github-actions/Verify workflow lockfile

Times in UTC · dashboard · how the merge queue works

@mergify
mergify Bot merged commit 03aa78f into master Oct 31, 2026
28 checks passed
@mergify
mergify Bot deleted the stack/tignear/refactor/analyzer-explicit-state/pass-constant-funcs-explicitly-instead-installing--cbacebc1 branch October 31, 2026 07:55
@mergify mergify Bot removed the queued Mergify queue entry label Oct 31, 2026
@github-actions github-actions Bot mentioned this pull request Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant