Open wucke13 opened 1 month ago
Yeah, I think we should say: the topmost N elements are returned, while the rest are discarded. See spec: https://webassembly.github.io/spec/core/exec/instructions.html#xref-syntax-instructions-syntax-instr-control-mathsf-return
MDN URL
https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/Control_flow/return
What specific section or headline is this issue about?
return
What information was incorrect, unhelpful, or incomplete?
The statement reads:
Assuming that we speak of a stack implemented by a vector, then I assume
pop
refers to consuming/removing the last element of the vec. Applying this understanding and going through the sentence step by step, I come up with the following (wrong) step-by-step:However, this would yield 10, while the example code is supposed to yield 90.
What did you expect to see?
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
MDN metadata
Page report details
* Folder: `en-us/webassembly/reference/control_flow/return` * MDN URL: https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/Control_flow/return * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/webassembly/reference/control_flow/return/index.md * Last commit: https://github.com/mdn/content/commit/c681ed89305afd56d54ba6671673680bea041670 * Document last modified: 2023-11-03T06:30:13.000Z