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

Side by Side Diff: src/heap.h

Issue 273653006: Cleaned up the weak lists hanging off the heap a bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 7 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 INTERNALIZED_STRING_LIST(STRING_ACCESSOR) 826 INTERNALIZED_STRING_LIST(STRING_ACCESSOR)
827 #undef STRING_ACCESSOR 827 #undef STRING_ACCESSOR
828 828
829 // The hidden_string is special because it is the empty string, but does 829 // The hidden_string is special because it is the empty string, but does
830 // not match the empty string. 830 // not match the empty string.
831 String* hidden_string() { return hidden_string_; } 831 String* hidden_string() { return hidden_string_; }
832 832
833 void set_native_contexts_list(Object* object) { 833 void set_native_contexts_list(Object* object) {
834 native_contexts_list_ = object; 834 native_contexts_list_ = object;
835 } 835 }
836 Object* native_contexts_list() { return native_contexts_list_; } 836 Object* native_contexts_list() const { return native_contexts_list_; }
837 837
838 void set_array_buffers_list(Object* object) { 838 void set_array_buffers_list(Object* object) {
839 array_buffers_list_ = object; 839 array_buffers_list_ = object;
840 } 840 }
841 Object* array_buffers_list() { return array_buffers_list_; } 841 Object* array_buffers_list() const { return array_buffers_list_; }
842 842
843 void set_allocation_sites_list(Object* object) { 843 void set_allocation_sites_list(Object* object) {
844 allocation_sites_list_ = object; 844 allocation_sites_list_ = object;
845 } 845 }
846 Object* allocation_sites_list() { return allocation_sites_list_; } 846 Object* allocation_sites_list() { return allocation_sites_list_; }
847
848 // Used in CreateAllocationSiteStub and the (de)serializer.
847 Object** allocation_sites_list_address() { return &allocation_sites_list_; } 849 Object** allocation_sites_list_address() { return &allocation_sites_list_; }
848 850
849 Object* weak_object_to_code_table() { return weak_object_to_code_table_; } 851 Object* weak_object_to_code_table() { return weak_object_to_code_table_; }
850 852
851 // Number of mark-sweeps. 853 // Number of mark-sweeps.
852 unsigned int ms_count() { return ms_count_; } 854 unsigned int ms_count() { return ms_count_; }
853 855
854 // Iterates over all roots in the heap. 856 // Iterates over all roots in the heap.
855 void IterateRoots(ObjectVisitor* v, VisitMode mode); 857 void IterateRoots(ObjectVisitor* v, VisitMode mode);
856 // Iterates over all strong roots in the heap. 858 // Iterates over all strong roots in the heap.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 roots_[kMaterializedObjectsRootIndex] = objects; 931 roots_[kMaterializedObjectsRootIndex] = objects;
930 } 932 }
931 933
932 // Generated code can embed this address to get access to the roots. 934 // Generated code can embed this address to get access to the roots.
933 Object** roots_array_start() { return roots_; } 935 Object** roots_array_start() { return roots_; }
934 936
935 Address* store_buffer_top_address() { 937 Address* store_buffer_top_address() {
936 return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]); 938 return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]);
937 } 939 }
938 940
939 // Get address of native contexts list for serialization support.
940 Object** native_contexts_list_address() {
941 return &native_contexts_list_;
942 }
943
944 #ifdef VERIFY_HEAP 941 #ifdef VERIFY_HEAP
945 // Verify the heap is in its normal state before or after a GC. 942 // Verify the heap is in its normal state before or after a GC.
946 void Verify(); 943 void Verify();
947 944
948 945
949 bool weak_embedded_objects_verification_enabled() { 946 bool weak_embedded_objects_verification_enabled() {
950 return no_weak_object_verification_scope_depth_ == 0; 947 return no_weak_object_verification_scope_depth_ == 0;
951 } 948 }
952 #endif 949 #endif
953 950
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after
2821 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2818 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2822 2819
2823 private: 2820 private:
2824 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2821 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2825 }; 2822 };
2826 #endif // DEBUG 2823 #endif // DEBUG
2827 2824
2828 } } // namespace v8::internal 2825 } } // namespace v8::internal
2829 2826
2830 #endif // V8_HEAP_H_ 2827 #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