-
Notifications
You must be signed in to change notification settings - Fork 42
Accessing SIMD types form JavaScript throws #44
Accessing SIMD types form JavaScript throws #44
Conversation
|
@dtig @PeterJensen @binji please review. |
| subnormal result is rounded to 0. Note that this differs from WebAssembly | ||
| scalar floating-point semantics which require correct subnormal handling. | ||
|
|
||
| # JavaScript API and SIMD Values |
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.
It looks like you can go through the js-api/index.bs doc and search for 𝗂𝟨𝟦, that has pretty much all the places you'll need to do the same thing.
The ones I see missing here:
- In
Globalconstructor - In
GetGlobalValue - In
Global.valueattribute
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, fixed.
proposals/simd/SIMD.md
Outdated
|
|
||
| ### ToJSValue | ||
|
|
||
| The algorithm toJSValue(w) should have an assertion ensuring w is not of the form v129.const v128. |
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.
typo: v128
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.
Fixed.
proposals/simd/SIMD.md
Outdated
|
|
||
| ### Exported Globals | ||
|
|
||
| If an exported global is of type v128, throw a WebAssembly.LinkError |
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 think this can be removed.
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.
Fixed
proposals/simd/SIMD.md
Outdated
|
|
||
| ## WebAssembly Module Instatiation | ||
|
|
||
| Instantiating a WebAssembly Module from a Module moduleObject will throw a LinkError exception, when module_imports(moduleObject.[[Module]]) has an externtype of the form global mut valtype and valtype is v128. |
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.
This is legal as long as the imported object's type is WebAssembly.Global and the global's valtype is v128.
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, good catch :)
374b648 to
947153b
Compare
binji
left a comment
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.
lgtm w/ one nit
proposals/simd/SIMD.md
Outdated
|
|
||
| ### Global constructor | ||
|
|
||
| If Global(descriptor, v) constructior will throw a [`TypeError`](https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror), when invoked with v of valuetype v128. |
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.
typo: constructor
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.
fixed.
f347060 to
5613a7d
Compare
Calling out the expected behavior while accessing SIMD types from JS though JS API.
Ref: #9