Revision: 4489
Author: [email protected]
Date: Mon Apr 26 03:58:49 2010
Log: Fix bug in the ARM full code generator for inlined count operations.
(on 2.1 branch)

Review URL: http://codereview.chromium.org/1735013
http://code.google.com/p/v8/source/detail?r=4489

Modified:
 /branches/2.1/src/arm/full-codegen-arm.cc
 /branches/2.1/src/version.cc

=======================================
--- /branches/2.1/src/arm/full-codegen-arm.cc   Wed Mar 24 01:21:20 2010
+++ /branches/2.1/src/arm/full-codegen-arm.cc   Mon Apr 26 03:58:49 2010
@@ -1593,10 +1593,9 @@

   // Inline smi case if we are in a loop.
   Label stub_call, done;
+  int count_value = expr->op() == Token::INC ? 1 : -1;
   if (loop_depth() > 0) {
-    __ add(r0, r0, Operand(expr->op() == Token::INC
-                           ? Smi::FromInt(1)
-                           : Smi::FromInt(-1)));
+    __ add(r0, r0, Operand(Smi::FromInt(count_value)), SetCC);
     __ b(vs, &stub_call);
     // We could eliminate this smi check if we split the code at
     // the first smi check before calling ToNumber.
@@ -1604,11 +1603,9 @@
     __ b(eq, &done);
     __ bind(&stub_call);
     // Call stub. Undo operation first.
-    __ sub(r0, r0, Operand(r1));
-  }
-  __ mov(r1, Operand(expr->op() == Token::INC
-                     ? Smi::FromInt(1)
-                     : Smi::FromInt(-1)));
+    __ sub(r0, r0, Operand(Smi::FromInt(count_value)));
+  }
+  __ mov(r1, Operand(Smi::FromInt(count_value)));
   GenericBinaryOpStub stub(Token::ADD, NO_OVERWRITE);
   __ CallStub(&stub);
   __ bind(&done);
=======================================
--- /branches/2.1/src/version.cc        Thu Apr 22 02:38:06 2010
+++ /branches/2.1/src/version.cc        Mon Apr 26 03:58:49 2010
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     2
 #define MINOR_VERSION     1
 #define BUILD_NUMBER      10
-#define PATCH_LEVEL       8
+#define PATCH_LEVEL       9
 #define CANDIDATE_VERSION false

 // Define SONAME to have the SCons build the put a specific SONAME into the

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

Reply via email to