Author: [email protected]
Date: Wed Jun 10 05:48:11 2009
New Revision: 2135
Modified:
trunk/src/ia32/codegen-ia32.cc
trunk/src/version.cc
trunk/test/mjsunit/smi-ops.js
Log:
Version 1.2.7.1.
Merge bleeding_e...@2134 to trunk to fix code generation issue
with left shifts with zero. Regression test case added.
Review URL: http://codereview.chromium.org/118497
Modified: trunk/src/ia32/codegen-ia32.cc
==============================================================================
--- trunk/src/ia32/codegen-ia32.cc (original)
+++ trunk/src/ia32/codegen-ia32.cc Wed Jun 10 05:48:11 2009
@@ -1691,6 +1691,8 @@
int shift_value = int_value & 0x1f;
operand->ToRegister();
if (shift_value == 0) {
+ // Spill operand so it can be overwritten in the slow case.
+ frame_->Spill(operand->reg());
DeferredInlineSmiOperation* deferred =
new DeferredInlineSmiOperation(op,
operand->reg(),
Modified: trunk/src/version.cc
==============================================================================
--- trunk/src/version.cc (original)
+++ trunk/src/version.cc Wed Jun 10 05:48:11 2009
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 1
#define MINOR_VERSION 2
#define BUILD_NUMBER 7
-#define PATCH_LEVEL 0
+#define PATCH_LEVEL 1
#define CANDIDATE_VERSION false
// Define SONAME to have the SCons build the put a specific SONAME into the
Modified: trunk/test/mjsunit/smi-ops.js
==============================================================================
--- trunk/test/mjsunit/smi-ops.js (original)
+++ trunk/test/mjsunit/smi-ops.js Wed Jun 10 05:48:11 2009
@@ -585,3 +585,10 @@
}
testShiftNonSmis();
+
+
+// Verify that we handle the (optimized) corner case of shifting by
+// zero even for non-smis.
+function shiftByZero(n) { return n << 0; }
+
+assertEquals(3, shiftByZero(3.1415));
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---