<?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>143937</bug_id>
          
          <creation_ts>2015-04-19 11:26:47 -0700</creation_ts>
          <short_desc>ByteCodeParser::m_currentSemanticOrigin is incorrect for multiple setLocals in a single bytecode instruction</short_desc>
          <delta_ts>2015-04-19 11:54:41 -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>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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="Filip Pizlo">fpizlo</reporter>
          <assigned_to name="Benjamin Poulain">benjamin</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1086651</commentid>
    <comment_count>0</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2015-04-19 11:26:47 -0700</bug_when>
    <thetext>The DFG bytecode parser has a bunch of machinery to handle the possibility that a single bytecode instruction will have multiple SetLocals.  At some point we added a m_currentSemanticOrigin thing for making the semantic origin of a SetLocal look &quot;right&quot;.  But, that functionality assumes that there will be just one SetLocal per bytecode instruction.

We probably don&apos;t have bytecode instructions with multiple SetLocals right now, but that is by no means a rule of bytecode.

So, this should either be fixed, or the m_currentSemanticOrigin feature should be removed. There is probably no harm in a SetLocal having the semantic origin of the following instruction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086658</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2015-04-19 11:46:55 -0700</bug_when>
    <thetext>What&apos;s the problem with having multiple SetLocal per bytecode?

The semantic origin always follows the local (immediately or stored on DelayedSetLocal). Are you saying there are cases where setLocal() could be re-entrant? How come?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086661</commentid>
    <comment_count>2</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2015-04-19 11:54:41 -0700</bug_when>
    <thetext>Oh, never mind.  I misread the code!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>