<?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>263881</bug_id>
          
          <creation_ts>2023-10-30 05:10:16 -0700</creation_ts>
          <short_desc>[JSC] BitURShift is eliminated when toString has an effect</short_desc>
          <delta_ts>2025-05-23 19:05:17 -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>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="EntryHi">entryhii</reporter>
          <assigned_to name="Yusuke Suzuki">ysuzuki</assigned_to>
          <cc>mark.lam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1988460</commentid>
    <comment_count>0</comment_count>
    <who name="EntryHi">entryhii</who>
    <bug_when>2023-10-30 05:10:16 -0700</bug_when>
    <thetext>==================test.js=====================
function f1(o, value) {
    function f2()
    {
        o.x=value
        return 2
    }
    let y={}
    y.toString = f2
    y &gt;&gt;&gt; 1;
  }
  
  noInline(f1)
  let obj={}
  for (let v25 = 0; v25 &lt; 100; v25++) {
    f1(obj, v25);
    
  }
 print(obj.x)
==============================================

Run args: ./jsc -f test.js --useConcurrentJIT=0  --jitPolicyScale=0

obj.x should be 99, but JSC prints 1.

This bug may be related to DCE and DFGMovHintRemovalPhase. I noticed JSC added a new phase named DFGMovHintRemoval, is this phase too radical for the JavaScript semantics?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1990139</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-11-06 04:11:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/117993267&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2119408</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2025-05-23 15:33:41 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/45861</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2119494</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-05-23 19:05:15 -0700</bug_when>
    <thetext>Committed 295380@main (9126da39238b): &lt;https://commits.webkit.org/295380@main&gt;

Reviewed commits have been landed. Closing PR #45861 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>