Skip to content

[Shared-Everything] ArrayRMW and ArrayCmpxchg #7632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Jun 2, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix struct/array.cmpxchg expected subtyping
  • Loading branch information
kripken committed Jun 2, 2025
commit 347595cf1e66f9d18f73ef2b0033edc585731f0a
4 changes: 2 additions & 2 deletions src/ir/subtype-exprs.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ struct SubtypingDiscoverer : public OverriddenVisitor<SubType> {
return;
}
const auto& fields = curr->ref->type.getHeapType().getStruct().fields;
self()->noteSubtype(curr->expected, fields[curr->index].type);
self()->noteSubtype(curr->expected, Type(HeapType::eq, Nullable));
Copy link
Member

Choose a reason for hiding this comment

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

These should also only be if the field type is a reference.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

self()->noteSubtype(curr->replacement, fields[curr->index].type);
}
void visitArrayNew(ArrayNew* curr) {
Expand Down Expand Up @@ -411,7 +411,7 @@ struct SubtypingDiscoverer : public OverriddenVisitor<SubType> {
return;
}
auto array = curr->ref->type.getHeapType().getArray();
self()->noteSubtype(curr->expected, array.element.type);
self()->noteSubtype(curr->expected, Type(HeapType::eq, Nullable));
self()->noteSubtype(curr->replacement, array.element.type);
}
void visitRefAs(RefAs* curr) {
Expand Down