<?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>149310</bug_id>
          
          <creation_ts>2015-09-17 15:53:11 -0700</creation_ts>
          <short_desc>Optimize WebAssembly calls</short_desc>
          <delta_ts>2016-12-20 14:34:26 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sukolsak Sakshuwong">sukolsak</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>mark.lam</cc>
    
    <cc>saam</cc>
    
    <cc>sukolsak</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1126910</commentid>
    <comment_count>0</comment_count>
    <who name="Sukolsak Sakshuwong">sukolsak</who>
    <bug_when>2015-09-17 15:53:11 -0700</bug_when>
    <thetext>Currently, when a WebAssembly function calls another function (JS or WASM), it will type check the return value and coerce it into the expected type. Similarly, when a WebAssembly function is called by another function (JS or WASM), it will type check the arguments and coerce them into the expected types. We can avoid this type checking and type coercion if we know that the caller or the callee is a WebAssembly function, because WebAssembly is statically typed.

We can probably take it further by avoiding boxing and unboxing of values completely when a WebAssembly function calls another WebAssembly function.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1126912</commentid>
    <comment_count>1</comment_count>
    <who name="Sukolsak Sakshuwong">sukolsak</who>
    <bug_when>2015-09-17 15:56:55 -0700</bug_when>
    <thetext>See also: Geoff&apos;s comments https://bugs.webkit.org/show_bug.cgi?id=149033#c6</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>