Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index 5e8a2e516d9d009bafdeca4605e5cd7e6bbe38a0..672b8c1632570599cd0b791a47173394c365b010 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -178,7 +178,7 @@ namespace internal { |
V(Smi, last_script_id, LastScriptId) \ |
V(Script, empty_script, EmptyScript) \ |
V(Smi, real_stack_limit, RealStackLimit) \ |
- V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ |
+ V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ |
V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ |
V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \ |
V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ |
@@ -186,6 +186,7 @@ namespace internal { |
V(JSObject, observation_state, ObservationState) \ |
V(Map, external_map, ExternalMap) \ |
V(Symbol, frozen_symbol, FrozenSymbol) \ |
+ V(Symbol, elements_transition_symbol, ElementsTransitionSymbol) \ |
V(SeededNumberDictionary, empty_slow_element_dictionary, \ |
EmptySlowElementDictionary) \ |
V(Symbol, observed_symbol, ObservedSymbol) \ |
@@ -482,6 +483,7 @@ enum ArrayStorageAllocationMode { |
INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE |
}; |
+ |
class Heap { |
public: |
// Configure heap size before setup. Return false if the heap has been |
@@ -1254,7 +1256,10 @@ class Heap { |
void EnsureHeapIsIterable(); |
// Notify the heap that a context has been disposed. |
- int NotifyContextDisposed(); |
+ int NotifyContextDisposed() { |
+ flush_monomorphic_ics_ = true; |
+ return ++contexts_disposed_; |
+ } |
// Utility to invoke the scavenger. This is needed in test code to |
// ensure correct callback for weak global handles. |
@@ -1395,7 +1400,7 @@ class Heap { |
// Finds out which space an object should get promoted to based on its type. |
inline OldSpace* TargetSpace(HeapObject* object); |
- inline AllocationSpace TargetSpaceId(InstanceType type); |
+ static inline AllocationSpace TargetSpaceId(InstanceType type); |
// Sets the stub_cache_ (only used when expanding the dictionary). |
void public_set_code_stubs(UnseededNumberDictionary* value) { |
@@ -1542,19 +1547,16 @@ class Heap { |
MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(int length, |
PretenureFlag pretenure); |
- // Predicate that governs global pre-tenuring decisions based on observed |
- // promotion rates of previous collections. |
- inline bool ShouldGloballyPretenure() { |
- return FLAG_pretenuring && new_space_high_promotion_mode_active_; |
- } |
- |
// This is only needed for testing high promotion mode. |
void SetNewSpaceHighPromotionModeActive(bool mode) { |
new_space_high_promotion_mode_active_ = mode; |
} |
+ // Returns the allocation mode (pre-tenuring) based on observed promotion |
+ // rates of previous collections. |
inline PretenureFlag GetPretenureMode() { |
- return new_space_high_promotion_mode_active_ ? TENURED : NOT_TENURED; |
+ return FLAG_pretenuring && new_space_high_promotion_mode_active_ |
+ ? TENURED : NOT_TENURED; |
} |
inline Address* NewSpaceHighPromotionModeActiveAddress() { |