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

Side by Side Diff: src/heap.h

Issue 310783003: Visit encountered JSWeakCollection list during scavenging. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/heap.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_H_ 5 #ifndef V8_HEAP_H_
6 #define V8_HEAP_H_ 6 #define V8_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "allocation.h" 10 #include "allocation.h"
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 void set_allocation_sites_list(Object* object) { 842 void set_allocation_sites_list(Object* object) {
843 allocation_sites_list_ = object; 843 allocation_sites_list_ = object;
844 } 844 }
845 Object* allocation_sites_list() { return allocation_sites_list_; } 845 Object* allocation_sites_list() { return allocation_sites_list_; }
846 846
847 // Used in CreateAllocationSiteStub and the (de)serializer. 847 // Used in CreateAllocationSiteStub and the (de)serializer.
848 Object** allocation_sites_list_address() { return &allocation_sites_list_; } 848 Object** allocation_sites_list_address() { return &allocation_sites_list_; }
849 849
850 Object* weak_object_to_code_table() { return weak_object_to_code_table_; } 850 Object* weak_object_to_code_table() { return weak_object_to_code_table_; }
851 851
852 void set_encountered_weak_collections(Object* weak_collection) {
853 encountered_weak_collections_ = weak_collection;
854 }
855 Object* encountered_weak_collections() const {
856 return encountered_weak_collections_;
857 }
858
852 // Number of mark-sweeps. 859 // Number of mark-sweeps.
853 unsigned int ms_count() { return ms_count_; } 860 unsigned int ms_count() { return ms_count_; }
854 861
855 // Iterates over all roots in the heap. 862 // Iterates over all roots in the heap.
856 void IterateRoots(ObjectVisitor* v, VisitMode mode); 863 void IterateRoots(ObjectVisitor* v, VisitMode mode);
857 // Iterates over all strong roots in the heap. 864 // Iterates over all strong roots in the heap.
858 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); 865 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode);
859 // Iterates over entries in the smi roots list. Only interesting to the 866 // Iterates over entries in the smi roots list. Only interesting to the
860 // serializer/deserializer, since GC does not care about smis. 867 // serializer/deserializer, since GC does not care about smis.
861 void IterateSmiRoots(ObjectVisitor* v); 868 void IterateSmiRoots(ObjectVisitor* v);
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 // List heads are initilized lazily and contain the undefined_value at start. 1605 // List heads are initilized lazily and contain the undefined_value at start.
1599 Object* native_contexts_list_; 1606 Object* native_contexts_list_;
1600 Object* array_buffers_list_; 1607 Object* array_buffers_list_;
1601 Object* allocation_sites_list_; 1608 Object* allocation_sites_list_;
1602 1609
1603 // WeakHashTable that maps objects embedded in optimized code to dependent 1610 // WeakHashTable that maps objects embedded in optimized code to dependent
1604 // code list. It is initilized lazily and contains the undefined_value at 1611 // code list. It is initilized lazily and contains the undefined_value at
1605 // start. 1612 // start.
1606 Object* weak_object_to_code_table_; 1613 Object* weak_object_to_code_table_;
1607 1614
1615 // List of encountered weak collections (JSWeakMap and JSWeakSet) during
1616 // marking. It is initialized during marking, destroyed after marking and
1617 // contains Smi(0) while marking is not active.
1618 Object* encountered_weak_collections_;
1619
1608 StoreBufferRebuilder store_buffer_rebuilder_; 1620 StoreBufferRebuilder store_buffer_rebuilder_;
1609 1621
1610 struct StringTypeTable { 1622 struct StringTypeTable {
1611 InstanceType type; 1623 InstanceType type;
1612 int size; 1624 int size;
1613 RootListIndex index; 1625 RootListIndex index;
1614 }; 1626 };
1615 1627
1616 struct ConstantStringTable { 1628 struct ConstantStringTable {
1617 const char* contents; 1629 const char* contents;
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2761 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2773 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2762 2774
2763 private: 2775 private:
2764 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2776 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2765 }; 2777 };
2766 #endif // DEBUG 2778 #endif // DEBUG
2767 2779
2768 } } // namespace v8::internal 2780 } } // namespace v8::internal
2769 2781
2770 #endif // V8_HEAP_H_ 2782 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698