<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>239668</bug_id>
          
          <creation_ts>2022-04-22 12:31:55 -0700</creation_ts>
          <short_desc>[Wasm-GC] Add support for subtyping declarations</short_desc>
          <delta_ts>2024-07-24 15:25:15 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebAssembly</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>247394</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Asumu Takikawa">asumu</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bashorov</cc>
    
    <cc>dbezhetskov</cc>
    
    <cc>saam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1863744</commentid>
    <comment_count>0</comment_count>
    <who name="Asumu Takikawa">asumu</who>
    <bug_when>2022-04-22 12:31:55 -0700</bug_when>
    <thetext>As mentioned in https://bugs.webkit.org/show_bug.cgi?id=239666, full support of the Wasm GC proposal requires type system support for both recursion groups and subtyping declarations.

In the latest GC proposal design, subtyping (e.g., for struct types) is declared explicitly with a `sub` operator:

Example:


```
(module
  (type $s1 (struct))
  (type $s2 (sub $s1 (field i32)))
)
```

The binary format allows for multiple supertypes, but the MVP design will restrict it to one supertype.

A reference type with an index to a type definition that has supertypes will be compatible with a reference type to its supertype index.

Only array and struct types will support subtyping at first, so it likely makes sense to implement this after struct operations and recursive types land.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1863745</commentid>
    <comment_count>1</comment_count>
    <who name="Asumu Takikawa">asumu</who>
    <bug_when>2022-04-22 12:32:54 -0700</bug_when>
    <thetext>There was a mistake in the example, it should have a `struct` operator in there:

```
(module
  (type $s1 (struct))
  (type $s2 (sub $s1 (struct (field i32))))
)
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1865500</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-04-29 12:32:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/92538296&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1908281</commentid>
    <comment_count>3</comment_count>
    <who name="Asumu Takikawa">asumu</who>
    <bug_when>2022-10-25 16:14:44 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/5786</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909866</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-11-02 14:23:53 -0700</bug_when>
    <thetext>Committed 256243@main (431164ca6a4b): &lt;https://commits.webkit.org/256243@main&gt;

Reviewed commits have been landed. Closing PR #5786 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909907</commentid>
    <comment_count>5</comment_count>
    <who name="">bashorov</who>
    <bug_when>2022-11-02 16:14:22 -0700</bug_when>
    <thetext>I&apos;m wondering if there is an umbrella issue to track progress about GC proposal support?

Also, could you please suggest how I may try current state in the Safari(I guess in Technology Preview)? Specifically how I cen turn on relevant options in Safari?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909937</commentid>
    <comment_count>6</comment_count>
    <who name="Asumu Takikawa">asumu</who>
    <bug_when>2022-11-02 17:20:05 -0700</bug_when>
    <thetext>(In reply to bashorov from comment #5)
&gt; I&apos;m wondering if there is an umbrella issue to track progress about GC
&gt; proposal support?
&gt; 
&gt; Also, could you please suggest how I may try current state in the Safari(I
&gt; guess in Technology Preview)? Specifically how I cen turn on relevant
&gt; options in Safari?

I just created an umbrella bug for GC here: https://bugs.webkit.org/show_bug.cgi?id=247394

There is still a bunch of work needed to run non-trivial Wasm GC programs, but a subset of the spec tests will pass.

There is a `--useWebAssemblyGC` flag for JSC that you can toggle if you build JSC standalone. Not sure it is exposed via WebKit and visible in the Safari UI though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1910038</commentid>
    <comment_count>7</comment_count>
    <who name="">bashorov</who>
    <bug_when>2022-11-03 04:41:44 -0700</bug_when>
    <thetext>&gt; I just created an umbrella bug for GC

Cool, thanks!

&gt; Not sure it is exposed via WebKit and visible in the Safari UI though.

Where/who is right place/person to ask about it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2048185</commentid>
    <comment_count>8</comment_count>
    <who name="David Degazio">d_degazio</who>
    <bug_when>2024-07-24 15:25:15 -0700</bug_when>
    <thetext>*** Bug 233919 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>