<?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>254693</bug_id>
          
          <creation_ts>2023-03-29 14:42:21 -0700</creation_ts>
          <short_desc>[Wasm-GC] Implement casts at Wasm-JS function call boundaries</short_desc>
          <delta_ts>2024-07-24 13:39:37 -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>joseph.j.griego</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1945121</commentid>
    <comment_count>0</comment_count>
    <who name="Asumu Takikawa">asumu</who>
    <bug_when>2023-03-29 14:42:21 -0700</bug_when>
    <thetext>When calling into Wasm from JS, `ToWebAssemblyValue` needs to be called on JS values to convert them to Wasm values. For GC types, this is currently not implemented.

In general, it&apos;s necessary to add a `extern.internalize` and `ref.cast` to the target Wasm type on such a call.

In the other direction, `ToJSValue` is typically a no-op for Wasm GC values, but it still needs to be enabled.

The machinery to do these casts is already in JSC, but it needs to be hooked up to code in JSToWasm.cpp and WasmToJS.cpp to do the right thing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1946850</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-04-05 14:43:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/107679474&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1987461</commentid>
    <comment_count>2</comment_count>
    <who name="Asumu Takikawa">asumu</who>
    <bug_when>2023-10-25 10:29:26 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/19550</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1991226</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-11-09 10:31:52 -0800</bug_when>
    <thetext>Committed 270460@main (5aa61e8c766a): &lt;https://commits.webkit.org/270460@main&gt;

Reviewed commits have been landed. Closing PR #19550 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2048148</commentid>
    <comment_count>4</comment_count>
    <who name="David Degazio">d_degazio</who>
    <bug_when>2024-07-24 13:39:37 -0700</bug_when>
    <thetext>*** Bug 263467 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>