Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(814)

Unified Diff: src/objects-inl.h

Issue 1141523002: Implement unaligned allocate and allocate heap numbers in runtime double unaligned. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index cc264f6aef251d4680e4bb4b1621353a74f18483..6d0d4913b57861617c11eca5722fb5b1e8b1a8b4 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2812,13 +2812,22 @@ WriteBarrierMode HeapObject::GetWriteBarrierMode(
bool HeapObject::NeedsToEnsureDoubleAlignment() {
-#ifndef V8_HOST_ARCH_64_BIT
+#ifdef V8_HOST_ARCH_32_BIT
return (IsFixedFloat64Array() || IsFixedDoubleArray() ||
IsConstantPoolArray()) &&
FixedArrayBase::cast(this)->length() != 0;
#else
return false;
-#endif // V8_HOST_ARCH_64_BIT
+#endif // V8_HOST_ARCH_32_BIT
+}
+
+
+bool HeapObject::NeedsToEnsureDoubleUnalignment() {
+#ifdef V8_HOST_ARCH_32_BIT
+ return IsHeapNumber();
+#else
+ return false;
+#endif // V8_HOST_ARCH_32_BIT
}
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698