<?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>140110</bug_id>
          
          <creation_ts>2015-01-05 18:55:00 -0800</creation_ts>
          <short_desc>Fix Use details for op_create_lexical_environment and op_create_arguments</short_desc>
          <delta_ts>2015-01-06 14:00:23 -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>528+ (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="Mark Lam">mark.lam</reporter>
          <assigned_to name="Mark Lam">mark.lam</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>mhahnenb</cc>
    
    <cc>mmirman</cc>
    
    <cc>msaboff</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1058886</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-01-05 18:55:00 -0800</bug_when>
    <thetext>The current &quot;Use&quot; details for op_create_lexical_environment and op_create_arguments are wrong.  op_create_argument uses nothing instead of 1st operand (the output local).  op_create_lexical_environment uses its 2nd operand (the scope chain) instead of the 1st (the output local).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1058887</commentid>
    <comment_count>1</comment_count>
      <attachid>244027</attachid>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-01-05 19:00:31 -0800</bug_when>
    <thetext>Created attachment 244027
the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1058888</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-01-05 19:04:09 -0800</bug_when>
    <thetext>FYI, I&apos;ve run this patch on the layout tests, JSC stress tests, and the JSC benchmarks (for stability ... I didn&apos;t check perf because it doesn&apos;t look like it should impact perf).  There were no regressions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1058889</commentid>
    <comment_count>3</comment_count>
      <attachid>244027</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2015-01-05 19:29:12 -0800</bug_when>
    <thetext>Comment on attachment 244027
the patch.

A def isn&apos;t necessarily a use unless the instruction reads the old value of the variable. Is that true of the op_create_* opcodes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1058891</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-01-05 19:46:04 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Comment on attachment 244027 [details]
&gt; the patch.
&gt; 
&gt; A def isn&apos;t necessarily a use unless the instruction reads the old value of
&gt; the variable. Is that true of the op_create_* opcodes?

Yes.  op_create_arguments does not read the old value.  Hence, I changed it to use none.  op_create_lexical_environment reads operand 2, not operand 1.  Hence, I changed it accordingly too.

I didn’t change the defs which are already correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1058894</commentid>
    <comment_count>5</comment_count>
      <attachid>244027</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2015-01-05 20:10:38 -0800</bug_when>
    <thetext>Comment on attachment 244027
the patch.

Test case?  Or is this benign?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1058895</commentid>
    <comment_count>6</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2015-01-05 20:11:25 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; Comment on attachment 244027 [details]
&gt; the patch.
&gt; 
&gt; Test case?  Or is this benign?

Seems like not using an operand that is used should cause OSR exit glitches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1059030</commentid>
    <comment_count>7</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-01-06 09:35:09 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; Comment on attachment 244027 [details]
&gt; &gt; the patch.
&gt; &gt; 
&gt; &gt; Test case?  Or is this benign?
&gt; 
&gt; Seems like not using an operand that is used should cause OSR exit glitches.

I think it’s benign because:
1. The node that is used is always the result of GetScope.
2. The CreateActivation that uses it effectively follows immediately after the GetScope.
3. There is no opportunity for an OSR exit between the GetScope and the CreateActivation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1059084</commentid>
    <comment_count>8</comment_count>
      <attachid>244027</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-01-06 11:39:07 -0800</bug_when>
    <thetext>Comment on attachment 244027
the patch.

Clearing flags on attachment: 244027

Committed r177981: &lt;http://trac.webkit.org/changeset/177981&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1059085</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-01-06 11:39:10 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1059152</commentid>
    <comment_count>10</comment_count>
    <who name="Mark Lam">mark.lam</who>
    <bug_when>2015-01-06 14:00:23 -0800</bug_when>
    <thetext>The patch was wrong about op_create_arguments.  It does indeed use its 1st operand.  Reverted that part of the patch in r177994: &lt;http://trac.webkit.org/r177994&gt;.  rs=pizlo.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>244027</attachid>
            <date>2015-01-05 19:00:31 -0800</date>
            <delta_ts>2015-01-06 11:39:07 -0800</delta_ts>
            <desc>the patch.</desc>
            <filename>bug-140110.patch</filename>
            <type>text/plain</type>
            <size>2167</size>
            <attacher name="Mark Lam">mark.lam</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291
cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkocmV2aXNpb24gMTc3OTQ1KQorKysgU291cmNl
L0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE5IEBA
CisyMDE1LTAxLTA1ICBNYXJrIExhbSAgPG1hcmsubGFtQGFwcGxlLmNvbT4KKworICAgICAgICBG
aXggVXNlIGRldGFpbHMgZm9yIG9wX2NyZWF0ZV9sZXhpY2FsX2Vudmlyb25tZW50IGFuZCBvcF9j
cmVhdGVfYXJndW1lbnRzLgorICAgICAgICA8aHR0cHM6Ly93ZWJraXQub3JnL2IvMTQwMTEwPgor
CisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIFRoZSBjdXJy
ZW50ICJVc2UiIGRldGFpbHMgZm9yIG9wX2NyZWF0ZV9sZXhpY2FsX2Vudmlyb25tZW50IGFuZAor
ICAgICAgICBvcF9jcmVhdGVfYXJndW1lbnRzIGFyZSB3cm9uZy4gIG9wX2NyZWF0ZV9hcmd1bWVu
dCB1c2VzIG5vdGhpbmcgaW5zdGVhZCBvZiB0aGUKKyAgICAgICAgMXN0IG9wZXJhbmQgKHRoZSBv
dXRwdXQgbG9jYWwpLiAgb3BfY3JlYXRlX2xleGljYWxfZW52aXJvbm1lbnQgdXNlcyBpdHMgMm5k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