Skip to content

Allow struct.wait on equality-comparable fields except floats - #8939

Open
stevenfontanella wants to merge 3 commits into
mainfrom
waitqueue-eq
Open

Allow struct.wait on equality-comparable fields except floats#8939
stevenfontanella wants to merge 3 commits into
mainfrom
waitqueue-eq

Conversation

@stevenfontanella

@stevenfontanella stevenfontanella commented Jul 25, 2026

Copy link
Copy Markdown
Member

Part of #8315. #8672 added struct.wait for i32 struct fields, but left out support for i64 and subtypes of ref null (shared eq). See the details in the proposal.

@stevenfontanella
stevenfontanella force-pushed the waitqueue-eq branch 2 times, most recently from 12a3523 to ff41b36 Compare July 28, 2026 20:26
@stevenfontanella stevenfontanella changed the title (WIP, gemini) Allow struct.wait and any equality-comparable type Allow struct.wait on equality-comparable fields except floats Aug 13, 2026
@stevenfontanella
stevenfontanella force-pushed the waitqueue-eq branch 4 times, most recently from 1333839 to bc727ff Compare August 14, 2026 18:46
@stevenfontanella
stevenfontanella marked this pull request as ready for review August 14, 2026 20:06
@stevenfontanella
stevenfontanella requested a review from a team as a code owner August 14, 2026 20:06
@stevenfontanella
stevenfontanella requested review from kripken and removed request for a team August 14, 2026 20:06
Comment thread src/ir/child-typer.h
ht = curr->ref->type.getHeapType();
}
const auto& fields = ht->getStruct().fields;
if (curr->index >= fields.size()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How can this happen?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think this could happen if we create an out-of-bounds index using the C/JS API, and then the user code never validates the module. Otherwise the parser will already catch this:

return in.err("struct index out of bounds");
I added this since we index into fields below on line 1049. Does it make sense? I'm a little confused on what ChildTyper does, even after chatting with Gemini. I see that it's generating 'constraints' on children, but it's not checking the full set of required types because validation will do that in general.

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.

2 participants