The JSC uses an outdated version of the reference types proposal, in short ref-types. Both SpiderMonkey and V8 engines support recent version of ref-types, so to make JSC better we should update it. JSC implements ref-types version which corresponds the version right before this PR https://github.com/WebAssembly/reference-types/pull/87. There are a few tasks to do: 1) rename anyref to externref 2) extend JSC wasm parser to parse immediates for ref.null and ref.is_null 3) adapt recent tests from existing implementations (SpiderMonkey and V8)
Created attachment 412640 [details] Patch
This patch modifies one of the wasm.json files. Please ensure that any changes in one have been mirrored to the other. You can find the wasm.json files at "Source/JavaScriptCore/wasm/wasm.json" and "JSTests/wasm/wasm.json". This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
In this bug we will focus on the first part (1) rename anyref to externref.
Created attachment 412732 [details] Patch
Created attachment 412736 [details] Patch
Comment on attachment 412736 [details] Patch r=me.
<rdar://problem/71074071>
Committed r269552: <https://trac.webkit.org/changeset/269552> All reviewed patches have been landed. Closing bug and clearing flags on attachment 412736 [details].