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

Unified Diff: src/heap/heap.h

Issue 200443004: Move left and right trimming of FixedArray into Heap. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Hannes Payer. Created 6 years, 4 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/elements.cc ('k') | src/heap/heap.cc » ('j') | src/heap/heap.cc » ('J')
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 23159734cf595ad3f6e944e96fe1f87fcc93d913..528ef4d517e2d5536f639418aeec85ab30137f16 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -700,16 +700,26 @@ class Heap {
inline void FinalizeExternalString(String* string);
// Initialize a filler object to keep the ability to iterate over the heap
- // when shortening objects.
+ // when introducing gaps within pages.
void CreateFillerObjectAt(Address addr, int size);
bool CanMoveObjectStart(HeapObject* object);
+ // Indicates whether live bytes adjustment is triggered from within the GC
+ // code or from mutator code.
enum InvocationMode { FROM_GC, FROM_MUTATOR };
- // Maintain marking consistency for IncrementalMarking.
+ // Maintain consistency of live bytes during incremental marking.
void AdjustLiveBytes(Address address, int by, InvocationMode mode);
+ // Trim the given array from the left. Note that this relocates the object
+ // start and hence is only valid if there is only a single reference to it.
+ FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim);
+
+ // Trim the given array from the right.
+ template<Heap::InvocationMode mode>
+ void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim);
+
// Converts the given boolean condition to JavaScript boolean value.
inline Object* ToBoolean(bool condition);
« no previous file with comments | « src/elements.cc ('k') | src/heap/heap.cc » ('j') | src/heap/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698