Skip to content

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

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

Allow struct.wait on equality-comparable fields except floats#8939
stevenfontanella wants to merge 7 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 5 times, most recently from bc727ff to 41cfd56 Compare August 14, 2026 19:20
@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 Outdated
@stevenfontanella

Copy link
Copy Markdown
Member Author

Looks like my merge did something weird. I'll just rebase onto the latest main. Apologies for the force-push.

Comment thread src/ir/subtype-exprs.h Outdated
return;
}
const auto& fields = curr->ref->type.getHeapType().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.

Do we need this check - seems like the same issue, or am I not seeing the reason?

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.

You're right, this is from an earlier iteration that I missed. Removed it now.

void FunctionValidator::visitStructWait(StructWait* curr) {
// In IRBuilder, we check that the struct ref matches the type immediate.
// We can't check this here because we've already discarded the type immediate
// at this point. All other validations are here.

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.

This is a general comment, not specific to StructWait - let's remove it?

@kripken kripken left a comment

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.

lgtm % comment

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