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

Unified Diff: src/heap/heap-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/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap-inl.h
diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
index d0078c879f91a0531ebb52a401bf9a5808c99a40..13235b25d417337a9f339a8e4502cd4fd896c60d 100644
--- a/src/heap/heap-inl.h
+++ b/src/heap/heap-inl.h
@@ -157,7 +157,7 @@ AllocationResult Heap::CopyConstantPoolArray(ConstantPoolArray* src) {
AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
AllocationSpace retry_space,
- Alignment alignment) {
+ AllocationAlignment alignment) {
DCHECK(AllowHandleAllocation::IsAllowed());
DCHECK(AllowHeapAllocation::IsAllowed());
DCHECK(gc_state_ == NOT_IN_GC);
@@ -174,10 +174,10 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
AllocationResult allocation;
if (NEW_SPACE == space) {
#ifndef V8_HOST_ARCH_64_BIT
- if (alignment == kDoubleAligned) {
- allocation = new_space_.AllocateRawDoubleAligned(size_in_bytes);
- } else {
+ if (alignment == kWordAligned) {
allocation = new_space_.AllocateRaw(size_in_bytes);
+ } else {
+ allocation = new_space_.AllocateRawAligned(size_in_bytes, alignment);
}
#else
allocation = new_space_.AllocateRaw(size_in_bytes);
@@ -194,10 +194,10 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
if (OLD_SPACE == space) {
#ifndef V8_HOST_ARCH_64_BIT
- if (alignment == kDoubleAligned) {
- allocation = old_space_->AllocateRawDoubleAligned(size_in_bytes);
- } else {
+ if (alignment == kWordAligned) {
allocation = old_space_->AllocateRaw(size_in_bytes);
+ } else {
+ allocation = old_space_->AllocateRawAligned(size_in_bytes, alignment);
}
#else
allocation = old_space_->AllocateRaw(size_in_bytes);
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698