<?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>198445</bug_id>
          
          <creation_ts>2019-05-31 17:34:58 -0700</creation_ts>
          <short_desc>[WHLSL] Variant + placement new =&gt; have a bad time</short_desc>
          <delta_ts>2019-07-16 14:00:39 -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>WebGPU</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>199726</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>199726</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saam Barati">saam</reporter>
          <assigned_to name="Saam Barati">saam</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>jonlee</cc>
    
    <cc>justin_fan</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>rmorisset</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1540910</commentid>
    <comment_count>0</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2019-05-31 17:34:58 -0700</bug_when>
    <thetext>Think about for loop, it has Variant&lt;VariableDeclarationsStatement, Expression&gt;

However, we have passes that replace VariableDeclarationsStatement with Statement. So that breaks the type safety of ForLoop. It seems like the only sensible thing is either forbid replacing certain AST nodes, or only use the more general Expression/Statement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1551941</commentid>
    <comment_count>1</comment_count>
    <who name="Robin Morisset">rmorisset</who>
    <bug_when>2019-07-10 18:50:45 -0700</bug_when>
    <thetext>Actually there is another option here: just follow the spec that says that
for (X ; e1 ; e2) s
is actually syntactic sugar for
{
    X;
    for(; e1 ; e2) s
}
This should be very easy to do in the parser, would simplify all code that touches for loops (since there is no more initializer to deal with), and the parser can either put the VariableDeclarationsStatement directly into the block, or if it is an expression wrap it in EffectfulExpressionStatement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1553307</commentid>
    <comment_count>2</comment_count>
    <who name="Robin Morisset">rmorisset</who>
    <bug_when>2019-07-16 14:00:39 -0700</bug_when>
    <thetext>Was fixed in 199726.

*** This bug has been marked as a duplicate of bug 199726 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>