Bug 219595 - [WASM-References] Add support for type annotated select
Summary: [WASM-References] Add support for type annotated select
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-07 03:00 PST by Dmitry
Modified: 2020-12-15 02:18 PST (History)
8 users (show)

See Also:


Attachments
Patch (1.03 MB, patch)
2020-12-07 03:09 PST, Dmitry
no flags Details | Formatted Diff | Diff
Patch (1.04 MB, patch)
2020-12-13 02:16 PST, Dmitry
no flags Details | Formatted Diff | Diff
Patch (1.04 MB, patch)
2020-12-14 02:37 PST, Dmitry
no flags Details | Formatted Diff | Diff
Patch (1.04 MB, patch)
2020-12-14 22:26 PST, Dmitry
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry 2020-12-07 03:00:30 PST
[WASM-References] Add support for type annotated select
Comment 1 Dmitry 2020-12-07 03:09:31 PST
Created attachment 415547 [details]
Patch
Comment 2 EWS Watchlist 2020-12-07 03:10:25 PST
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".
Comment 3 Dmitry 2020-12-13 02:16:21 PST
Created attachment 416114 [details]
Patch
Comment 4 Yusuke Suzuki 2020-12-13 15:45:52 PST
Comment on attachment 416114 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416114&action=review

> Source/JavaScriptCore/ChangeLog:10
> +        https://webassembly.github.io/reference-types/core/binary/instructions.html#parametric-instructions.

Can you describe about

1. what this opcode is. Including motivation why it is introduced etc.
2. how it is executed (semantics)

in ChangeLog?
Comment 5 Dmitry 2020-12-14 02:37:11 PST
Created attachment 416143 [details]
Patch
Comment 6 Radar WebKit Bug Importer 2020-12-14 03:01:15 PST
<rdar://problem/72290712>
Comment 7 Yusuke Suzuki 2020-12-14 17:58:27 PST
Comment on attachment 416143 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416143&action=review

> Source/JavaScriptCore/wasm/WasmFunctionParser.h:652
> +        m_expressionStack.constructAndAppend(zero.type(), result);

Using immediates.targetType is better for future extension?

> Source/JavaScriptCore/wasm/wasm.json:48
> +        "annotated_select":    { "category": "control",    "value":  28, "return": ["prev"],                         "parameter": ["any", "prev", "bool"],        "immediate": [{"name": "value_type",     "type": "value_type"}],                                            "description": "the same as just select but with a value type immediate" },

https://webassembly.github.io/reference-types/core/binary/instructions.html#parametric-instructions is showing `πŸΆπš‘πŸ·π™²  π‘‘βˆ—:𝚟𝚎𝚌(πšŸπšŠπš•πšπš’πš™πšŽ)`, but it looks like this definition is not that one.
Can you fix it? br_table's definition would be useful to fix it.

> JSTests/wasm/wasm.json:48
> +        "annotated_select":    { "category": "control",    "value":  28, "return": ["prev"],                         "parameter": ["any", "prev", "bool"],        "immediate": [{"name": "value_type",     "type": "value_type"}],                                            "description": "the same as just select but with a value type immediate" },

Ditto.
Comment 8 Dmitry 2020-12-14 22:26:05 PST
Created attachment 416225 [details]
Patch
Comment 9 Yusuke Suzuki 2020-12-15 01:55:49 PST
Comment on attachment 416225 [details]
Patch

r=me
Comment 10 EWS 2020-12-15 02:18:20 PST
Committed r270827: <https://trac.webkit.org/changeset/270827>

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