Skip to content

[Unsubtyping] Handle table.grow - #9327

Merged
tlively merged 1 commit into
mainfrom
unsubtyping-table-grow
Oct 29, 2026
Merged

tlively merged 1 commit into
mainfrom
unsubtyping-table-grow

Conversation

@tlively

@tlively tlively commented Oct 29, 2026

Copy link
Copy Markdown
Member

SubtypingDiscoverer did not previously note the constraint that TableGrow's value operand had to be a subtype of the table's element type. This would cause Unsubtyping to incorrectly remove that subtyping, leading to validation failures.

This is included in #9263, but split it out to make the fuzzer happy.

SubtypingDiscoverer did not previously note the constraint that TableGrow's `value` operand had to be a subtype of the table's element type. This would cause Unsubtyping to incorrectly remove that subtyping, leading to validation failures.

This is included in #9263, but split it out to make the fuzzer happy.
@tlively
tlively requested a review from a team as a code owner October 29, 2026 20:14
@tlively
tlively requested review from aheejin and removed request for a team October 29, 2026 20:14

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the SubtypingDiscoverer in src/ir/subtype-exprs.h to correctly track subtype relationships during table.grow operations by noting the subtype relation between the value being added and the table's declared type. Additionally, a test case has been added to test/lit/passes/unsubtyping.wast to verify this behavior. There are no review comments to evaluate, and the changes look correct and well-tested.

@tlively
tlively enabled auto-merge (squash) October 29, 2026 20:26
@tlively
tlively merged commit 7d27113 into main Oct 29, 2026
17 checks passed
@tlively
tlively deleted the unsubtyping-table-grow branch October 29, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants