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

Unified Diff: src/heap/mark-compact.cc

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/heap/heap-inl.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index be9938b4a1b5eb9ef06f597728a39a0f53dc5fbf..0da364b621cb997370bbe9298d929146e59006f2 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -1942,9 +1942,9 @@ int MarkCompactCollector::DiscoverAndEvacuateBlackObjectsOnPage(
}
AllocationResult allocation;
-#ifndef V8_HOST_ARCH_64_BIT
+#ifdef V8_HOST_ARCH_32_BIT
if (object->NeedsToEnsureDoubleAlignment()) {
- allocation = new_space->AllocateRawDoubleAligned(size);
+ allocation = new_space->AllocateRawAligned(size, kDoubleAligned);
} else {
allocation = new_space->AllocateRaw(size);
}
@@ -1958,9 +1958,9 @@ int MarkCompactCollector::DiscoverAndEvacuateBlackObjectsOnPage(
// always room.
UNREACHABLE();
}
-#ifndef V8_HOST_ARCH_64_BIT
+#ifdef V8_HOST_ARCH_32_BIT
if (object->NeedsToEnsureDoubleAlignment()) {
- allocation = new_space->AllocateRawDoubleAligned(size);
+ allocation = new_space->AllocateRawAligned(size, kDoubleAligned);
} else {
allocation = new_space->AllocateRaw(size);
}
@@ -3120,9 +3120,9 @@ bool MarkCompactCollector::TryPromoteObject(HeapObject* object,
HeapObject* target;
AllocationResult allocation;
-#ifndef V8_HOST_ARCH_64_BIT
+#ifdef V8_HOST_ARCH_32_BIT
if (object->NeedsToEnsureDoubleAlignment()) {
- allocation = old_space->AllocateRawDoubleAligned(object_size);
+ allocation = old_space->AllocateRawAligned(object_size, kDoubleAligned);
} else {
allocation = old_space->AllocateRaw(object_size);
}
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698