Skip to content

Conversation

@SoniEx2
Copy link
Collaborator

@SoniEx2 SoniEx2 commented Sep 23, 2024

Same issue as #2471 but for call_ref.

We don't believe there's a prior issue for this.

@SoniEx2
Copy link
Collaborator Author

SoniEx2 commented Sep 24, 2024

@sbc100

PrintError("%s", message.c_str());
result = Result::Error;
Result result = PeekType(0, &type);
if (!type.IsReferenceWithIndex()) {
Copy link
Member

Choose a reason for hiding this comment

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

Is it OK to use type here even if PeekType fails? i.e. should we return early if PeekType fails?

Copy link
Collaborator Author

@SoniEx2 SoniEx2 Sep 24, 2024

Choose a reason for hiding this comment

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

yeah this is fine. PeekType will set type to Type::Any, this is the same logic as the fix in #2471 - we want the error message.

@sbc100 sbc100 enabled auto-merge (squash) September 24, 2024 14:52
@SoniEx2
Copy link
Collaborator Author

SoniEx2 commented Sep 24, 2024

(you'll have to rebase it)

@SoniEx2
Copy link
Collaborator Author

SoniEx2 commented Sep 24, 2024

(actually we'll rebase it)

auto-merge was automatically disabled September 24, 2024 17:29

Head branch was pushed to by a user without write access

@SoniEx2 SoniEx2 force-pushed the fix-callref-emptystack branch from d45640e to b9c687f Compare September 24, 2024 17:29
@SoniEx2
Copy link
Collaborator Author

SoniEx2 commented Sep 24, 2024

(you'll have to re-enable auto-merge tho)

@sbc100 sbc100 merged commit 790bc04 into WebAssembly:main Sep 24, 2024
@SoniEx2 SoniEx2 deleted the fix-callref-emptystack branch September 24, 2024 18:33
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