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 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 19 matching lines...) Expand all Loading... | |
30 V(Map, free_space_map, FreeSpaceMap) \ | 30 V(Map, free_space_map, FreeSpaceMap) \ |
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(Oddball, uninitialized_value, UninitializedValue) \ | 41 V(Oddball, uninitialized_value, UninitializedValue) \ |
41 V(Map, cell_map, CellMap) \ | 42 V(Map, cell_map, CellMap) \ |
42 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ | 43 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ |
43 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ | 44 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ |
44 V(Map, meta_map, MetaMap) \ | 45 V(Map, meta_map, MetaMap) \ |
45 V(Map, heap_number_map, HeapNumberMap) \ | 46 V(Map, heap_number_map, HeapNumberMap) \ |
46 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \ | 47 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \ |
47 V(Map, native_context_map, NativeContextMap) \ | 48 V(Map, native_context_map, NativeContextMap) \ |
48 V(Map, fixed_array_map, FixedArrayMap) \ | 49 V(Map, fixed_array_map, FixedArrayMap) \ |
49 V(Map, code_map, CodeMap) \ | 50 V(Map, code_map, CodeMap) \ |
50 V(Map, scope_info_map, ScopeInfoMap) \ | 51 V(Map, scope_info_map, ScopeInfoMap) \ |
51 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ | 52 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ |
52 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ | 53 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \ |
53 V(Map, constant_pool_array_map, ConstantPoolArrayMap) \ | 54 V(Map, constant_pool_array_map, ConstantPoolArrayMap) \ |
54 V(Map, weak_cell_map, WeakCellMap) \ | 55 V(Map, weak_cell_map, WeakCellMap) \ |
55 V(Map, one_byte_string_map, OneByteStringMap) \ | 56 V(Map, one_byte_string_map, OneByteStringMap) \ |
56 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \ | 57 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \ |
57 V(Map, function_context_map, FunctionContextMap) \ | 58 V(Map, function_context_map, FunctionContextMap) \ |
58 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ | 59 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ |
59 V(ByteArray, empty_byte_array, EmptyByteArray) \ | 60 V(ByteArray, empty_byte_array, EmptyByteArray) \ |
60 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ | 61 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ |
61 V(ConstantPoolArray, empty_constant_pool_array, EmptyConstantPoolArray) \ | 62 V(ConstantPoolArray, empty_constant_pool_array, EmptyConstantPoolArray) \ |
62 /* The roots above this line should be boring from a GC point of view. */ \ | 63 /* The roots above this line should be boring from a GC point of view. */ \ |
Yang
2015/04/10 09:23:36
I think there was a reason there were only 32 item
| |
63 /* This means they are never in new space and never on a page that is */ \ | 64 /* This means they are never in new space and never on a page that is */ \ |
64 /* being compacted. */ \ | 65 /* being compacted. */ \ |
65 V(Oddball, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ | 66 V(Oddball, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ |
66 V(Oddball, arguments_marker, ArgumentsMarker) \ | 67 V(Oddball, arguments_marker, ArgumentsMarker) \ |
67 V(Oddball, exception, Exception) \ | 68 V(Oddball, exception, Exception) \ |
68 V(Oddball, termination_exception, TerminationException) \ | 69 V(Oddball, termination_exception, TerminationException) \ |
69 V(FixedArray, number_string_cache, NumberStringCache) \ | 70 V(FixedArray, number_string_cache, NumberStringCache) \ |
70 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ | 71 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ |
71 V(Object, instanceof_cache_map, InstanceofCacheMap) \ | 72 V(Object, instanceof_cache_map, InstanceofCacheMap) \ |
72 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ | 73 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
207 V(proto_string, "__proto__") \ | 208 V(proto_string, "__proto__") \ |
208 V(arguments_string, "arguments") \ | 209 V(arguments_string, "arguments") \ |
209 V(Arguments_string, "Arguments") \ | 210 V(Arguments_string, "Arguments") \ |
210 V(caller_string, "caller") \ | 211 V(caller_string, "caller") \ |
211 V(boolean_string, "boolean") \ | 212 V(boolean_string, "boolean") \ |
212 V(Boolean_string, "Boolean") \ | 213 V(Boolean_string, "Boolean") \ |
213 V(callee_string, "callee") \ | 214 V(callee_string, "callee") \ |
214 V(constructor_string, "constructor") \ | 215 V(constructor_string, "constructor") \ |
215 V(dot_result_string, ".result") \ | 216 V(dot_result_string, ".result") \ |
216 V(eval_string, "eval") \ | 217 V(eval_string, "eval") \ |
217 V(empty_string, "") \ | |
218 V(function_string, "function") \ | 218 V(function_string, "function") \ |
219 V(Function_string, "Function") \ | 219 V(Function_string, "Function") \ |
220 V(length_string, "length") \ | 220 V(length_string, "length") \ |
221 V(name_string, "name") \ | 221 V(name_string, "name") \ |
222 V(null_string, "null") \ | 222 V(null_string, "null") \ |
223 V(number_string, "number") \ | 223 V(number_string, "number") \ |
224 V(Number_string, "Number") \ | 224 V(Number_string, "Number") \ |
225 V(nan_string, "NaN") \ | 225 V(nan_string, "NaN") \ |
226 V(source_string, "source") \ | 226 V(source_string, "source") \ |
227 V(source_url_string, "source_url") \ | 227 V(source_url_string, "source_url") \ |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
363 V(ScriptContextMap) \ | 363 V(ScriptContextMap) \ |
364 V(UndefinedMap) \ | 364 V(UndefinedMap) \ |
365 V(TheHoleMap) \ | 365 V(TheHoleMap) \ |
366 V(NullMap) \ | 366 V(NullMap) \ |
367 V(BooleanMap) \ | 367 V(BooleanMap) \ |
368 V(UninitializedMap) \ | 368 V(UninitializedMap) \ |
369 V(ArgumentsMarkerMap) \ | 369 V(ArgumentsMarkerMap) \ |
370 V(JSMessageObjectMap) \ | 370 V(JSMessageObjectMap) \ |
371 V(ForeignMap) \ | 371 V(ForeignMap) \ |
372 V(NeanderMap) \ | 372 V(NeanderMap) \ |
373 V(empty_string) \ | |
373 PRIVATE_SYMBOL_LIST(V) | 374 PRIVATE_SYMBOL_LIST(V) |
374 | 375 |
375 // Forward declarations. | 376 // Forward declarations. |
376 class HeapStats; | 377 class HeapStats; |
377 class Isolate; | 378 class Isolate; |
378 class WeakObjectRetainer; | 379 class WeakObjectRetainer; |
379 | 380 |
380 | 381 |
381 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, | 382 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, |
382 Object** pointer); | 383 Object** pointer); |
(...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2603 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2604 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2604 | 2605 |
2605 private: | 2606 private: |
2606 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2607 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2607 }; | 2608 }; |
2608 #endif // DEBUG | 2609 #endif // DEBUG |
2609 } | 2610 } |
2610 } // namespace v8::internal | 2611 } // namespace v8::internal |
2611 | 2612 |
2612 #endif // V8_HEAP_HEAP_H_ | 2613 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |