Reviewers: Søren Gjesse,

Description:
Merge r2556 and r2557 to branches/1.2. The x64 changes in the
original revisions were left out, because the 1.2 branch doesn't
contain the patched code.

Please review this at http://codereview.chromium.org/160270

SVN Base: http://v8.googlecode.com/svn/branches/1.2/

Affected files:
   M     src/arm/stub-cache-arm.cc
   M     src/ia32/stub-cache-ia32.cc
   M     src/objects.cc
   M     src/version.cc


Index: src/objects.cc
===================================================================
--- src/objects.cc      (revision 2555)
+++ src/objects.cc      (working copy)
@@ -7060,20 +7060,16 @@
      if (value->IsSmi()) {
        int_value = Smi::cast(value)->value();
      } else if (value->IsHeapNumber()) {
-      static const DoubleRepresentation nan(OS::nan_value());
-      DoubleRepresentation double_value = HeapNumber::cast(value)->value();
-      if (nan.bits != double_value.bits) {
-        int_value = static_cast<int>(double_value.value + 0.5);
-      } else {
-        // NaN clamps to zero.
-        int_value = 0;
+      double double_value = HeapNumber::cast(value)->value();
+      if (!isnan(double_value)) {
+        // NaN clamps to zero (default). Other doubles are rounded to
+        // the nearest integer.
+        int_value = static_cast<int>(double_value + 0.5);
        }
-    } else if (value->IsUndefined()) {
-      int_value = 0;
      } else {
-      // All other types have been converted to a number type further up  
in the
-      // call chain.
-      UNREACHABLE();
+      // Clamp undefined to zero (default). All other types have been
+      // converted to a number type further up in the call chain.
+      ASSERT(value->IsUndefined());
      }
      if (int_value < 0) {
        clamped_value = 0;
Index: src/ia32/stub-cache-ia32.cc
===================================================================
--- src/ia32/stub-cache-ia32.cc (revision 2544)
+++ src/ia32/stub-cache-ia32.cc (working copy)
@@ -680,13 +680,13 @@
      case JSARRAY_HAS_FAST_ELEMENTS_CHECK:
        CheckPrototypes(JSObject::cast(object), edx, holder,
                        ebx, ecx, name, &miss);
-      // Make sure object->elements()->map() !=  
Heap::dictionary_array_map()
+      // Make sure object->HasFastElements().
        // Get the elements array of the object.
        __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset));
        // Check that the object is in fast mode (not dictionary).
        __ cmp(FieldOperand(ebx, HeapObject::kMapOffset),
-             Immediate(Factory::hash_table_map()));
-      __ j(equal, &miss, not_taken);
+             Immediate(Factory::fixed_array_map()));
+      __ j(not_equal, &miss, not_taken);
        break;

      default:
Index: src/arm/stub-cache-arm.cc
===================================================================
--- src/arm/stub-cache-arm.cc   (revision 2544)
+++ src/arm/stub-cache-arm.cc   (working copy)
@@ -676,13 +676,13 @@

      case JSARRAY_HAS_FAST_ELEMENTS_CHECK:
        CheckPrototypes(JSObject::cast(object), r1, holder, r3, r2, name,  
&miss);
-      // Make sure object->elements()->map() != Heap::hash_table_map()
+      // Make sure object->HasFastElements().
        // Get the elements array of the object.
        __ ldr(r3, FieldMemOperand(r1, JSObject::kElementsOffset));
        // Check that the object is in fast mode (not dictionary).
        __ ldr(r2, FieldMemOperand(r3, HeapObject::kMapOffset));
-      __ cmp(r2, Operand(Factory::hash_table_map()));
-      __ b(eq, &miss);
+      __ cmp(r2, Operand(Factory::fixed_array_map()));
+      __ b(ne, &miss);
        break;

      default:
Index: src/version.cc
===================================================================
--- src/version.cc      (revision 2555)
+++ src/version.cc      (working copy)
@@ -35,7 +35,7 @@
  #define MAJOR_VERSION     1
  #define MINOR_VERSION     2
  #define BUILD_NUMBER      14
-#define PATCH_LEVEL       9
+#define PATCH_LEVEL       10
  #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