Skip to content

feat(sv): support dynamic container class properties - #2278

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-class-containers/support-dynamic-container-class-props--fa526793
Oct 27, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/feat/sv-class-containers/support-dynamic-container-class-props--fa526793

Conversation

@tignear

@tignear tignear commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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.

@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: 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".

Comment on lines 395 to +397
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)?,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-27T14:37:30.191178Z 2c09ebb 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.

@tignear tignear closed this Oct 27, 2026
@tignear
tignear deleted the stack/tignear/feat/sv-class-containers/support-dynamic-container-class-props--fa526793 branch October 27, 2026 13:32
@tignear
tignear restored the stack/tignear/feat/sv-class-containers/support-dynamic-container-class-props--fa526793 branch October 27, 2026 13:33
@tignear tignear reopened this Oct 27, 2026
@tignear
tignear force-pushed the stack/tignear/feat/sv-class-containers/support-dynamic-container-class-props--fa526793 branch from 30d2427 to 60015a4 Compare October 27, 2026 13:34
@tignear

tignear commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 30d2427 2026-10-27 13:33 UTC
2 content 30d2427 → 60015a4 Restore the original Change-Id and PR #2278 after a commit-message trailer mistake 2026-10-27 13:33 UTC
3 content 60015a4 → 2c09ebb Resolve conflicts with merged parser qualifier and constraint_mode updates before requeuing the existing container PR 2026-10-27 14:34 UTC

@tignear

tignear commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 60015a43cd

ℹ️ 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 added the merge-ready Request merging through Mergify after required checks label Oct 27, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 27, 2026
@mergify

mergify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue

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

So far

  • ✅ Entered the queue Tue 27 Oct, 14:08 · rule changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue 14:22 · 60015a4

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 @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 dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 27, 2026
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
@tignear
tignear force-pushed the stack/tignear/feat/sv-class-containers/support-dynamic-container-class-props--fa526793 branch from 60015a4 to 2c09ebb Compare October 27, 2026 14:35
@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 27, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 27, 2026
@mergify

mergify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into master as 637894e at 15:15 UTC

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

So far

Merge conditions: 7 of 7 met

The batch, tested on draft #2287

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 mentioned this pull request Oct 27, 2026
32 of 55 tasks
@mergify
mergify Bot merged commit 637894e into master Oct 27, 2026
25 checks passed
@mergify
mergify Bot deleted the stack/tignear/feat/sv-class-containers/support-dynamic-container-class-props--fa526793 branch October 27, 2026 15:15
@mergify mergify Bot removed the queued Mergify queue entry label Oct 27, 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