| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 // Defines all the roots in Heap. | 43 // Defines all the roots in Heap. |
| 44 #define UNCONDITIONAL_STRONG_ROOT_LIST(V) \ | 44 #define UNCONDITIONAL_STRONG_ROOT_LIST(V) \ |
| 45 /* Put the byte array map early. We need it to be in place by the time */ \ | 45 /* Put the byte array map early. We need it to be in place by the time */ \ |
| 46 /* the deserializer hits the next page, since it wants to put a byte */ \ | 46 /* the deserializer hits the next page, since it wants to put a byte */ \ |
| 47 /* array in the unused space at the end of the page. */ \ | 47 /* array in the unused space at the end of the page. */ \ |
| 48 V(Map, byte_array_map, ByteArrayMap) \ | 48 V(Map, byte_array_map, ByteArrayMap) \ |
| 49 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ | 49 V(Map, one_pointer_filler_map, OnePointerFillerMap) \ |
| 50 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ | 50 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \ |
| 51 /* Cluster the most popular ones in a few cache lines here at the top. */ \ | 51 /* Cluster the most popular ones in a few cache lines here at the top. */ \ |
| 52 V(Smi, stack_limit, StackLimit) \ | |
| 53 V(Object, undefined_value, UndefinedValue) \ | 52 V(Object, undefined_value, UndefinedValue) \ |
| 54 V(Object, the_hole_value, TheHoleValue) \ | 53 V(Object, the_hole_value, TheHoleValue) \ |
| 55 V(Object, null_value, NullValue) \ | 54 V(Object, null_value, NullValue) \ |
| 56 V(Object, true_value, TrueValue) \ | 55 V(Object, true_value, TrueValue) \ |
| 57 V(Object, false_value, FalseValue) \ | 56 V(Object, false_value, FalseValue) \ |
| 58 V(Object, arguments_marker, ArgumentsMarker) \ | 57 V(Object, arguments_marker, ArgumentsMarker) \ |
| 59 V(Map, heap_number_map, HeapNumberMap) \ | 58 V(Map, heap_number_map, HeapNumberMap) \ |
| 60 V(Map, global_context_map, GlobalContextMap) \ | 59 V(Map, global_context_map, GlobalContextMap) \ |
| 61 V(Map, fixed_array_map, FixedArrayMap) \ | 60 V(Map, fixed_array_map, FixedArrayMap) \ |
| 62 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ | 61 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \ |
| 63 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ | 62 V(Object, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \ |
| 64 V(Map, meta_map, MetaMap) \ | 63 V(Map, meta_map, MetaMap) \ |
| 64 V(Map, hash_table_map, HashTableMap) \ |
| 65 V(Smi, stack_limit, StackLimit) \ |
| 66 V(FixedArray, number_string_cache, NumberStringCache) \ |
| 67 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ |
| 68 V(Object, instanceof_cache_map, InstanceofCacheMap) \ |
| 69 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ |
| 70 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ |
| 65 V(Object, termination_exception, TerminationException) \ | 71 V(Object, termination_exception, TerminationException) \ |
| 66 V(Map, hash_table_map, HashTableMap) \ | |
| 67 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ | 72 V(FixedArray, empty_fixed_array, EmptyFixedArray) \ |
| 68 V(ByteArray, empty_byte_array, EmptyByteArray) \ | 73 V(ByteArray, empty_byte_array, EmptyByteArray) \ |
| 74 V(String, empty_string, EmptyString) \ |
| 75 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ |
| 69 V(Map, string_map, StringMap) \ | 76 V(Map, string_map, StringMap) \ |
| 70 V(Map, ascii_string_map, AsciiStringMap) \ | 77 V(Map, ascii_string_map, AsciiStringMap) \ |
| 71 V(Map, symbol_map, SymbolMap) \ | 78 V(Map, symbol_map, SymbolMap) \ |
| 79 V(Map, cons_string_map, ConsStringMap) \ |
| 80 V(Map, cons_ascii_string_map, ConsAsciiStringMap) \ |
| 72 V(Map, ascii_symbol_map, AsciiSymbolMap) \ | 81 V(Map, ascii_symbol_map, AsciiSymbolMap) \ |
| 73 V(Map, cons_symbol_map, ConsSymbolMap) \ | 82 V(Map, cons_symbol_map, ConsSymbolMap) \ |
| 74 V(Map, cons_ascii_symbol_map, ConsAsciiSymbolMap) \ | 83 V(Map, cons_ascii_symbol_map, ConsAsciiSymbolMap) \ |
| 75 V(Map, external_symbol_map, ExternalSymbolMap) \ | 84 V(Map, external_symbol_map, ExternalSymbolMap) \ |
| 76 V(Map, external_symbol_with_ascii_data_map, ExternalSymbolWithAsciiDataMap) \ | 85 V(Map, external_symbol_with_ascii_data_map, ExternalSymbolWithAsciiDataMap) \ |
| 77 V(Map, external_ascii_symbol_map, ExternalAsciiSymbolMap) \ | 86 V(Map, external_ascii_symbol_map, ExternalAsciiSymbolMap) \ |
| 78 V(Map, cons_string_map, ConsStringMap) \ | |
| 79 V(Map, cons_ascii_string_map, ConsAsciiStringMap) \ | |
| 80 V(Map, external_string_map, ExternalStringMap) \ | 87 V(Map, external_string_map, ExternalStringMap) \ |
| 81 V(Map, external_string_with_ascii_data_map, ExternalStringWithAsciiDataMap) \ | 88 V(Map, external_string_with_ascii_data_map, ExternalStringWithAsciiDataMap) \ |
| 82 V(Map, external_ascii_string_map, ExternalAsciiStringMap) \ | 89 V(Map, external_ascii_string_map, ExternalAsciiStringMap) \ |
| 83 V(Map, undetectable_string_map, UndetectableStringMap) \ | 90 V(Map, undetectable_string_map, UndetectableStringMap) \ |
| 84 V(Map, undetectable_ascii_string_map, UndetectableAsciiStringMap) \ | 91 V(Map, undetectable_ascii_string_map, UndetectableAsciiStringMap) \ |
| 85 V(Map, pixel_array_map, PixelArrayMap) \ | 92 V(Map, pixel_array_map, PixelArrayMap) \ |
| 86 V(Map, external_byte_array_map, ExternalByteArrayMap) \ | 93 V(Map, external_byte_array_map, ExternalByteArrayMap) \ |
| 87 V(Map, external_unsigned_byte_array_map, ExternalUnsignedByteArrayMap) \ | 94 V(Map, external_unsigned_byte_array_map, ExternalUnsignedByteArrayMap) \ |
| 88 V(Map, external_short_array_map, ExternalShortArrayMap) \ | 95 V(Map, external_short_array_map, ExternalShortArrayMap) \ |
| 89 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ | 96 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ |
| 90 V(Map, external_int_array_map, ExternalIntArrayMap) \ | 97 V(Map, external_int_array_map, ExternalIntArrayMap) \ |
| 91 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ | 98 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ |
| 92 V(Map, external_float_array_map, ExternalFloatArrayMap) \ | 99 V(Map, external_float_array_map, ExternalFloatArrayMap) \ |
| 93 V(Map, context_map, ContextMap) \ | 100 V(Map, context_map, ContextMap) \ |
| 94 V(Map, catch_context_map, CatchContextMap) \ | 101 V(Map, catch_context_map, CatchContextMap) \ |
| 95 V(Map, code_map, CodeMap) \ | 102 V(Map, code_map, CodeMap) \ |
| 96 V(Map, oddball_map, OddballMap) \ | 103 V(Map, oddball_map, OddballMap) \ |
| 97 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ | 104 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ |
| 98 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ | 105 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ |
| 99 V(Map, message_object_map, JSMessageObjectMap) \ | 106 V(Map, message_object_map, JSMessageObjectMap) \ |
| 100 V(Map, proxy_map, ProxyMap) \ | 107 V(Map, proxy_map, ProxyMap) \ |
| 101 V(Object, nan_value, NanValue) \ | 108 V(Object, nan_value, NanValue) \ |
| 102 V(Object, minus_zero_value, MinusZeroValue) \ | 109 V(Object, minus_zero_value, MinusZeroValue) \ |
| 103 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ | |
| 104 V(Object, instanceof_cache_map, InstanceofCacheMap) \ | |
| 105 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ | |
| 106 V(String, empty_string, EmptyString) \ | |
| 107 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ | |
| 108 V(Map, neander_map, NeanderMap) \ | 110 V(Map, neander_map, NeanderMap) \ |
| 109 V(JSObject, message_listeners, MessageListeners) \ | 111 V(JSObject, message_listeners, MessageListeners) \ |
| 110 V(Proxy, prototype_accessors, PrototypeAccessors) \ | 112 V(Proxy, prototype_accessors, PrototypeAccessors) \ |
| 111 V(NumberDictionary, code_stubs, CodeStubs) \ | 113 V(NumberDictionary, code_stubs, CodeStubs) \ |
| 112 V(NumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \ | 114 V(NumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \ |
| 113 V(Code, js_entry_code, JsEntryCode) \ | 115 V(Code, js_entry_code, JsEntryCode) \ |
| 114 V(Code, js_construct_entry_code, JsConstructEntryCode) \ | 116 V(Code, js_construct_entry_code, JsConstructEntryCode) \ |
| 115 V(Code, c_entry_code, CEntryCode) \ | 117 V(Code, c_entry_code, CEntryCode) \ |
| 116 V(FixedArray, number_string_cache, NumberStringCache) \ | |
| 117 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ | |
| 118 V(FixedArray, natives_source_cache, NativesSourceCache) \ | 118 V(FixedArray, natives_source_cache, NativesSourceCache) \ |
| 119 V(Object, last_script_id, LastScriptId) \ | 119 V(Object, last_script_id, LastScriptId) \ |
| 120 V(Script, empty_script, EmptyScript) \ | 120 V(Script, empty_script, EmptyScript) \ |
| 121 V(Smi, real_stack_limit, RealStackLimit) \ | 121 V(Smi, real_stack_limit, RealStackLimit) \ |
| 122 V(StringDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ | 122 V(StringDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ |
| 123 | 123 |
| 124 #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP | 124 #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP |
| 125 #define STRONG_ROOT_LIST(V) \ | 125 #define STRONG_ROOT_LIST(V) \ |
| 126 UNCONDITIONAL_STRONG_ROOT_LIST(V) \ | 126 UNCONDITIONAL_STRONG_ROOT_LIST(V) \ |
| 127 V(Code, re_c_entry_code, RegExpCEntryCode) \ | 127 V(Code, re_c_entry_code, RegExpCEntryCode) \ |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 V(space_symbol, " ") \ | 211 V(space_symbol, " ") \ |
| 212 V(exec_symbol, "exec") \ | 212 V(exec_symbol, "exec") \ |
| 213 V(zero_symbol, "0") \ | 213 V(zero_symbol, "0") \ |
| 214 V(global_eval_symbol, "GlobalEval") \ | 214 V(global_eval_symbol, "GlobalEval") \ |
| 215 V(identity_hash_symbol, "v8::IdentityHash") \ | 215 V(identity_hash_symbol, "v8::IdentityHash") \ |
| 216 V(closure_symbol, "(closure)") \ | 216 V(closure_symbol, "(closure)") \ |
| 217 V(use_strict, "use strict") \ | 217 V(use_strict, "use strict") \ |
| 218 V(KeyedLoadExternalArray_symbol, "KeyedLoadExternalArray") \ | 218 V(KeyedLoadExternalArray_symbol, "KeyedLoadExternalArray") \ |
| 219 V(KeyedStoreExternalArray_symbol, "KeyedStoreExternalArray") | 219 V(KeyedStoreExternalArray_symbol, "KeyedStoreExternalArray") |
| 220 | 220 |
| 221 | |
| 222 // Forward declarations. | 221 // Forward declarations. |
| 223 class GCTracer; | 222 class GCTracer; |
| 224 class HeapStats; | 223 class HeapStats; |
| 225 class WeakObjectRetainer; | 224 class WeakObjectRetainer; |
| 226 | 225 |
| 227 | 226 |
| 228 typedef String* (*ExternalStringTableUpdaterCallback)(Object** pointer); | 227 typedef String* (*ExternalStringTableUpdaterCallback)(Object** pointer); |
| 229 | 228 |
| 230 typedef bool (*DirtyRegionCallback)(Address start, | 229 typedef bool (*DirtyRegionCallback)(Address start, |
| 231 Address end, | 230 Address end, |
| (...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2209 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 2208 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
| 2210 | 2209 |
| 2211 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2210 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2212 }; | 2211 }; |
| 2213 #endif // DEBUG || LIVE_OBJECT_LIST | 2212 #endif // DEBUG || LIVE_OBJECT_LIST |
| 2214 | 2213 |
| 2215 | 2214 |
| 2216 } } // namespace v8::internal | 2215 } } // namespace v8::internal |
| 2217 | 2216 |
| 2218 #endif // V8_HEAP_H_ | 2217 #endif // V8_HEAP_H_ |
| OLD | NEW |