| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 EmptyExternalUint8ClampedArray) \ | 157 EmptyExternalUint8ClampedArray) \ |
| 158 V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \ | 158 V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \ |
| 159 V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \ | 159 V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \ |
| 160 V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \ | 160 V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \ |
| 161 V(Map, fixed_int16_array_map, FixedInt16ArrayMap) \ | 161 V(Map, fixed_int16_array_map, FixedInt16ArrayMap) \ |
| 162 V(Map, fixed_uint32_array_map, FixedUint32ArrayMap) \ | 162 V(Map, fixed_uint32_array_map, FixedUint32ArrayMap) \ |
| 163 V(Map, fixed_int32_array_map, FixedInt32ArrayMap) \ | 163 V(Map, fixed_int32_array_map, FixedInt32ArrayMap) \ |
| 164 V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \ | 164 V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \ |
| 165 V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \ | 165 V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \ |
| 166 V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \ | 166 V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \ |
| 167 V(Map, non_strict_arguments_elements_map, NonStrictArgumentsElementsMap) \ | 167 V(Map, sloppy_arguments_elements_map, SloppyArgumentsElementsMap) \ |
| 168 V(Map, function_context_map, FunctionContextMap) \ | 168 V(Map, function_context_map, FunctionContextMap) \ |
| 169 V(Map, catch_context_map, CatchContextMap) \ | 169 V(Map, catch_context_map, CatchContextMap) \ |
| 170 V(Map, with_context_map, WithContextMap) \ | 170 V(Map, with_context_map, WithContextMap) \ |
| 171 V(Map, block_context_map, BlockContextMap) \ | 171 V(Map, block_context_map, BlockContextMap) \ |
| 172 V(Map, module_context_map, ModuleContextMap) \ | 172 V(Map, module_context_map, ModuleContextMap) \ |
| 173 V(Map, global_context_map, GlobalContextMap) \ | 173 V(Map, global_context_map, GlobalContextMap) \ |
| 174 V(Map, oddball_map, OddballMap) \ | 174 V(Map, oddball_map, OddballMap) \ |
| 175 V(Map, message_object_map, JSMessageObjectMap) \ | 175 V(Map, message_object_map, JSMessageObjectMap) \ |
| 176 V(Map, foreign_map, ForeignMap) \ | 176 V(Map, foreign_map, ForeignMap) \ |
| 177 V(HeapNumber, nan_value, NanValue) \ | 177 V(HeapNumber, nan_value, NanValue) \ |
| 178 V(HeapNumber, infinity_value, InfinityValue) \ | 178 V(HeapNumber, infinity_value, InfinityValue) \ |
| 179 V(HeapNumber, minus_zero_value, MinusZeroValue) \ | 179 V(HeapNumber, minus_zero_value, MinusZeroValue) \ |
| 180 V(Map, neander_map, NeanderMap) \ | 180 V(Map, neander_map, NeanderMap) \ |
| 181 V(JSObject, message_listeners, MessageListeners) \ | 181 V(JSObject, message_listeners, MessageListeners) \ |
| 182 V(UnseededNumberDictionary, code_stubs, CodeStubs) \ | 182 V(UnseededNumberDictionary, code_stubs, CodeStubs) \ |
| 183 V(UnseededNumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \ | 183 V(UnseededNumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \ |
| 184 V(PolymorphicCodeCache, polymorphic_code_cache, PolymorphicCodeCache) \ | 184 V(PolymorphicCodeCache, polymorphic_code_cache, PolymorphicCodeCache) \ |
| 185 V(Code, js_entry_code, JsEntryCode) \ | 185 V(Code, js_entry_code, JsEntryCode) \ |
| 186 V(Code, js_construct_entry_code, JsConstructEntryCode) \ | 186 V(Code, js_construct_entry_code, JsConstructEntryCode) \ |
| 187 V(FixedArray, natives_source_cache, NativesSourceCache) \ | 187 V(FixedArray, natives_source_cache, NativesSourceCache) \ |
| 188 V(Script, empty_script, EmptyScript) \ | 188 V(Script, empty_script, EmptyScript) \ |
| 189 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ | 189 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ |
| 190 V(Cell, undefined_cell, UndefineCell) \ | 190 V(Cell, undefined_cell, UndefineCell) \ |
| 191 V(JSObject, observation_state, ObservationState) \ | 191 V(JSObject, observation_state, ObservationState) \ |
| 192 V(Map, external_map, ExternalMap) \ | 192 V(Map, external_map, ExternalMap) \ |
| 193 V(Symbol, frozen_symbol, FrozenSymbol) \ | 193 V(Symbol, frozen_symbol, FrozenSymbol) \ |
| 194 V(Symbol, nonexistent_symbol, NonExistentSymbol) \ |
| 194 V(Symbol, elements_transition_symbol, ElementsTransitionSymbol) \ | 195 V(Symbol, elements_transition_symbol, ElementsTransitionSymbol) \ |
| 195 V(SeededNumberDictionary, empty_slow_element_dictionary, \ | 196 V(SeededNumberDictionary, empty_slow_element_dictionary, \ |
| 196 EmptySlowElementDictionary) \ | 197 EmptySlowElementDictionary) \ |
| 197 V(Symbol, observed_symbol, ObservedSymbol) \ | 198 V(Symbol, observed_symbol, ObservedSymbol) \ |
| 199 V(Symbol, uninitialized_symbol, UninitializedSymbol) \ |
| 200 V(Symbol, megamorphic_symbol, MegamorphicSymbol) \ |
| 198 V(FixedArray, materialized_objects, MaterializedObjects) \ | 201 V(FixedArray, materialized_objects, MaterializedObjects) \ |
| 199 V(FixedArray, allocation_sites_scratchpad, AllocationSitesScratchpad) \ | 202 V(FixedArray, allocation_sites_scratchpad, AllocationSitesScratchpad) \ |
| 200 V(JSObject, microtask_state, MicrotaskState) | 203 V(JSObject, microtask_state, MicrotaskState) |
| 201 | 204 |
| 202 // Entries in this list are limited to Smis and are not visited during GC. | 205 // Entries in this list are limited to Smis and are not visited during GC. |
| 203 #define SMI_ROOT_LIST(V) \ | 206 #define SMI_ROOT_LIST(V) \ |
| 204 V(Smi, stack_limit, StackLimit) \ | 207 V(Smi, stack_limit, StackLimit) \ |
| 205 V(Smi, real_stack_limit, RealStackLimit) \ | 208 V(Smi, real_stack_limit, RealStackLimit) \ |
| 206 V(Smi, last_script_id, LastScriptId) \ | 209 V(Smi, last_script_id, LastScriptId) \ |
| 207 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ | 210 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 V(fixed_double_array_map) \ | 243 V(fixed_double_array_map) \ |
| 241 V(constant_pool_array_map) \ | 244 V(constant_pool_array_map) \ |
| 242 V(no_interceptor_result_sentinel) \ | 245 V(no_interceptor_result_sentinel) \ |
| 243 V(hash_table_map) \ | 246 V(hash_table_map) \ |
| 244 V(empty_fixed_array) \ | 247 V(empty_fixed_array) \ |
| 245 V(empty_byte_array) \ | 248 V(empty_byte_array) \ |
| 246 V(empty_descriptor_array) \ | 249 V(empty_descriptor_array) \ |
| 247 V(empty_constant_pool_array) \ | 250 V(empty_constant_pool_array) \ |
| 248 V(arguments_marker) \ | 251 V(arguments_marker) \ |
| 249 V(symbol_map) \ | 252 V(symbol_map) \ |
| 250 V(non_strict_arguments_elements_map) \ | 253 V(sloppy_arguments_elements_map) \ |
| 251 V(function_context_map) \ | 254 V(function_context_map) \ |
| 252 V(catch_context_map) \ | 255 V(catch_context_map) \ |
| 253 V(with_context_map) \ | 256 V(with_context_map) \ |
| 254 V(block_context_map) \ | 257 V(block_context_map) \ |
| 255 V(module_context_map) \ | 258 V(module_context_map) \ |
| 256 V(global_context_map) \ | 259 V(global_context_map) \ |
| 257 V(oddball_map) \ | 260 V(oddball_map) \ |
| 258 V(message_object_map) \ | 261 V(message_object_map) \ |
| 259 V(foreign_map) \ | 262 V(foreign_map) \ |
| 260 V(neander_map) | 263 V(neander_map) |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 return old_data_space_->allocation_top_address(); | 679 return old_data_space_->allocation_top_address(); |
| 677 } | 680 } |
| 678 Address* OldDataSpaceAllocationLimitAddress() { | 681 Address* OldDataSpaceAllocationLimitAddress() { |
| 679 return old_data_space_->allocation_limit_address(); | 682 return old_data_space_->allocation_limit_address(); |
| 680 } | 683 } |
| 681 | 684 |
| 682 // Allocates and initializes a new JavaScript object based on a | 685 // Allocates and initializes a new JavaScript object based on a |
| 683 // constructor. | 686 // constructor. |
| 684 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 687 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 685 // failed. | 688 // failed. |
| 689 // If allocation_site is non-null, then a memento is emitted after the object |
| 690 // that points to the site. |
| 686 // Please note this does not perform a garbage collection. | 691 // Please note this does not perform a garbage collection. |
| 687 MUST_USE_RESULT MaybeObject* AllocateJSObject( | 692 MUST_USE_RESULT MaybeObject* AllocateJSObject( |
| 688 JSFunction* constructor, | 693 JSFunction* constructor, |
| 689 PretenureFlag pretenure = NOT_TENURED); | 694 PretenureFlag pretenure = NOT_TENURED, |
| 690 | 695 AllocationSite* allocation_site = NULL); |
| 691 MUST_USE_RESULT MaybeObject* AllocateJSObjectWithAllocationSite( | |
| 692 JSFunction* constructor, | |
| 693 Handle<AllocationSite> allocation_site); | |
| 694 | 696 |
| 695 MUST_USE_RESULT MaybeObject* AllocateJSModule(Context* context, | 697 MUST_USE_RESULT MaybeObject* AllocateJSModule(Context* context, |
| 696 ScopeInfo* scope_info); | 698 ScopeInfo* scope_info); |
| 697 | 699 |
| 698 // Allocate a JSArray with no elements | 700 // Allocate a JSArray with no elements |
| 699 MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray( | 701 MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray( |
| 700 ElementsKind elements_kind, | 702 ElementsKind elements_kind, |
| 701 PretenureFlag pretenure = NOT_TENURED) { | 703 PretenureFlag pretenure = NOT_TENURED) { |
| 702 return AllocateJSArrayAndStorage(elements_kind, 0, 0, | 704 return AllocateJSArrayAndStorage(elements_kind, 0, 0, |
| 703 DONT_INITIALIZE_ARRAY_ELEMENTS, | 705 DONT_INITIALIZE_ARRAY_ELEMENTS, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 // Reinitialize an JSGlobalProxy based on a constructor. The object | 765 // Reinitialize an JSGlobalProxy based on a constructor. The object |
| 764 // must have the same size as objects allocated using the | 766 // must have the same size as objects allocated using the |
| 765 // constructor. The object is reinitialized and behaves as an | 767 // constructor. The object is reinitialized and behaves as an |
| 766 // object that has been freshly allocated using the constructor. | 768 // object that has been freshly allocated using the constructor. |
| 767 MUST_USE_RESULT MaybeObject* ReinitializeJSGlobalProxy( | 769 MUST_USE_RESULT MaybeObject* ReinitializeJSGlobalProxy( |
| 768 JSFunction* constructor, JSGlobalProxy* global); | 770 JSFunction* constructor, JSGlobalProxy* global); |
| 769 | 771 |
| 770 // Allocates and initializes a new JavaScript object based on a map. | 772 // Allocates and initializes a new JavaScript object based on a map. |
| 771 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 773 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 772 // failed. | 774 // failed. |
| 775 // Passing an allocation site means that a memento will be created that |
| 776 // points to the site. |
| 773 // Please note this does not perform a garbage collection. | 777 // Please note this does not perform a garbage collection. |
| 774 MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMap( | 778 MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMap( |
| 775 Map* map, PretenureFlag pretenure = NOT_TENURED, bool alloc_props = true); | 779 Map* map, |
| 776 | 780 PretenureFlag pretenure = NOT_TENURED, |
| 777 MUST_USE_RESULT MaybeObject* AllocateJSObjectFromMapWithAllocationSite( | 781 bool alloc_props = true, |
| 778 Map* map, Handle<AllocationSite> allocation_site); | 782 AllocationSite* allocation_site = NULL); |
| 779 | 783 |
| 780 // Allocates a heap object based on the map. | 784 // Allocates a heap object based on the map. |
| 781 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 785 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 782 // failed. | 786 // failed. |
| 783 // Please note this function does not perform a garbage collection. | 787 // Please note this function does not perform a garbage collection. |
| 784 MUST_USE_RESULT MaybeObject* Allocate(Map* map, AllocationSpace space); | 788 MUST_USE_RESULT MaybeObject* Allocate(Map* map, AllocationSpace space, |
| 785 | 789 AllocationSite* allocation_site = NULL); |
| 786 MUST_USE_RESULT MaybeObject* AllocateWithAllocationSite(Map* map, | |
| 787 AllocationSpace space, Handle<AllocationSite> allocation_site); | |
| 788 | 790 |
| 789 // Allocates a JS Map in the heap. | 791 // Allocates a JS Map in the heap. |
| 790 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 792 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 791 // failed. | 793 // failed. |
| 792 // Please note this function does not perform a garbage collection. | 794 // Please note this function does not perform a garbage collection. |
| 793 MUST_USE_RESULT MaybeObject* AllocateMap( | 795 MUST_USE_RESULT MaybeObject* AllocateMap( |
| 794 InstanceType instance_type, | 796 InstanceType instance_type, |
| 795 int instance_size, | 797 int instance_size, |
| 796 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND); | 798 ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND); |
| 797 | 799 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 | 1005 |
| 1004 // Allocates a fixed array initialized with the hole values. | 1006 // Allocates a fixed array initialized with the hole values. |
| 1005 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 1007 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 1006 // failed. | 1008 // failed. |
| 1007 // Please note this does not perform a garbage collection. | 1009 // Please note this does not perform a garbage collection. |
| 1008 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithHoles( | 1010 MUST_USE_RESULT MaybeObject* AllocateFixedArrayWithHoles( |
| 1009 int length, | 1011 int length, |
| 1010 PretenureFlag pretenure = NOT_TENURED); | 1012 PretenureFlag pretenure = NOT_TENURED); |
| 1011 | 1013 |
| 1012 MUST_USE_RESULT MaybeObject* AllocateConstantPoolArray( | 1014 MUST_USE_RESULT MaybeObject* AllocateConstantPoolArray( |
| 1013 int first_int64_index, | 1015 int number_of_int64_entries, |
| 1014 int first_ptr_index, | 1016 int number_of_code_ptr_entries, |
| 1015 int first_int32_index); | 1017 int number_of_heap_ptr_entries, |
| 1018 int number_of_int32_entries); |
| 1016 | 1019 |
| 1017 // Allocates a fixed double array with uninitialized values. Returns | 1020 // Allocates a fixed double array with uninitialized values. Returns |
| 1018 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 1021 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
| 1019 // Please note this does not perform a garbage collection. | 1022 // Please note this does not perform a garbage collection. |
| 1020 MUST_USE_RESULT MaybeObject* AllocateUninitializedFixedDoubleArray( | 1023 MUST_USE_RESULT MaybeObject* AllocateUninitializedFixedDoubleArray( |
| 1021 int length, | 1024 int length, |
| 1022 PretenureFlag pretenure = NOT_TENURED); | 1025 PretenureFlag pretenure = NOT_TENURED); |
| 1023 | 1026 |
| 1024 // Allocates a fixed double array with hole values. Returns | 1027 // Allocates a fixed double array with hole values. Returns |
| 1025 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. | 1028 // Failure::RetryAfterGC(requested_bytes, space) if the allocation failed. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 // Allocates a function initialized with a shared part. | 1071 // Allocates a function initialized with a shared part. |
| 1069 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 1072 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 1070 // failed. | 1073 // failed. |
| 1071 // Please note this does not perform a garbage collection. | 1074 // Please note this does not perform a garbage collection. |
| 1072 MUST_USE_RESULT MaybeObject* AllocateFunction( | 1075 MUST_USE_RESULT MaybeObject* AllocateFunction( |
| 1073 Map* function_map, | 1076 Map* function_map, |
| 1074 SharedFunctionInfo* shared, | 1077 SharedFunctionInfo* shared, |
| 1075 Object* prototype, | 1078 Object* prototype, |
| 1076 PretenureFlag pretenure = TENURED); | 1079 PretenureFlag pretenure = TENURED); |
| 1077 | 1080 |
| 1078 // Arguments object size. | 1081 // Sloppy mode arguments object size. |
| 1079 static const int kArgumentsObjectSize = | 1082 static const int kSloppyArgumentsObjectSize = |
| 1080 JSObject::kHeaderSize + 2 * kPointerSize; | 1083 JSObject::kHeaderSize + 2 * kPointerSize; |
| 1081 // Strict mode arguments has no callee so it is smaller. | 1084 // Strict mode arguments has no callee so it is smaller. |
| 1082 static const int kArgumentsObjectSizeStrict = | 1085 static const int kStrictArgumentsObjectSize = |
| 1083 JSObject::kHeaderSize + 1 * kPointerSize; | 1086 JSObject::kHeaderSize + 1 * kPointerSize; |
| 1084 // Indicies for direct access into argument objects. | 1087 // Indicies for direct access into argument objects. |
| 1085 static const int kArgumentsLengthIndex = 0; | 1088 static const int kArgumentsLengthIndex = 0; |
| 1086 // callee is only valid in non-strict mode. | 1089 // callee is only valid in sloppy mode. |
| 1087 static const int kArgumentsCalleeIndex = 1; | 1090 static const int kArgumentsCalleeIndex = 1; |
| 1088 | 1091 |
| 1089 // Allocates an arguments object - optionally with an elements array. | 1092 // Allocates an arguments object - optionally with an elements array. |
| 1090 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 1093 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 1091 // failed. | 1094 // failed. |
| 1092 // Please note this does not perform a garbage collection. | 1095 // Please note this does not perform a garbage collection. |
| 1093 MUST_USE_RESULT MaybeObject* AllocateArgumentsObject( | 1096 MUST_USE_RESULT MaybeObject* AllocateArgumentsObject( |
| 1094 Object* callee, int length); | 1097 Object* callee, int length); |
| 1095 | 1098 |
| 1096 // Same as NewNumberFromDouble, but may return a preallocated/immutable | 1099 // Same as NewNumberFromDouble, but may return a preallocated/immutable |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 void TracePathToGlobal(); | 1500 void TracePathToGlobal(); |
| 1498 #endif | 1501 #endif |
| 1499 | 1502 |
| 1500 // Callback function passed to Heap::Iterate etc. Copies an object if | 1503 // Callback function passed to Heap::Iterate etc. Copies an object if |
| 1501 // necessary, the object might be promoted to an old space. The caller must | 1504 // necessary, the object might be promoted to an old space. The caller must |
| 1502 // ensure the precondition that the object is (a) a heap object and (b) in | 1505 // ensure the precondition that the object is (a) a heap object and (b) in |
| 1503 // the heap's from space. | 1506 // the heap's from space. |
| 1504 static inline void ScavengePointer(HeapObject** p); | 1507 static inline void ScavengePointer(HeapObject** p); |
| 1505 static inline void ScavengeObject(HeapObject** p, HeapObject* object); | 1508 static inline void ScavengeObject(HeapObject** p, HeapObject* object); |
| 1506 | 1509 |
| 1510 enum ScratchpadSlotMode { |
| 1511 IGNORE_SCRATCHPAD_SLOT, |
| 1512 RECORD_SCRATCHPAD_SLOT |
| 1513 }; |
| 1514 |
| 1507 // An object may have an AllocationSite associated with it through a trailing | 1515 // An object may have an AllocationSite associated with it through a trailing |
| 1508 // AllocationMemento. Its feedback should be updated when objects are found | 1516 // AllocationMemento. Its feedback should be updated when objects are found |
| 1509 // in the heap. | 1517 // in the heap. |
| 1510 static inline void UpdateAllocationSiteFeedback(HeapObject* object); | 1518 static inline void UpdateAllocationSiteFeedback( |
| 1519 HeapObject* object, ScratchpadSlotMode mode); |
| 1511 | 1520 |
| 1512 // Support for partial snapshots. After calling this we have a linear | 1521 // Support for partial snapshots. After calling this we have a linear |
| 1513 // space to write objects in each space. | 1522 // space to write objects in each space. |
| 1514 void ReserveSpace(int *sizes, Address* addresses); | 1523 void ReserveSpace(int *sizes, Address* addresses); |
| 1515 | 1524 |
| 1516 // | 1525 // |
| 1517 // Support for the API. | 1526 // Support for the API. |
| 1518 // | 1527 // |
| 1519 | 1528 |
| 1520 bool CreateApiObjects(); | 1529 bool CreateApiObjects(); |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2305 // Allocates a fixed-size allocation sites scratchpad. | 2314 // Allocates a fixed-size allocation sites scratchpad. |
| 2306 MUST_USE_RESULT MaybeObject* AllocateAllocationSitesScratchpad(); | 2315 MUST_USE_RESULT MaybeObject* AllocateAllocationSitesScratchpad(); |
| 2307 | 2316 |
| 2308 // Sets used allocation sites entries to undefined. | 2317 // Sets used allocation sites entries to undefined. |
| 2309 void FlushAllocationSitesScratchpad(); | 2318 void FlushAllocationSitesScratchpad(); |
| 2310 | 2319 |
| 2311 // Initializes the allocation sites scratchpad with undefined values. | 2320 // Initializes the allocation sites scratchpad with undefined values. |
| 2312 void InitializeAllocationSitesScratchpad(); | 2321 void InitializeAllocationSitesScratchpad(); |
| 2313 | 2322 |
| 2314 // Adds an allocation site to the scratchpad if there is space left. | 2323 // Adds an allocation site to the scratchpad if there is space left. |
| 2315 void AddAllocationSiteToScratchpad(AllocationSite* site); | 2324 void AddAllocationSiteToScratchpad(AllocationSite* site, |
| 2325 ScratchpadSlotMode mode); |
| 2316 | 2326 |
| 2317 void UpdateSurvivalRateTrend(int start_new_space_size); | 2327 void UpdateSurvivalRateTrend(int start_new_space_size); |
| 2318 | 2328 |
| 2319 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING }; | 2329 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING }; |
| 2320 | 2330 |
| 2321 static const int kYoungSurvivalRateHighThreshold = 90; | 2331 static const int kYoungSurvivalRateHighThreshold = 90; |
| 2322 static const int kYoungSurvivalRateLowThreshold = 10; | 2332 static const int kYoungSurvivalRateLowThreshold = 10; |
| 2323 static const int kYoungSurvivalRateAllowedDeviation = 15; | 2333 static const int kYoungSurvivalRateAllowedDeviation = 15; |
| 2324 | 2334 |
| 2325 static const int kOldSurvivalRateLowThreshold = 20; | 2335 static const int kOldSurvivalRateLowThreshold = 20; |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3114 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3124 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 3115 | 3125 |
| 3116 private: | 3126 private: |
| 3117 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3127 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 3118 }; | 3128 }; |
| 3119 #endif // DEBUG | 3129 #endif // DEBUG |
| 3120 | 3130 |
| 3121 } } // namespace v8::internal | 3131 } } // namespace v8::internal |
| 3122 | 3132 |
| 3123 #endif // V8_HEAP_H_ | 3133 #endif // V8_HEAP_H_ |
| OLD | NEW |