WebAssembly / WebAssembly/spec
js-api tests for externref
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 3.5k
- Forks
- 539
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 13
Description
I'm trying to find (and add?) tests for init arguments for Table/Global constructors/methods that were introduced by reference-types proposal.
The https://webassembly.github.io/spec/js-api/index.html#dom-table-table defines the initial ref value to be ToWebAssemblyValue(undefined, externref), which is resolved to some ref.extern (not null).
Is this a mistake and the above default value has to be null? If it is not a mistake, what the following test must produce?
const argument = { "element": "externref", "initial": 3 };
const table = new WebAssembly.Table(argument);
assert_equals(table.length, 3);
assert_equals(table.get(0), null); // ??
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the JS API specification's Table definition and its reference to ToWebAssemblyValue(undefined, externref); compare the stated default with the expected Table.get(0) behavior and related Table/Global constructor and method cases. The issue is complete when the externref expectation is resolved and the corresponding js-api tests and specification behavior agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, wasm
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100