Bug 218331

Summary: [WASM-References] Rename anyref to externref
Product: WebKit Reporter: Dmitry <dbezhetskov>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: clopez, ews-watchlist, fpizlo, keith_miller, mark.lam, max, msaboff, saam, tzagallo, webkit-bug-importer, youennf, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Dmitry 2020-10-29 05:31:06 PDT
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)
Comment 1 Dmitry 2020-10-29 06:30:28 PDT
Created attachment 412640 [details]
Patch
Comment 2 EWS Watchlist 2020-10-29 06:31:16 PDT
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
Comment 3 Dmitry 2020-10-30 04:46:44 PDT
In this bug we will focus on the first part (1) rename anyref to externref.
Comment 4 Dmitry 2020-10-30 04:59:09 PDT
Created attachment 412732 [details]
Patch
Comment 5 Dmitry 2020-10-30 06:53:07 PDT
Created attachment 412736 [details]
Patch
Comment 6 Keith Miller 2020-10-30 09:33:31 PDT
Comment on attachment 412736 [details]
Patch

r=me.
Comment 7 Radar WebKit Bug Importer 2020-11-05 04:32:21 PST
<rdar://problem/71074071>
Comment 8 EWS 2020-11-06 17:11:14 PST
Committed r269552: <https://trac.webkit.org/changeset/269552>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 412736 [details].