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

Unified Diff: src/heap/heap.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/globals.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index e31708d8014a3adcf96677868956a772f234daf6..e50c6ba77e1dfe71eb0f9ab2c1f02f95baf99655 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -719,7 +719,10 @@ class Heap {
// This method assumes overallocation of one word. It will store a filler
// before the object if the given object is not double aligned, otherwise
// it will place the filler after the object.
- MUST_USE_RESULT HeapObject* EnsureDoubleAligned(HeapObject* object, int size);
+ MUST_USE_RESULT HeapObject* EnsureAligned(HeapObject* object, int size,
+ AllocationAlignment alignment);
+
+ MUST_USE_RESULT HeapObject* PrecedeWithFiller(HeapObject* object);
// Clear the Instanceof cache (used when a prototype changes).
inline void ClearInstanceofCache();
@@ -1819,15 +1822,13 @@ class Heap {
HeapObject* DoubleAlignForDeserialization(HeapObject* object, int size);
- enum Alignment { kWordAligned, kDoubleAligned };
-
// Allocate an uninitialized object. The memory is non-executable if the
// hardware and OS allow. This is the single choke-point for allocations
// performed by the runtime and should not be bypassed (to extend this to
// inlined allocations, use the Heap::DisableInlineAllocation() support).
MUST_USE_RESULT inline AllocationResult AllocateRaw(
int size_in_bytes, AllocationSpace space, AllocationSpace retry_space,
- Alignment aligment = kWordAligned);
+ AllocationAlignment aligment = kWordAligned);
// Allocates a heap object based on the map.
MUST_USE_RESULT AllocationResult
« no previous file with comments | « src/globals.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698