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

Side by Side Diff: src/mark-compact.h

Issue 6756021: Pass in isolate when reporting deletion of objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // page as input, and is updated to contain the offset to be used for the 122 // page as input, and is updated to contain the offset to be used for the
123 // next live object in the same page. For spaces using a different 123 // next live object in the same page. For spaces using a different
124 // encoding (ie, contiguous spaces), the offset parameter is ignored. 124 // encoding (ie, contiguous spaces), the offset parameter is ignored.
125 typedef void (*EncodingFunction)(Heap* heap, 125 typedef void (*EncodingFunction)(Heap* heap,
126 HeapObject* old_object, 126 HeapObject* old_object,
127 int object_size, 127 int object_size,
128 Object* new_object, 128 Object* new_object,
129 int* offset); 129 int* offset);
130 130
131 // Type of functions to process non-live objects. 131 // Type of functions to process non-live objects.
132 typedef void (*ProcessNonLiveFunction)(HeapObject* object); 132 typedef void (*ProcessNonLiveFunction)(HeapObject* object, Isolate* isolate);
133 133
134 // Pointer to member function, used in IterateLiveObjects. 134 // Pointer to member function, used in IterateLiveObjects.
135 typedef int (MarkCompactCollector::*LiveObjectCallback)(HeapObject* obj); 135 typedef int (MarkCompactCollector::*LiveObjectCallback)(HeapObject* obj);
136 136
137 // Set the global force_compaction flag, it must be called before Prepare 137 // Set the global force_compaction flag, it must be called before Prepare
138 // to take effect. 138 // to take effect.
139 void SetForceCompaction(bool value) { 139 void SetForceCompaction(bool value) {
140 force_compaction_ = value; 140 force_compaction_ = value;
141 } 141 }
142 142
(...skipping 29 matching lines...) Expand all
172 // bookkeeping information. Return a pointer to that tracer. 172 // bookkeeping information. Return a pointer to that tracer.
173 GCTracer* tracer() { return tracer_; } 173 GCTracer* tracer() { return tracer_; }
174 174
175 #ifdef DEBUG 175 #ifdef DEBUG
176 // Checks whether performing mark-compact collection. 176 // Checks whether performing mark-compact collection.
177 bool in_use() { return state_ > PREPARE_GC; } 177 bool in_use() { return state_ > PREPARE_GC; }
178 bool are_map_pointers_encoded() { return state_ == UPDATE_POINTERS; } 178 bool are_map_pointers_encoded() { return state_ == UPDATE_POINTERS; }
179 #endif 179 #endif
180 180
181 // Determine type of object and emit deletion log event. 181 // Determine type of object and emit deletion log event.
182 static void ReportDeleteIfNeeded(HeapObject* obj); 182 static void ReportDeleteIfNeeded(HeapObject* obj, Isolate* isolate);
183 183
184 // Returns size of a possibly marked object. 184 // Returns size of a possibly marked object.
185 static int SizeOfMarkedObject(HeapObject* obj); 185 static int SizeOfMarkedObject(HeapObject* obj);
186 186
187 // Distinguishable invalid map encodings (for single word and multiple words) 187 // Distinguishable invalid map encodings (for single word and multiple words)
188 // that indicate free regions. 188 // that indicate free regions.
189 static const uint32_t kSingleFreeEncoding = 0; 189 static const uint32_t kSingleFreeEncoding = 0;
190 static const uint32_t kMultiFreeEncoding = 1; 190 static const uint32_t kMultiFreeEncoding = 1;
191 191
192 inline Heap* heap() const { return heap_; } 192 inline Heap* heap() const { return heap_; }
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 CodeFlusher* code_flusher_; 499 CodeFlusher* code_flusher_;
500 500
501 friend class Heap; 501 friend class Heap;
502 friend class OverflowedObjectsScanner; 502 friend class OverflowedObjectsScanner;
503 }; 503 };
504 504
505 505
506 } } // namespace v8::internal 506 } } // namespace v8::internal
507 507
508 #endif // V8_MARK_COMPACT_H_ 508 #endif // V8_MARK_COMPACT_H_
OLDNEW
« 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