Revision: 2900
Author: [email protected]
Date: Wed Sep 16 05:40:15 2009
Log: X64: Ensure that unary subtraction returns a zero-extended smi, if it  
returns a smi.
Review URL: http://codereview.chromium.org/195101
http://code.google.com/p/v8/source/detail?r=2900

Modified:
  /branches/bleeding_edge/src/x64/codegen-x64.cc
  /branches/bleeding_edge/test/mjsunit/array-splice.js

=======================================
--- /branches/bleeding_edge/src/x64/codegen-x64.cc      Tue Sep 15 04:35:23 2009
+++ /branches/bleeding_edge/src/x64/codegen-x64.cc      Wed Sep 16 05:40:15 2009
@@ -6320,7 +6320,7 @@
    // Also enter it if the value of the smi is Smi::kMinValue
    __ testl(rax, Immediate(0x7FFFFFFE));
    __ j(zero, &special);
-  __ neg(rax);
+  __ negl(rax);
    __ jmp(&done);

    __ bind(&special);
=======================================
--- /branches/bleeding_edge/test/mjsunit/array-splice.js        Mon Feb  2  
23:24:49 2009
+++ /branches/bleeding_edge/test/mjsunit/array-splice.js        Wed Sep 16  
05:40:15 2009
@@ -309,3 +309,6 @@
  assertEquals(1, arr.pop());
  assertEquals(0, arr.pop());
  Array.prototype[1] = undefined;
+
+// Test http://code.google.com/p/chromium/issues/detail?id=21860
+Array.prototype.push.apply([], [1].splice(0, -(-1 % 5)));

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to