-
Notifications
You must be signed in to change notification settings - Fork 36
Conversation
These are few small fixes or typos. Some fixes can be wrong if I'm miunderstanding something, in which case please let me know!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay.
document/js-api/index.bs
Outdated
1. If |v| [=implements=] {{Exception}}, | ||
1. Let |type| be |v|.\[[Type]]. | ||
1. Let |payload| be |v|.\[[Payload]]. | ||
1. If |result| [=implements=] {{Exception}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result is a completion record, so can't be an object. I think a "Let v be result.[[Value]]" is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that just "Let v be result"? Below we are using v.[[Type]]
and v.[[Payload]]
. I don't think result.[[Value]].[[Type]]
makes sense..? Then if v == result, do we need another variable v
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not? result is a completion record, which has a [[Value]] field. The [[Value]] field of result contains a WebAssembly.Exception object, which has [[Type]] and [[Payload]] fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this meant [[Type]]
and [[Payload]]
exist within the completion record, because it looks this line says so:
exception-handling/document/js-api/index.bs
Line 1043 in ca2b715
1. Note: The expectation is that [=func_invoke=] will be updated to return (|store|, <var ignore>val</var>* | [=error=] | (exception |exntag| |payload|)). |
It looks the completion record is extended to contain a tag and a payload.
But as you said, WebAssembly.Exception
also has [[Type]]
and [[Payload]]
field. Do these two fields exist within both entities, WebAssembly.Exception
and the completion record?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow. func_invoke
is a wasm algorithm, so returns wasm values, not completion records.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I reverted this too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks! This PR didn't matter, but please let me merge my PRs next time! :) |
🤦 Thanks for reminding me! |
These are few small fixes or typos. Some fixes can be wrong if I'm
miunderstanding something, in which case please let me know!