Skip to content

Use effects for indirect call expressions#8625

Draft
stevenfontanella wants to merge 1 commit intoindirect-effects-sccfrom
expression-effects
Draft

Use effects for indirect call expressions#8625
stevenfontanella wants to merge 1 commit intoindirect-effects-sccfrom
expression-effects

Conversation

@stevenfontanella
Copy link
Copy Markdown
Member

No description provided.

Comment thread src/ir/effects.h
void visitCallIndirect(CallIndirect* curr) {
if (auto it = parent.module.typeEffects.find(curr->heapType);
it != parent.module.typeEffects.end()) {
parent.mergeIn(*it->second);
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.

It doesn't look like this accounts for the possible trap from a bad type check. I guess the previous code didn't need to handle it because setting calls implicitly includes trapping along with most other effects.

To make this as precise as possible, we could look at the type of the table and skip setting the trap effect if it is non-nullable and a subtype of the call_indirect expected type.

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