Enable inobject double fields unboxing for 64-bit archs.
authorishell <ishell@chromium.org>
Sat, 22 Nov 2014 17:30:15 +0000 (09:30 -0800)
committerCommit bot <commit-bot@chromium.org>
Sat, 22 Nov 2014 17:30:27 +0000 (17:30 +0000)
Review URL: https://codereview.chromium.org/753503002

Cr-Commit-Position: refs/heads/master@{#25469}

src/globals.h
src/heap/mark-compact.cc
src/heap/store-buffer.cc
test/cctest/test-unboxed-doubles.cc

index 937c4ac..7188078 100644 (file)
@@ -84,7 +84,7 @@ namespace internal {
 
 // Determine whether double field unboxing feature is enabled.
 #if (V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64)
-#define V8_DOUBLE_FIELDS_UNBOXING 0
+#define V8_DOUBLE_FIELDS_UNBOXING 1
 #else
 #define V8_DOUBLE_FIELDS_UNBOXING 0
 #endif
index 9c481b0..59f5302 100644 (file)
@@ -2764,7 +2764,8 @@ void MarkCompactCollector::MigrateObject(HeapObject* dst, HeapObject* src,
 
 #if V8_DOUBLE_FIELDS_UNBOXING
       if (!may_contain_raw_values &&
-          (has_only_tagged_fields || helper.IsTagged(src_slot - src_addr)))
+          (has_only_tagged_fields ||
+           helper.IsTagged(static_cast<int>(src_slot - src_addr))))
 #else
       if (!may_contain_raw_values)
 #endif
index 4b94a95..5fd4ce3 100644 (file)
@@ -519,7 +519,7 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback,
                 if (!has_only_tagged_fields) {
                   for (Address slot = start_address; slot < end_address;
                        slot += kPointerSize) {
-                    if (helper.IsTagged(slot - obj_address)) {
+                    if (helper.IsTagged(static_cast<int>(slot - obj_address))) {
                       // TODO(ishell): call this once for contiguous region
                       // of tagged fields.
                       FindPointersToNewSpaceInRegion(slot, slot + kPointerSize,
index 3359771..19bad38 100644 (file)
@@ -37,7 +37,7 @@ enum PropertyKind {
   PROP_SMI,
   PROP_DOUBLE,
   PROP_TAGGED,
-  PROP_KIND_NUMBER,
+  PROP_KIND_NUMBER
 };
 
 static Representation representations[PROP_KIND_NUMBER] = {