Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 89ac974e89e27b4c2e4c5a0b34ae5153cc3084f6..20e9eb541c3eca20fbb5086dcc8eafd5638147b9 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -3341,10 +3341,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); |
} |
@@ -5512,25 +5509,33 @@ 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); \ |
+#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) { \ |
+ 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); \ |
+ (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); \ |
+#define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \ |
+ STATIC_ASSERT(holder::offset % kPointerSize == PSEUDO_SMI_HI_ALIGN); \ |
INT_ACCESSORS(holder, name, offset) |