Skip to content
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

Add Wasm return_call demo #36288

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Add Wasm return_call demo #36288

merged 1 commit into from
Nov 25, 2024

Conversation

pepelsbey
Copy link
Member

@pepelsbey pepelsbey commented Oct 9, 2024

Description

  • Adds a new factorial demo
  • Explains existing demo

Motivation

Part of the Firefox 121 release notes task that got delayed due to the platform’s lack of support.

Additional details

@github-actions github-actions bot added Content:wasm WebAssembly docs size/s [PR only] 6-50 LoC changed labels Oct 9, 2024
Copy link
Contributor

github-actions bot commented Oct 9, 2024

Preview URLs

(comment last updated: 2024-11-18 15:35:17)

@pepelsbey pepelsbey marked this pull request as ready for review October 10, 2024 11:32
@pepelsbey pepelsbey requested a review from a team as a code owner October 10, 2024 11:32
@pepelsbey pepelsbey requested review from hamishwillee and removed request for a team October 10, 2024 11:32
Comment on lines 9 to 10
**`call`** calls a function, while **`call_indirect`** calls a function in a table.
**`return_call`** and **`return_call_indirect`** are the tail-call versions of `call` and `call_indirect`, respectively.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I appreciate that this predates you, but what is a tail-call? We should say, if you know?

It would be good to have an example of using call_indirect.

Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

@pepelsbey I've subedited to what I think is improved structure. I'd like an explanation of tail call ideally as per https://github.com/mdn/content/pull/36288/files#r1796238648
However if you don't want to do that because you consider it out of scope that is understandable - I'm approving so you have the choice to self merge.

@hamishwillee
Copy link
Collaborator

@pepelsbey ^^^

@pepelsbey pepelsbey merged commit 5961d8e into mdn:main Nov 25, 2024
15 checks passed
@pepelsbey pepelsbey deleted the wasm-tail branch November 25, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:wasm WebAssembly docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants