Repository navigation
feat(sv): bind method arguments by name and default - #2494
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Queued — the merge queue status continues in this comment ↓. |
|
@Mergifyio queue |
🚫 Left the queue2 min in the queue, with no time running CI. So far
Reason The pull request conflicts with Conflicting files: Hint You should update or rebase your pull request. If you want to requeue this pull request, you can post a Requeued — the merge queue status continues in this comment ↓. Times in UTC · dashboard · how the merge queue works |
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
Revision history
|
d11ff70 to
75c84ae
Compare
|
@Mergifyio queue |
✅ Merged into
|
| 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
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., unqualifiedinside the class and as static methods through
C::. An omitted actual,also between given ones, and an empty named actual
.a()take thedefault. 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 onebinder with module functions and tasks.
Actuals that cannot be bound are compile errors with a new
InvalidCallArgumentsdiagnostic instead of unsupported constructs: aname 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 andjoins 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.