| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 28 #ifndef V8_HEAP_H_ | 28 #ifndef V8_HEAP_H_ |
| 29 #define V8_HEAP_H_ | 29 #define V8_HEAP_H_ |
| 30 | 30 |
| 31 #include "zone-inl.h" | 31 #include "zone-inl.h" |
| 32 | 32 |
| 33 namespace v8 { | 33 namespace v8 { |
| 34 namespace internal { | 34 namespace internal { |
| 35 | 35 |
| 36 // Defines all the roots in Heap. | 36 // Defines all the roots in Heap. |
| 37 #define STRONG_ROOT_LIST(V) \ | 37 #define STRONG_ROOT_LIST(V) \ |
| 38 /* Cluster the most popular ones in a few cache lines here at the top. */ \ |
| 39 V(Smi, stack_limit, StackLimit) \ |
| 40 V(Object, undefined_value, UndefinedValue) \ |
| 41 V(Object, the_hole_value, TheHoleValue) \ |
| 42 V(Object, null_value, NullValue) \ |
| 43 V(Object, true_value, TrueValue) \ |
| 44 V(Object, false_value, FalseValue) \ |
| 45 V(Map, heap_number_map, HeapNumberMap) \ |
| 46 V(Map, global_context_map, GlobalContextMap) \ |
| 47 V(Map, fixed_array_map, FixedArrayMap) \ |
| 48 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ |
| 38 V(Map, meta_map, MetaMap) \ | 49 V(Map, meta_map, MetaMap) \ |
| 39 V(Map, heap_number_map, HeapNumberMap) \ | 50 V(Object, termination_exception, TerminationException) \ |
| 51 V(Map, hash_table_map, HashTableMap) \ |
| 52 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ |
| 40 V(Map, short_string_map, ShortStringMap) \ | 53 V(Map, short_string_map, ShortStringMap) \ |
| 41 V(Map, medium_string_map, MediumStringMap) \ | 54 V(Map, medium_string_map, MediumStringMap) \ |
| 42 V(Map, long_string_map, LongStringMap) \ | 55 V(Map, long_string_map, LongStringMap) \ |
| 43 V(Map, short_ascii_string_map, ShortAsciiStringMap) \ | 56 V(Map, short_ascii_string_map, ShortAsciiStringMap) \ |
| 44 V(Map, medium_ascii_string_map, MediumAsciiStringMap) \ | 57 V(Map, medium_ascii_string_map, MediumAsciiStringMap) \ |
| 45 V(Map, long_ascii_string_map, LongAsciiStringMap) \ | 58 V(Map, long_ascii_string_map, LongAsciiStringMap) \ |
| 46 V(Map, short_symbol_map, ShortSymbolMap) \ | 59 V(Map, short_symbol_map, ShortSymbolMap) \ |
| 47 V(Map, medium_symbol_map, MediumSymbolMap) \ | 60 V(Map, medium_symbol_map, MediumSymbolMap) \ |
| 48 V(Map, long_symbol_map, LongSymbolMap) \ | 61 V(Map, long_symbol_map, LongSymbolMap) \ |
| 49 V(Map, short_ascii_symbol_map, ShortAsciiSymbolMap) \ | 62 V(Map, short_ascii_symbol_map, ShortAsciiSymbolMap) \ |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 V(Map, undetectable_short_string_map, UndetectableShortStringMap) \ | 101 V(Map, undetectable_short_string_map, UndetectableShortStringMap) \ |
| 89 V(Map, undetectable_medium_string_map, UndetectableMediumStringMap) \ | 102 V(Map, undetectable_medium_string_map, UndetectableMediumStringMap) \ |
| 90 V(Map, undetectable_long_string_map, UndetectableLongStringMap) \ | 103 V(Map, undetectable_long_string_map, UndetectableLongStringMap) \ |
| 91 V(Map, undetectable_short_ascii_string_map, UndetectableShortAsciiStringMap) \ | 104 V(Map, undetectable_short_ascii_string_map, UndetectableShortAsciiStringMap) \ |
| 92 V(Map, \ | 105 V(Map, \ |
| 93 undetectable_medium_ascii_string_map, \ | 106 undetectable_medium_ascii_string_map, \ |
| 94 UndetectableMediumAsciiStringMap) \ | 107 UndetectableMediumAsciiStringMap) \ |
| 95 V(Map, undetectable_long_ascii_string_map, UndetectableLongAsciiStringMap) \ | 108 V(Map, undetectable_long_ascii_string_map, UndetectableLongAsciiStringMap) \ |
| 96 V(Map, byte_array_map, ByteArrayMap) \ | 109 V(Map, byte_array_map, ByteArrayMap) \ |
| 97 V(Map, pixel_array_map, PixelArrayMap) \ | 110 V(Map, pixel_array_map, PixelArrayMap) \ |
| 98 V(Map, fixed_array_map, FixedArrayMap) \ | |
| 99 V(Map, hash_table_map, HashTableMap) \ | |
| 100 V(Map, context_map, ContextMap) \ | 111 V(Map, context_map, ContextMap) \ |
| 101 V(Map, catch_context_map, CatchContextMap) \ | 112 V(Map, catch_context_map, CatchContextMap) \ |
| 102 V(Map, global_context_map, GlobalContextMap) \ | |
| 103 V(Map, code_map, CodeMap) \ | 113 V(Map, code_map, CodeMap) \ |
| 104 V(Map, oddball_map, OddballMap) \ | 114 V(Map, oddball_map, OddballMap) \ |
| 105 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ | 115 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ |
| 106 V(Map, boilerplate_function_map, BoilerplateFunctionMap) \ | 116 V(Map, boilerplate_function_map, BoilerplateFunctionMap) \ |
| 107 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ | 117 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ |
| 108 V(Map, proxy_map, ProxyMap) \ | 118 V(Map, proxy_map, ProxyMap) \ |
| 109 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ | 119 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ |
| 110 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ | 120 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ |
| 111 V(Object, nan_value, NanValue) \ | 121 V(Object, nan_value, NanValue) \ |
| 112 V(Object, undefined_value, UndefinedValue) \ | |
| 113 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ | |
| 114 V(Object, termination_exception, TerminationException) \ | |
| 115 V(Object, minus_zero_value, MinusZeroValue) \ | 122 V(Object, minus_zero_value, MinusZeroValue) \ |
| 116 V(Object, null_value, NullValue) \ | |
| 117 V(Object, true_value, TrueValue) \ | |
| 118 V(Object, false_value, FalseValue) \ | |
| 119 V(String, empty_string, EmptyString) \ | 123 V(String, empty_string, EmptyString) \ |
| 120 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ | |
| 121 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ | 124 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ |
| 122 V(Object, the_hole_value, TheHoleValue) \ | |
| 123 V(Map, neander_map, NeanderMap) \ | 125 V(Map, neander_map, NeanderMap) \ |
| 124 V(JSObject, message_listeners, MessageListeners) \ | 126 V(JSObject, message_listeners, MessageListeners) \ |
| 125 V(Proxy, prototype_accessors, PrototypeAccessors) \ | 127 V(Proxy, prototype_accessors, PrototypeAccessors) \ |
| 126 V(NumberDictionary, code_stubs, CodeStubs) \ | 128 V(NumberDictionary, code_stubs, CodeStubs) \ |
| 127 V(NumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \ | 129 V(NumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \ |
| 128 V(Code, js_entry_code, JsEntryCode) \ | 130 V(Code, js_entry_code, JsEntryCode) \ |
| 129 V(Code, js_construct_entry_code, JsConstructEntryCode) \ | 131 V(Code, js_construct_entry_code, JsConstructEntryCode) \ |
| 130 V(Code, c_entry_code, CEntryCode) \ | 132 V(Code, c_entry_code, CEntryCode) \ |
| 131 V(Code, c_entry_debug_break_code, CEntryDebugBreakCode) \ | 133 V(Code, c_entry_debug_break_code, CEntryDebugBreakCode) \ |
| 132 V(FixedArray, number_string_cache, NumberStringCache) \ | 134 V(FixedArray, number_string_cache, NumberStringCache) \ |
| 133 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ | 135 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ |
| 134 V(FixedArray, natives_source_cache, NativesSourceCache) \ | 136 V(FixedArray, natives_source_cache, NativesSourceCache) \ |
| 135 V(Object, last_script_id, LastScriptId) \ | 137 V(Object, last_script_id, LastScriptId) \ |
| 136 V(Smi, stack_limit, StackLimit) | |
| 137 | 138 |
| 138 | 139 |
| 139 #define ROOT_LIST(V) \ | 140 #define ROOT_LIST(V) \ |
| 140 STRONG_ROOT_LIST(V) \ | 141 STRONG_ROOT_LIST(V) \ |
| 141 V(SymbolTable, symbol_table, SymbolTable) | 142 V(SymbolTable, symbol_table, SymbolTable) |
| 142 | 143 |
| 143 #define SYMBOL_LIST(V) \ | 144 #define SYMBOL_LIST(V) \ |
| 144 V(Array_symbol, "Array") \ | 145 V(Array_symbol, "Array") \ |
| 145 V(Object_symbol, "Object") \ | 146 V(Object_symbol, "Object") \ |
| 146 V(Proto_symbol, "__proto__") \ | 147 V(Proto_symbol, "__proto__") \ |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1505 int marked_count_; | 1506 int marked_count_; |
| 1506 | 1507 |
| 1507 // The count from the end of the previous full GC. Will be zero if there | 1508 // The count from the end of the previous full GC. Will be zero if there |
| 1508 // was no previous full GC. | 1509 // was no previous full GC. |
| 1509 int previous_marked_count_; | 1510 int previous_marked_count_; |
| 1510 }; | 1511 }; |
| 1511 | 1512 |
| 1512 } } // namespace v8::internal | 1513 } } // namespace v8::internal |
| 1513 | 1514 |
| 1514 #endif // V8_HEAP_H_ | 1515 #endif // V8_HEAP_H_ |
| OLD | NEW |