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

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

Issue 3226014: Add functionality for finding code objects from a pc that points into... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 3 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 | « src/liveedit.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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // completed full GC (expected to be zero). 114 // completed full GC (expected to be zero).
115 static int previous_marked_count() { return previous_marked_count_; } 115 static int previous_marked_count() { return previous_marked_count_; }
116 116
117 // During a full GC, there is a stack-allocated GCTracer that is used for 117 // During a full GC, there is a stack-allocated GCTracer that is used for
118 // bookkeeping information. Return a pointer to that tracer. 118 // bookkeeping information. Return a pointer to that tracer.
119 static GCTracer* tracer() { return tracer_; } 119 static GCTracer* tracer() { return tracer_; }
120 120
121 #ifdef DEBUG 121 #ifdef DEBUG
122 // Checks whether performing mark-compact collection. 122 // Checks whether performing mark-compact collection.
123 static bool in_use() { return state_ > PREPARE_GC; } 123 static bool in_use() { return state_ > PREPARE_GC; }
124 static bool are_map_pointers_encoded() { return state_ == UPDATE_POINTERS; }
124 #endif 125 #endif
125 126
126 // Determine type of object and emit deletion log event. 127 // Determine type of object and emit deletion log event.
127 static void ReportDeleteIfNeeded(HeapObject* obj); 128 static void ReportDeleteIfNeeded(HeapObject* obj);
128 129
130 // Distinguishable invalid map encodings (for single word and multiple words)
131 // that indicate free regions.
132 static const uint32_t kSingleFreeEncoding = 0;
133 static const uint32_t kMultiFreeEncoding = 1;
134
129 private: 135 private:
130 #ifdef DEBUG 136 #ifdef DEBUG
131 enum CollectorState { 137 enum CollectorState {
132 IDLE, 138 IDLE,
133 PREPARE_GC, 139 PREPARE_GC,
134 MARK_LIVE_OBJECTS, 140 MARK_LIVE_OBJECTS,
135 SWEEP_SPACES, 141 SWEEP_SPACES,
136 ENCODE_FORWARDING_ADDRESSES, 142 ENCODE_FORWARDING_ADDRESSES,
137 UPDATE_POINTERS, 143 UPDATE_POINTERS,
138 RELOCATE_OBJECTS 144 RELOCATE_OBJECTS
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 456
451 friend class UnmarkObjectVisitor; 457 friend class UnmarkObjectVisitor;
452 static void UnmarkObject(HeapObject* obj); 458 static void UnmarkObject(HeapObject* obj);
453 #endif 459 #endif
454 }; 460 };
455 461
456 462
457 } } // namespace v8::internal 463 } } // namespace v8::internal
458 464
459 #endif // V8_MARK_COMPACT_H_ 465 #endif // V8_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/liveedit.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698