<?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>125215</bug_id>
          
          <creation_ts>2013-12-04 02:50:05 -0800</creation_ts>
          <short_desc>Avoid to add zero offset in BaseIndex.</short_desc>
          <delta_ts>2013-12-05 01:08:57 -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="László Langó">llango.u-szeged</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>956330</commentid>
    <comment_count>0</comment_count>
    <who name="László Langó">llango.u-szeged</who>
    <bug_when>2013-12-04 02:50:05 -0800</bug_when>
    <thetext>Avoid to add zero offset in BaseIndex class in offlineasm/cloop.rb.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>956332</commentid>
    <comment_count>1</comment_count>
      <attachid>218394</attachid>
    <who name="László Langó">llango.u-szeged</who>
    <bug_when>2013-12-04 02:53:00 -0800</bug_when>
    <thetext>Created attachment 218394
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>956378</commentid>
    <comment_count>2</comment_count>
      <attachid>218394</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-12-04 06:39:23 -0800</bug_when>
    <thetext>Comment on attachment 218394
Patch

Clearing flags on attachment: 218394

Committed r160091: &lt;http://trac.webkit.org/changeset/160091&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>956379</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2013-12-04 06:39:25 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>956407</commentid>
    <comment_count>4</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-12-04 09:14:08 -0800</bug_when>
    <thetext>As a general rule, I would avoid making such changes.  This change has no upside.  The C compiler would have folded the zero, and it would have done it as part of one of many already-mandatory folding passes - even at -O0.  So, you&apos;re just duplicating that functionality in offlineasm, which just means more code to maintain and more places where someone might make a mistake.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>956806</commentid>
    <comment_count>5</comment_count>
    <who name="László Langó">llango.u-szeged</who>
    <bug_when>2013-12-05 01:08:57 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; As a general rule, I would avoid making such changes.  This change has no upside.  The C compiler would have folded the zero, and it would have done it as part of one of many already-mandatory folding passes - even at -O0.  So, you&apos;re just duplicating that functionality in offlineasm, which just means more code to maintain and more places where someone might make a mistake.

Thanks for the reply. Yes, you are partly right. The GCC with -O0 really optimize this out, but the clang isn&apos;t. It won&apos;t do it with -O0. The other reason why I made this is that there&apos;s already a similar change in class Address in this file:
http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/offlineasm/cloop.rb#L195

So we should keep or remove from both places. I&apos;m still think this is a good change.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>218394</attachid>
            <date>2013-12-04 02:53:00 -0800</date>
            <delta_ts>2013-12-04 06:39:23 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-125215-20131204025300.patch</filename>
            <type>text/plain</type>
            <size>1551</size>
            <attacher name="László Langó">llango.u-szeged</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTYwMDc2CmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCAz
YjljNzk4ZjA4NDAyY2UyZmQ1N2IyNGI4NDMwMmQxM2Y2OWM2ZjYzLi5jODBhNDgwOGQwNTIwODg1
ZjFkMzE0MTdlN2RkNWQ3ZTY2NGM4M2U2IDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxNCBAQAorMjAxMy0xMi0wNCAgTMOhc3psw7MgTGFuZ8OzICA8bGFuZ29AaW5mLnUtc3pl
Z2VkLmh1PgorCisgICAgICAgIEF2b2lkIHRvIGFkZCB6ZXJvIG9mZnNldCBpbiBCYXNlSW5kZXgu
CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMjUyMTUK
KworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBXaGVuIHVz
aW5nIGNsb29wIGRvIG5vdCBnZW5lcmF0ZSBvZmZzZXRzIGFkZGl0aW9ucyBmb3IgQmFzZUluZGV4
IGlmIHRoZSBvZmZzZXQgaXMgemVyby4KKworICAgICAgICAqIG9mZmxpbmVhc20vY2xvb3AucmI6
CisKIDIwMTMtMTItMDMgIE1hcmsgTGFtICA8bWFyay5sYW1AYXBwbGUuY29tPgogCiAgICAgICAg
IHRlc3RhcGkgdGVzdCBjcmFzaGVzIG9uIFd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