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

Unified Diff: src/mark-compact.h

Issue 3679002: [Isolates] Remove more HEAP macros from GC. (Closed)
Patch Set: Created 10 years, 2 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 | « no previous file | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.h
diff --git a/src/mark-compact.h b/src/mark-compact.h
index a3df1e1edc46dc2306b93341aee72a36d87e9bb7..109d892e035215676d1f18cd5b723f98b1077571 100644
--- a/src/mark-compact.h
+++ b/src/mark-compact.h
@@ -109,7 +109,9 @@ class MarkCompactCollector {
// Object* that will be the object after forwarding. There is a separate
// allocation function for each (compactable) space based on the location
// of the object before compaction.
- typedef Object* (*AllocationFunction)(HeapObject* object, int object_size);
+ typedef Object* (*AllocationFunction)(Heap* heap,
+ HeapObject* object,
+ int object_size);
// Type of functions to encode the forwarding address for an object.
// Given the object, its size, and the new (non-failure) object it will be
@@ -119,7 +121,8 @@ class MarkCompactCollector {
// page as input, and is updated to contain the offset to be used for the
// next live object in the same page. For spaces using a different
// encoding (ie, contiguous spaces), the offset parameter is ignored.
- typedef void (*EncodingFunction)(HeapObject* old_object,
+ typedef void (*EncodingFunction)(Heap* heap,
+ HeapObject* old_object,
int object_size,
Object* new_object,
int* offset);
@@ -182,6 +185,8 @@ class MarkCompactCollector {
static const uint32_t kSingleFreeEncoding = 0;
static const uint32_t kMultiFreeEncoding = 1;
+ inline Heap* heap() const { return heap_; }
+
private:
MarkCompactCollector();
« no previous file with comments | « no previous file | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698