Skip to content

feat(sv): bind method arguments by name and default - #2494

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-named-arguments/bind-method-arguments-name-default--fc239f9b
Oct 29, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-named-arguments/bind-method-arguments-name-default--fc239f9b

Conversation

@tignear

@tignear tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Calls of class methods bind their actuals like other subroutine calls
(IEEE 1800-2023 13.5.3, 13.5.4): by position, by name, or both with the
positional ones first, through a handle, this., super., unqualified
inside the class and as static methods through C::. An omitted actual,
also between given ones, and an empty named actual .a() take the
default. Named actuals are evaluated in the order they are written, after
the receiver. This accepts uvm_factory's
m_matches_type_pair(.match_type_pair(...), .requested_type(null), .requested_type_name(...)). Methods and constructors now share one
binder with module functions and tasks.

Actuals that cannot be bound are compile errors with a new
InvalidCallArguments diagnostic instead of unsupported constructs: a
name with no formal, a formal bound twice, a positional actual after a
named one, too many actuals, and an omitted actual whose formal has no
default.

The shared named_method_arguments case passes in Verilator 5.052 and
xezim 0.11.3. Icarus 13.0 cannot parse its C::sf(...) static calls and
joins the reviewed sv_icarus_class_scope_resolution exclusion. The
out-of-block method form of the UVM call is a Celox-only test: Icarus does
not support out-of-block methods and xezim evaluates them wrongly in an
instantiated module even with positional actuals.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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 🔄 Running since 2026-10-28T23:48:21.520033Z 75c84ae 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.

@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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

@tignear

tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue

2 min in the queue, with no time running CI.

So far

Reason

The pull request conflicts with master

Conflicting files: crates/celox-sv-analyzer/src/ast/expression_binding/direct.rs, docs/guide/systemverilog-reference.md

Hint

You should update or rebase your pull request.

If you want to requeue this pull request, you can post a @mergifyio queue comment.

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

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added queued Mergify queue entry dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 28, 2026
Calls of class methods bind their actuals like other subroutine calls
(IEEE 1800-2023 13.5.3, 13.5.4): by position, by name, or both with the
positional ones first, through a handle, `this.`, `super.`, unqualified
inside the class and as static methods through `C::`. An omitted actual,
also between given ones, and an empty named actual `.a()` take the
default. Named actuals are evaluated in the order they are written, after
the receiver. This accepts uvm_factory's
`m_matches_type_pair(.match_type_pair(...), .requested_type(null),
.requested_type_name(...))`. Methods and constructors now share one
binder with module functions and tasks.

Actuals that cannot be bound are compile errors with a new
`InvalidCallArguments` diagnostic instead of unsupported constructs: a
name with no formal, a formal bound twice, a positional actual after a
named one, too many actuals, and an omitted actual whose formal has no
default.

The shared named_method_arguments case passes in Verilator 5.052 and
xezim 0.11.3. Icarus 13.0 cannot parse its `C::sf(...)` static calls and
joins the reviewed sv_icarus_class_scope_resolution exclusion. The
out-of-block method form of the UVM call is a Celox-only test: Icarus does
not support out-of-block methods and xezim evaluates them wrongly in an
instantiated module even with positional actuals.

Change-Id: Ifc239f9b3b9c8dd6e3c9a0a7444835dfe40785a4
@tignear

tignear commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial d11ff70 2026-10-28 23:47 UTC
2 content d11ff70 → 75c84ae 2026-10-28 23:47 UTC

@tignear
tignear force-pushed the stack/tignear/feat/sv-named-arguments/bind-method-arguments-name-default--fc239f9b branch from d11ff70 to 75c84ae Compare October 28, 2026 23:48
@mergify mergify Bot removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 28, 2026
@tignear

tignear commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as e8a2d58 at 00:52 UTC

13 min in the queue, 11 min of it CI.

So far

Merge conditions: 7 of 7 met

The batch, tested on draft #2502

Condition Required by
✅ check-success = Conventional Commit title —
✅ check-success = Queue validation —
✅ any of: check-success = @github-actions/Lint & Format, check-neutral = @github-actions/Lint & Format, check-skipped = @github-actions/Lint & Format GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Rust Test & NAPI Build, check-neutral = @github-actions/Rust Test & NAPI Build, check-skipped = @github-actions/Rust Test & NAPI Build GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/JS Test (Ubuntu), check-neutral = @github-actions/JS Test (Ubuntu), check-skipped = @github-actions/JS Test (Ubuntu) GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Conventional Commit title, check-neutral = @github-actions/Conventional Commit title, check-skipped = @github-actions/Conventional Commit title GitHub repository ruleset rule master
✅ any of: check-success = @github-actions/Queue validation, check-neutral = @github-actions/Queue validation, check-skipped = @github-actions/Queue validation GitHub repository ruleset rule master

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added the queued Mergify queue entry label Oct 29, 2026
@mergify
mergify Bot merged commit e8a2d58 into master Oct 29, 2026
23 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-named-arguments/bind-method-arguments-name-default--fc239f9b branch October 29, 2026 00:52
@mergify mergify Bot removed the queued Mergify queue entry label Oct 29, 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant