Revision: 2558
Author: [email protected]
Date: Tue Jul 28 06:14:21 2009
Log: 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.
Review URL: http://codereview.chromium.org/160270
http://code.google.com/p/v8/source/detail?r=2558
Modified:
/branches/1.2/src/arm/stub-cache-arm.cc
/branches/1.2/src/ia32/stub-cache-ia32.cc
/branches/1.2/src/objects.cc
/branches/1.2/src/version.cc
=======================================
--- /branches/1.2/src/arm/stub-cache-arm.cc Wed Jul 15 01:24:12 2009
+++ /branches/1.2/src/arm/stub-cache-arm.cc Tue Jul 28 06:14:21 2009
@@ -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:
=======================================
--- /branches/1.2/src/ia32/stub-cache-ia32.cc Mon Jul 13 07:04:26 2009
+++ /branches/1.2/src/ia32/stub-cache-ia32.cc Tue Jul 28 06:14:21 2009
@@ -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:
=======================================
--- /branches/1.2/src/objects.cc Tue Jul 28 04:43:17 2009
+++ /branches/1.2/src/objects.cc Tue Jul 28 06:14:21 2009
@@ -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;
- }
- } else if (value->IsUndefined()) {
- 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 {
- // 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;
=======================================
--- /branches/1.2/src/version.cc Tue Jul 28 04:43:17 2009
+++ /branches/1.2/src/version.cc Tue Jul 28 06:14:21 2009
@@ -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
-~----------~----~----~----~------~----~------~--~---