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

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

Issue 8889046: Merge r10215 from the bleeding_edge to the 3.6 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.6/
Patch Set: Created 9 years 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 | « src/api.cc ('k') | 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 private: 89 private:
90 HeapObject** low_; 90 HeapObject** low_;
91 HeapObject** top_; 91 HeapObject** top_;
92 HeapObject** high_; 92 HeapObject** high_;
93 bool overflowed_; 93 bool overflowed_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(MarkingStack); 95 DISALLOW_COPY_AND_ASSIGN(MarkingStack);
96 }; 96 };
97 97
98 98
99 // Defined in isolate.h.
100 class ThreadLocalTop;
101
102
99 // ------------------------------------------------------------------------- 103 // -------------------------------------------------------------------------
100 // Mark-Compact collector 104 // Mark-Compact collector
101 105
102 class OverflowedObjectsScanner; 106 class OverflowedObjectsScanner;
103 107
104 class MarkCompactCollector { 108 class MarkCompactCollector {
105 public: 109 public:
106 // Type of functions to compute forwarding addresses of objects in 110 // Type of functions to compute forwarding addresses of objects in
107 // compacted spaces. Given an object and its size, return a (non-failure) 111 // compacted spaces. Given an object and its size, return a (non-failure)
108 // Object* that will be the object after forwarding. There is a separate 112 // Object* that will be the object after forwarding. There is a separate
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 // 250 //
247 // After: Live objects are marked and non-live objects are unmarked. 251 // After: Live objects are marked and non-live objects are unmarked.
248 252
249 253
250 friend class RootMarkingVisitor; 254 friend class RootMarkingVisitor;
251 friend class MarkingVisitor; 255 friend class MarkingVisitor;
252 friend class StaticMarkingVisitor; 256 friend class StaticMarkingVisitor;
253 friend class CodeMarkingVisitor; 257 friend class CodeMarkingVisitor;
254 friend class SharedFunctionInfoMarkingVisitor; 258 friend class SharedFunctionInfoMarkingVisitor;
255 259
260 // Mark non-optimize code for functions inlined into the given optimized
261 // code. This will prevent it from being flushed.
262 void MarkInlinedFunctionsCode(Code* code);
263
264 // Mark code objects that are active on the stack to prevent them
265 // from being flushed.
266 void PrepareThreadForCodeFlushing(Isolate* isolate, ThreadLocalTop* top);
267
256 void PrepareForCodeFlushing(); 268 void PrepareForCodeFlushing();
257 269
258 // Marking operations for objects reachable from roots. 270 // Marking operations for objects reachable from roots.
259 void MarkLiveObjects(); 271 void MarkLiveObjects();
260 272
261 void MarkUnmarkedObject(HeapObject* obj); 273 void MarkUnmarkedObject(HeapObject* obj);
262 274
263 inline void MarkObject(HeapObject* obj) { 275 inline void MarkObject(HeapObject* obj) {
264 if (!obj->IsMarked()) MarkUnmarkedObject(obj); 276 if (!obj->IsMarked()) MarkUnmarkedObject(obj);
265 } 277 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 Object* encountered_weak_maps_; 529 Object* encountered_weak_maps_;
518 530
519 friend class Heap; 531 friend class Heap;
520 friend class OverflowedObjectsScanner; 532 friend class OverflowedObjectsScanner;
521 }; 533 };
522 534
523 535
524 } } // namespace v8::internal 536 } } // namespace v8::internal
525 537
526 #endif // V8_MARK_COMPACT_H_ 538 #endif // V8_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698