OLD | NEW |
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_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ | 31 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ |
32 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ | 32 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ |
33 /* Cluster the most popular ones in a few cache lines here at the top. */ \ | 33 /* Cluster the most popular ones in a few cache lines here at the top. */ \ |
34 V(Smi, store_buffer_top, StoreBufferTop) \ | 34 V(Smi, store_buffer_top, StoreBufferTop) \ |
35 V(Oddball, undefined_value, UndefinedValue) \ | 35 V(Oddball, undefined_value, UndefinedValue) \ |
36 V(Oddball, the_hole_value, TheHoleValue) \ | 36 V(Oddball, the_hole_value, TheHoleValue) \ |
37 V(Oddball, null_value, NullValue) \ | 37 V(Oddball, null_value, NullValue) \ |
38 V(Oddball, true_value, TrueValue) \ | 38 V(Oddball, true_value, TrueValue) \ |
39 V(Oddball, false_value, FalseValue) \ | 39 V(Oddball, false_value, FalseValue) \ |
40 V(String, empty_string, empty_string) \ | 40 V(String, empty_string, empty_string) \ |
| 41 V(String, hidden_string, hidden_string) \ |
41 V(Oddball, uninitialized_value, UninitializedValue) \ | 42 V(Oddball, uninitialized_value, UninitializedValue) \ |
42 V(Map, cell_map, CellMap) \ | 43 V(Map, cell_map, CellMap) \ |
43 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ | 44 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ |
44 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ | 45 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ |
45 V(Map, meta_map, MetaMap) \ | 46 V(Map, meta_map, MetaMap) \ |
46 V(Map, heap_number_map, HeapNumberMap) \ | 47 V(Map, heap_number_map, HeapNumberMap) \ |
47 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \ | 48 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \ |
48 V(Map, float32x4_map, Float32x4Map) \ | 49 V(Map, float32x4_map, Float32x4Map) \ |
49 V(Map, int32x4_map, Int32x4Map) \ | 50 V(Map, int32x4_map, Int32x4Map) \ |
50 V(Map, bool32x4_map, Bool32x4Map) \ | 51 V(Map, bool32x4_map, Bool32x4Map) \ |
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 #undef STRING_ACCESSOR | 916 #undef STRING_ACCESSOR |
916 | 917 |
917 #define SYMBOL_ACCESSOR(name) inline Symbol* name(); | 918 #define SYMBOL_ACCESSOR(name) inline Symbol* name(); |
918 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR) | 919 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR) |
919 #undef SYMBOL_ACCESSOR | 920 #undef SYMBOL_ACCESSOR |
920 | 921 |
921 #define SYMBOL_ACCESSOR(name, varname, description) inline Symbol* name(); | 922 #define SYMBOL_ACCESSOR(name, varname, description) inline Symbol* name(); |
922 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR) | 923 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR) |
923 #undef SYMBOL_ACCESSOR | 924 #undef SYMBOL_ACCESSOR |
924 | 925 |
925 // The hidden_string is special because it is the empty string, but does | |
926 // not match the empty string. | |
927 String* hidden_string() { return hidden_string_; } | |
928 | |
929 void set_native_contexts_list(Object* object) { | 926 void set_native_contexts_list(Object* object) { |
930 native_contexts_list_ = object; | 927 native_contexts_list_ = object; |
931 } | 928 } |
932 Object* native_contexts_list() const { return native_contexts_list_; } | 929 Object* native_contexts_list() const { return native_contexts_list_; } |
933 | 930 |
934 void set_allocation_sites_list(Object* object) { | 931 void set_allocation_sites_list(Object* object) { |
935 allocation_sites_list_ = object; | 932 allocation_sites_list_ = object; |
936 } | 933 } |
937 Object* allocation_sites_list() { return allocation_sites_list_; } | 934 Object* allocation_sites_list() { return allocation_sites_list_; } |
938 | 935 |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 struct StructTable { | 1798 struct StructTable { |
1802 InstanceType type; | 1799 InstanceType type; |
1803 int size; | 1800 int size; |
1804 RootListIndex index; | 1801 RootListIndex index; |
1805 }; | 1802 }; |
1806 | 1803 |
1807 static const StringTypeTable string_type_table[]; | 1804 static const StringTypeTable string_type_table[]; |
1808 static const ConstantStringTable constant_string_table[]; | 1805 static const ConstantStringTable constant_string_table[]; |
1809 static const StructTable struct_table[]; | 1806 static const StructTable struct_table[]; |
1810 | 1807 |
1811 // The special hidden string which is an empty string, but does not match | |
1812 // any string when looked up in properties. | |
1813 String* hidden_string_; | |
1814 | |
1815 void AddPrivateGlobalSymbols(Handle<Object> private_intern_table); | 1808 void AddPrivateGlobalSymbols(Handle<Object> private_intern_table); |
1816 | 1809 |
1817 struct GCCallbackPair { | 1810 struct GCCallbackPair { |
1818 GCCallbackPair(v8::Isolate::GCCallback callback, GCType gc_type, | 1811 GCCallbackPair(v8::Isolate::GCCallback callback, GCType gc_type, |
1819 bool pass_isolate) | 1812 bool pass_isolate) |
1820 : callback(callback), gc_type(gc_type), pass_isolate(pass_isolate) {} | 1813 : callback(callback), gc_type(gc_type), pass_isolate(pass_isolate) {} |
1821 | 1814 |
1822 bool operator==(const GCCallbackPair& other) const { | 1815 bool operator==(const GCCallbackPair& other) const { |
1823 return other.callback == callback; | 1816 return other.callback == callback; |
1824 } | 1817 } |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2703 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2696 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2704 | 2697 |
2705 private: | 2698 private: |
2706 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2699 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2707 }; | 2700 }; |
2708 #endif // DEBUG | 2701 #endif // DEBUG |
2709 } | 2702 } |
2710 } // namespace v8::internal | 2703 } // namespace v8::internal |
2711 | 2704 |
2712 #endif // V8_HEAP_HEAP_H_ | 2705 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |