Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index e2414d290046927d3d3f4a7e13d3b09e0311d5df..956716354ccd0ed2e77675dd32b3aecfa787f445 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -3327,10 +3327,7 @@ uint32_t Name::hash_field() { |
void Name::set_hash_field(uint32_t value) { |
- WRITE_UINT32_FIELD(this, kHashFieldOffset, value); |
-#if V8_HOST_ARCH_64_BIT |
- WRITE_UINT32_FIELD(this, kHashFieldOffset + kIntSize, 0); |
-#endif |
+ WRITE_INTPTR_FIELD(this, kHashFieldSlot, value); |
} |
@@ -5498,25 +5495,30 @@ SMI_ACCESSORS(SharedFunctionInfo, profiler_ticks, kProfilerTicksOffset) |
#else |
-#define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \ |
- STATIC_ASSERT(holder::offset % kPointerSize == 0); \ |
- int holder::name() const { \ |
- int value = READ_INT_FIELD(this, offset); \ |
- DCHECK(kHeapObjectTag == 1); \ |
- DCHECK((value & kHeapObjectTag) == 0); \ |
- return value >> 1; \ |
- } \ |
- void holder::set_##name(int value) { \ |
- DCHECK(kHeapObjectTag == 1); \ |
- DCHECK((value & 0xC0000000) == 0xC0000000 || \ |
- (value & 0xC0000000) == 0x0); \ |
- WRITE_INT_FIELD(this, \ |
- offset, \ |
- (value << 1) & ~kHeapObjectTag); \ |
- } |
- |
-#define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \ |
- STATIC_ASSERT(holder::offset % kPointerSize == kIntSize); \ |
+#if V8_TARGET_LITTLE_ENDIAN |
+#define PSEUDO_SMI_LO_ALIGN 0 |
+#define PSEUDO_SMI_HI_ALIGN kIntSize |
+#else |
+#define PSEUDO_SMI_LO_ALIGN kIntSize |
+#define PSEUDO_SMI_HI_ALIGN 0 |
+#endif |
+ |
+#define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \ |
+ STATIC_ASSERT(holder::offset % kPointerSize == PSEUDO_SMI_LO_ALIGN); \ |
+ int holder::name() const { \ |
+ int value = READ_INT_FIELD(this, offset); \ |
+ DCHECK(kHeapObjectTag == 1); \ |
+ DCHECK((value & kHeapObjectTag) == 0); \ |
+ return value >> 1; \ |
+ } \ |
+ void holder::set_##name(int value) { \ |
+ DCHECK(kHeapObjectTag == 1); \ |
+ DCHECK((value & 0xC0000000) == 0xC0000000 || (value & 0xC0000000) == 0x0); \ |
+ WRITE_INT_FIELD(this, offset, (value << 1) & ~kHeapObjectTag); \ |
+ } |
+ |
+#define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \ |
+ STATIC_ASSERT(holder::offset % kPointerSize == PSEUDO_SMI_HI_ALIGN); \ |
INT_ACCESSORS(holder, name, offset) |