| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ | 93 V(Map, external_unsigned_short_array_map, ExternalUnsignedShortArrayMap) \ |
| 94 V(Map, external_int_array_map, ExternalIntArrayMap) \ | 94 V(Map, external_int_array_map, ExternalIntArrayMap) \ |
| 95 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ | 95 V(Map, external_unsigned_int_array_map, ExternalUnsignedIntArrayMap) \ |
| 96 V(Map, external_float_array_map, ExternalFloatArrayMap) \ | 96 V(Map, external_float_array_map, ExternalFloatArrayMap) \ |
| 97 V(Map, context_map, ContextMap) \ | 97 V(Map, context_map, ContextMap) \ |
| 98 V(Map, catch_context_map, CatchContextMap) \ | 98 V(Map, catch_context_map, CatchContextMap) \ |
| 99 V(Map, code_map, CodeMap) \ | 99 V(Map, code_map, CodeMap) \ |
| 100 V(Map, oddball_map, OddballMap) \ | 100 V(Map, oddball_map, OddballMap) \ |
| 101 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ | 101 V(Map, global_property_cell_map, GlobalPropertyCellMap) \ |
| 102 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ | 102 V(Map, shared_function_info_map, SharedFunctionInfoMap) \ |
| 103 V(Map, message_object_map, JSMessageObjectMap) \ |
| 103 V(Map, proxy_map, ProxyMap) \ | 104 V(Map, proxy_map, ProxyMap) \ |
| 104 V(Object, nan_value, NanValue) \ | 105 V(Object, nan_value, NanValue) \ |
| 105 V(Object, minus_zero_value, MinusZeroValue) \ | 106 V(Object, minus_zero_value, MinusZeroValue) \ |
| 106 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ | 107 V(Object, instanceof_cache_function, InstanceofCacheFunction) \ |
| 107 V(Object, instanceof_cache_map, InstanceofCacheMap) \ | 108 V(Object, instanceof_cache_map, InstanceofCacheMap) \ |
| 108 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ | 109 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \ |
| 109 V(String, empty_string, EmptyString) \ | 110 V(String, empty_string, EmptyString) \ |
| 110 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ | 111 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \ |
| 111 V(Map, neander_map, NeanderMap) \ | 112 V(Map, neander_map, NeanderMap) \ |
| 112 V(JSObject, message_listeners, MessageListeners) \ | 113 V(JSObject, message_listeners, MessageListeners) \ |
| 113 V(Proxy, prototype_accessors, PrototypeAccessors) \ | 114 V(Proxy, prototype_accessors, PrototypeAccessors) \ |
| 114 V(NumberDictionary, code_stubs, CodeStubs) \ | 115 V(NumberDictionary, code_stubs, CodeStubs) \ |
| 115 V(NumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \ | 116 V(NumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \ |
| 116 V(Code, js_entry_code, JsEntryCode) \ | 117 V(Code, js_entry_code, JsEntryCode) \ |
| 117 V(Code, js_construct_entry_code, JsConstructEntryCode) \ | 118 V(Code, js_construct_entry_code, JsConstructEntryCode) \ |
| 118 V(Code, c_entry_code, CEntryCode) \ | 119 V(Code, c_entry_code, CEntryCode) \ |
| 119 V(FixedArray, number_string_cache, NumberStringCache) \ | 120 V(FixedArray, number_string_cache, NumberStringCache) \ |
| 120 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ | 121 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ |
| 121 V(FixedArray, natives_source_cache, NativesSourceCache) \ | 122 V(FixedArray, natives_source_cache, NativesSourceCache) \ |
| 122 V(Object, last_script_id, LastScriptId) \ | 123 V(Object, last_script_id, LastScriptId) \ |
| 123 V(Script, empty_script, EmptyScript) \ | 124 V(Script, empty_script, EmptyScript) \ |
| 124 V(Smi, real_stack_limit, RealStackLimit) \ | 125 V(Smi, real_stack_limit, RealStackLimit) \ |
| 125 V(StringDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ | 126 V(StringDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ |
| 126 | 127 |
| 127 #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP | 128 #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP |
| 128 #define STRONG_ROOT_LIST(V) \ | 129 #define STRONG_ROOT_LIST(V) \ |
| 129 UNCONDITIONAL_STRONG_ROOT_LIST(V) \ | 130 UNCONDITIONAL_STRONG_ROOT_LIST(V) \ |
| 130 V(Code, re_c_entry_code, RegExpCEntryCode) | 131 V(Code, re_c_entry_code, RegExpCEntryCode) \ |
| 132 V(Code, direct_c_entry_code, DirectCEntryCode) |
| 133 #elif V8_TARGET_ARCH_ARM |
| 134 #define STRONG_ROOT_LIST(V) \ |
| 135 UNCONDITIONAL_STRONG_ROOT_LIST(V) \ |
| 136 V(Code, direct_c_entry_code, DirectCEntryCode) |
| 131 #else | 137 #else |
| 132 #define STRONG_ROOT_LIST(V) UNCONDITIONAL_STRONG_ROOT_LIST(V) | 138 #define STRONG_ROOT_LIST(V) UNCONDITIONAL_STRONG_ROOT_LIST(V) |
| 133 #endif | 139 #endif |
| 134 | 140 |
| 135 #define ROOT_LIST(V) \ | 141 #define ROOT_LIST(V) \ |
| 136 STRONG_ROOT_LIST(V) \ | 142 STRONG_ROOT_LIST(V) \ |
| 137 V(SymbolTable, symbol_table, SymbolTable) | 143 V(SymbolTable, symbol_table, SymbolTable) |
| 138 | 144 |
| 139 #define SYMBOL_LIST(V) \ | 145 #define SYMBOL_LIST(V) \ |
| 140 V(Array_symbol, "Array") \ | 146 V(Array_symbol, "Array") \ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 V(Date_symbol, "Date") \ | 182 V(Date_symbol, "Date") \ |
| 177 V(this_symbol, "this") \ | 183 V(this_symbol, "this") \ |
| 178 V(to_string_symbol, "toString") \ | 184 V(to_string_symbol, "toString") \ |
| 179 V(char_at_symbol, "CharAt") \ | 185 V(char_at_symbol, "CharAt") \ |
| 180 V(undefined_symbol, "undefined") \ | 186 V(undefined_symbol, "undefined") \ |
| 181 V(value_of_symbol, "valueOf") \ | 187 V(value_of_symbol, "valueOf") \ |
| 182 V(InitializeVarGlobal_symbol, "InitializeVarGlobal") \ | 188 V(InitializeVarGlobal_symbol, "InitializeVarGlobal") \ |
| 183 V(InitializeConstGlobal_symbol, "InitializeConstGlobal") \ | 189 V(InitializeConstGlobal_symbol, "InitializeConstGlobal") \ |
| 184 V(KeyedLoadSpecialized_symbol, "KeyedLoadSpecialized") \ | 190 V(KeyedLoadSpecialized_symbol, "KeyedLoadSpecialized") \ |
| 185 V(KeyedStoreSpecialized_symbol, "KeyedStoreSpecialized") \ | 191 V(KeyedStoreSpecialized_symbol, "KeyedStoreSpecialized") \ |
| 192 V(KeyedLoadPixelArray_symbol, "KeyedLoadPixelArray") \ |
| 186 V(stack_overflow_symbol, "kStackOverflowBoilerplate") \ | 193 V(stack_overflow_symbol, "kStackOverflowBoilerplate") \ |
| 187 V(illegal_access_symbol, "illegal access") \ | 194 V(illegal_access_symbol, "illegal access") \ |
| 188 V(out_of_memory_symbol, "out-of-memory") \ | 195 V(out_of_memory_symbol, "out-of-memory") \ |
| 189 V(illegal_execution_state_symbol, "illegal execution state") \ | 196 V(illegal_execution_state_symbol, "illegal execution state") \ |
| 190 V(get_symbol, "get") \ | 197 V(get_symbol, "get") \ |
| 191 V(set_symbol, "set") \ | 198 V(set_symbol, "set") \ |
| 192 V(function_class_symbol, "Function") \ | 199 V(function_class_symbol, "Function") \ |
| 193 V(illegal_argument_symbol, "illegal argument") \ | 200 V(illegal_argument_symbol, "illegal argument") \ |
| 194 V(MakeReferenceError_symbol, "MakeReferenceError") \ | 201 V(MakeReferenceError_symbol, "MakeReferenceError") \ |
| 195 V(MakeSyntaxError_symbol, "MakeSyntaxError") \ | 202 V(MakeSyntaxError_symbol, "MakeSyntaxError") \ |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 // Please note this does not perform a garbage collection. | 697 // Please note this does not perform a garbage collection. |
| 691 MUST_USE_RESULT MaybeObject* AllocateProxy( | 698 MUST_USE_RESULT MaybeObject* AllocateProxy( |
| 692 Address proxy, PretenureFlag pretenure = NOT_TENURED); | 699 Address proxy, PretenureFlag pretenure = NOT_TENURED); |
| 693 | 700 |
| 694 // Allocates a new SharedFunctionInfo object. | 701 // Allocates a new SharedFunctionInfo object. |
| 695 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 702 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 696 // failed. | 703 // failed. |
| 697 // Please note this does not perform a garbage collection. | 704 // Please note this does not perform a garbage collection. |
| 698 MUST_USE_RESULT MaybeObject* AllocateSharedFunctionInfo(Object* name); | 705 MUST_USE_RESULT MaybeObject* AllocateSharedFunctionInfo(Object* name); |
| 699 | 706 |
| 707 // Allocates a new JSMessageObject object. |
| 708 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 709 // failed. |
| 710 // Please note that this does not perform a garbage collection. |
| 711 MUST_USE_RESULT MaybeObject* AllocateJSMessageObject( |
| 712 String* type, |
| 713 JSArray* arguments, |
| 714 int start_position, |
| 715 int end_position, |
| 716 Object* script, |
| 717 Object* stack_trace, |
| 718 Object* stack_frames); |
| 719 |
| 700 // Allocates a new cons string object. | 720 // Allocates a new cons string object. |
| 701 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 721 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 702 // failed. | 722 // failed. |
| 703 // Please note this does not perform a garbage collection. | 723 // Please note this does not perform a garbage collection. |
| 704 MUST_USE_RESULT MaybeObject* AllocateConsString(String* first, | 724 MUST_USE_RESULT MaybeObject* AllocateConsString(String* first, |
| 705 String* second); | 725 String* second); |
| 706 | 726 |
| 707 // Allocates a new sub string object which is a substring of an underlying | 727 // Allocates a new sub string object which is a substring of an underlying |
| 708 // string buffer stretching from the index start (inclusive) to the index | 728 // string buffer stretching from the index start (inclusive) to the index |
| 709 // end (exclusive). | 729 // end (exclusive). |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1397 MUST_USE_RESULT inline MaybeObject* AllocateRawCell(); | 1417 MUST_USE_RESULT inline MaybeObject* AllocateRawCell(); |
| 1398 | 1418 |
| 1399 // Initializes a JSObject based on its map. | 1419 // Initializes a JSObject based on its map. |
| 1400 void InitializeJSObjectFromMap(JSObject* obj, | 1420 void InitializeJSObjectFromMap(JSObject* obj, |
| 1401 FixedArray* properties, | 1421 FixedArray* properties, |
| 1402 Map* map); | 1422 Map* map); |
| 1403 | 1423 |
| 1404 bool CreateInitialMaps(); | 1424 bool CreateInitialMaps(); |
| 1405 bool CreateInitialObjects(); | 1425 bool CreateInitialObjects(); |
| 1406 | 1426 |
| 1407 // These four Create*EntryStub functions are here and forced to not be inlined | 1427 // These five Create*EntryStub functions are here and forced to not be inlined |
| 1408 // because of a gcc-4.4 bug that assigns wrong vtable entries. | 1428 // because of a gcc-4.4 bug that assigns wrong vtable entries. |
| 1409 NO_INLINE(void CreateCEntryStub()); | 1429 NO_INLINE(void CreateCEntryStub()); |
| 1410 NO_INLINE(void CreateJSEntryStub()); | 1430 NO_INLINE(void CreateJSEntryStub()); |
| 1411 NO_INLINE(void CreateJSConstructEntryStub()); | 1431 NO_INLINE(void CreateJSConstructEntryStub()); |
| 1412 NO_INLINE(void CreateRegExpCEntryStub()); | 1432 NO_INLINE(void CreateRegExpCEntryStub()); |
| 1433 NO_INLINE(void CreateDirectCEntryStub()); |
| 1413 | 1434 |
| 1414 void CreateFixedStubs(); | 1435 void CreateFixedStubs(); |
| 1415 | 1436 |
| 1416 MaybeObject* CreateOddball(const char* to_string, | 1437 MaybeObject* CreateOddball(const char* to_string, |
| 1417 Object* to_number, | 1438 Object* to_number, |
| 1418 byte kind); | 1439 byte kind); |
| 1419 | 1440 |
| 1420 // Allocate empty fixed array. | 1441 // Allocate empty fixed array. |
| 1421 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); | 1442 MUST_USE_RESULT MaybeObject* AllocateEmptyFixedArray(); |
| 1422 | 1443 |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2162 // should be returned as in some GC situations the object has been moved. | 2183 // should be returned as in some GC situations the object has been moved. |
| 2163 virtual Object* RetainAs(Object* object) = 0; | 2184 virtual Object* RetainAs(Object* object) = 0; |
| 2164 }; | 2185 }; |
| 2165 | 2186 |
| 2166 | 2187 |
| 2167 } } // namespace v8::internal | 2188 } } // namespace v8::internal |
| 2168 | 2189 |
| 2169 #undef HEAP | 2190 #undef HEAP |
| 2170 | 2191 |
| 2171 #endif // V8_HEAP_H_ | 2192 #endif // V8_HEAP_H_ |
| OLD | NEW |