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

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

Issue 7553012: Prototype of mark-and-compact support for Harmony weak maps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // compacting or not, because the large object space is never compacted. 322 // compacting or not, because the large object space is never compacted.
323 void SweepLargeObjectSpace(); 323 void SweepLargeObjectSpace();
324 324
325 // Test whether a (possibly marked) object is a Map. 325 // Test whether a (possibly marked) object is a Map.
326 static inline bool SafeIsMap(HeapObject* object); 326 static inline bool SafeIsMap(HeapObject* object);
327 327
328 // Map transitions from a live map to a dead map must be killed. 328 // Map transitions from a live map to a dead map must be killed.
329 // We replace them with a null descriptor, with the same key. 329 // We replace them with a null descriptor, with the same key.
330 void ClearNonLiveTransitions(); 330 void ClearNonLiveTransitions();
331 331
332 // Mark all values associated with reachable keys in weak maps encountered
333 // so far. This might push new object or even new weak maps onto the
334 // marking stack.
335 void ProcessWeakMaps();
336
337 // After all reachable objects have been marked those weak map entries
338 // with an unreachable key are removed from all encountered weak maps.
339 // The linked list of all encountered weak maps is destroyed.
340 void ClearWeakMaps();
341
332 // ----------------------------------------------------------------------- 342 // -----------------------------------------------------------------------
333 // Phase 2: Sweeping to clear mark bits and free non-live objects for 343 // Phase 2: Sweeping to clear mark bits and free non-live objects for
334 // a non-compacting collection, or else computing and encoding 344 // a non-compacting collection, or else computing and encoding
335 // forwarding addresses for a compacting collection. 345 // forwarding addresses for a compacting collection.
336 // 346 //
337 // Before: Live objects are marked and non-live objects are unmarked. 347 // Before: Live objects are marked and non-live objects are unmarked.
338 // 348 //
339 // After: (Non-compacting collection.) Live objects are unmarked, 349 // After: (Non-compacting collection.) Live objects are unmarked,
340 // non-live regions have been added to their space's free 350 // non-live regions have been added to their space's free
341 // list. 351 // list.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 CodeFlusher* code_flusher_; 511 CodeFlusher* code_flusher_;
502 512
503 friend class Heap; 513 friend class Heap;
504 friend class OverflowedObjectsScanner; 514 friend class OverflowedObjectsScanner;
505 }; 515 };
506 516
507 517
508 } } // namespace v8::internal 518 } } // namespace v8::internal
509 519
510 #endif // V8_MARK_COMPACT_H_ 520 #endif // V8_MARK_COMPACT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698