Repository navigation
feat(sv): support dynamic container class properties - #2278
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30d2427313
ℹ️ 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".
| expression_binding::value(*expression, native, tree, dims)?, | ||
| match index { | ||
| Some(index) => index_value(index, *expression, tree, dims, target)?, | ||
| Some(index) => index_value(index, *expression, tree, dims, &target)?, |
There was a problem hiding this comment.
Reuse the captured receiver when resolving queue dollar indices
For a property access such as stores[next_index()].q[$], the receiver is evaluated twice: once when lowering the outer Get, and again by the nested Size expression generated for $. The same duplication affects $-1 indices and element assignments. Consequently, next_index() runs twice and can select a different queue for the size calculation, producing an incorrect element or write target. Reuse the captured owner/container when resolving dollar indices rather than rebinding the original receiver expression.
Useful? React with 👍 / 👎.
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. |
30d2427 to
60015a4
Compare
Revision history
|
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🚫 Left the queue14 min in the queue, with no time running CI. So far
Reason The pull request conflicts with the base branch The pull request was held in the queue, conflicting with at least one of 3 pull requests ahead of it. The conflict became a base branch one after #1283, #2271, #2276 merged. 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 |
UVM queue and pool wrappers keep their storage in protected class properties. Support dynamic arrays, queues and integral/string-indexed associative arrays as instance or static properties, including member initializers, this/super, inheritance and protected/local access (IEEE 1800-2023 8.5, 8.9, 8.18). Keep constructed declarations in the parser's class property list instead of silently dropping declarations with [] or new initializers. Store containers as traced object handles. Bind property element access, methods, assignments, queries, reductions and foreach through the existing container operations. Evaluate an owning object once and publish mutations back into that property; nested pop arguments retain their updates. Keep method locals/formals in their own lexical scope so they can shadow properties without hiding this.q. Array assignment and shallow object copies keep independent container values; class elements retain identity (8.12). Add seven portable cases for generic queue/pool wrappers, all three containers, static/inherited storage, receiver evaluation, X/Z, string/object elements, copies and forced heap collection. Test interpreter state modes, native-image round trips, serialized checkpoint replay and null-receiver errors. Const containers, fixed unpacked class arrays, container ports/ref parameters and multidimensional containers remain unsupported. Retain merged ordering support after rebasing onto master. Exercise reverse, sort and rsort on a class queue property as an integration regression. Validation: - Common SV suite: 6,042 passed, 20 existing ignored; focused class-container tests: 37 passed; complete container group: 205 passed. The revised receiver-evaluated-once case passed all five backend configurations without depending on argument evaluation order. - Syntax/analyzer/frontend units: 135 / 863 / 11 passed, 3 existing analyzer ignores. Affected-crate all-targets Clippy with -D warnings, formatting and git diff --check passed. Debug NAPI build and JS integration: 435 passed. - Official sv-tests chapter-8 runner: 53 unmodified pinned cases, 106 verdicts, 98 pass and 8 existing fail; no expectation changes. Not a full-corpus run. - Verilator 5.052: 6 shared cases passed, 1 four-state adapter unsupported. Icarus 13.0: all seven have compilation errors; no passes claimed. - Previously built xezim 0.11.3: 4 passed, 3 mismatch (nested queue pop arguments lose an update; packed pop type queries execute the pop). Current pinned xezim has the previously observed offline dependency build problem; this comparison does not claim to use that revision. No external assertions, exclusions or retained verification baselines are changed. UVM evidence: inspected unmodified uvm_queue.svh and uvm_pool.svh at revision 656f20d087370a7c742e00188d20bbf30fa95339. A diagnostic harness including the actual queue header with registration/reporting/base stubs still stops resolving the compilation-unit parameterized class. Shared wrappers exercise its storage pattern; this does not establish that the UVM library runs. A separate minimal package reproducer confirms that specializing a generic class outside its declaring scope remains unsupported. Package-wide matching specializations must share type and static-member identity (8.25); this is a remaining UVM dependency, not implemented by this property change. Change-Id: Ifa5267930c6aef232c04d6445904fd139015138b
60015a4 to
2c09ebb
Compare
✅ 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
UVM queue and pool wrappers keep their storage in protected class properties.
Support dynamic arrays, queues and integral/string-indexed associative arrays
as instance or static properties, including member initializers, this/super,
inheritance and protected/local access (IEEE 1800-2023 8.5, 8.9, 8.18).
Keep constructed declarations in the parser's class property list instead of
silently dropping declarations with [] or new initializers. Store containers
as traced object handles. Bind property element access, methods, assignments,
queries, reductions and foreach through the existing container operations.
Evaluate an owning object once and publish mutations back into that property;
nested pop arguments retain their updates. Keep method locals/formals in their
own lexical scope so they can shadow properties without hiding this.q.
Array assignment and shallow object copies keep independent container values;
class elements retain identity (8.12). Add seven portable cases for generic
queue/pool wrappers, all three containers, static/inherited storage, receiver
evaluation, X/Z, string/object elements, copies and forced heap collection.
Test interpreter state modes, native-image round trips, serialized checkpoint
replay and null-receiver errors. Const containers, fixed unpacked class arrays,
container ports/ref parameters and multidimensional containers remain unsupported.
Retain merged ordering support after rebasing onto master. Exercise reverse,
sort and rsort on a class queue property as an integration regression.
Validation:
tests: 37 passed; complete container group: 205 passed. The revised receiver-evaluated-once case passed all five
backend configurations without depending on argument evaluation order.
ignores. Affected-crate all-targets Clippy with -D warnings, formatting and
git diff --check passed. Debug NAPI build and JS integration: 435 passed.
98 pass and 8 existing fail; no expectation changes. Not a full-corpus run.
Icarus 13.0: all seven have compilation errors; no passes claimed.
lose an update; packed pop type queries execute the pop). Current pinned
xezim has the previously observed offline dependency build problem; this
comparison does not claim to use that revision. No external assertions,
exclusions or retained verification baselines are changed.
UVM evidence: inspected unmodified uvm_queue.svh and uvm_pool.svh at revision
656f20d087370a7c742e00188d20bbf30fa95339. A diagnostic harness including the actual
queue header with registration/reporting/base stubs still stops resolving the
compilation-unit parameterized class. Shared wrappers exercise its storage
pattern; this does not establish that the UVM library runs.
A separate minimal package reproducer confirms that specializing a generic
class outside its declaring scope remains unsupported. Package-wide matching
specializations must share type and static-member identity (8.25); this is a
remaining UVM dependency, not implemented by this property change.