Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index c01390c4aa878c165b3c3299f1e3ad37f7d4451a..dfa98799bb8b151ccfd14371aa128b642319d6cd 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -7887,31 +7887,6 @@ bool AllocationSiteInfo::GetElementsKindPayload(ElementsKind* kind) { |
} |
-// Heuristic: We only need to create allocation site info if the boilerplate |
-// elements kind is the initial elements kind. |
-AllocationSiteMode AllocationSiteInfo::GetMode( |
- ElementsKind boilerplate_elements_kind) { |
- if (FLAG_track_allocation_sites && |
- IsFastSmiElementsKind(boilerplate_elements_kind)) { |
- return TRACK_ALLOCATION_SITE; |
- } |
- |
- return DONT_TRACK_ALLOCATION_SITE; |
-} |
- |
- |
-AllocationSiteMode AllocationSiteInfo::GetMode(ElementsKind from, |
- ElementsKind to) { |
- if (FLAG_track_allocation_sites && |
- IsFastSmiElementsKind(from) && |
- (IsFastObjectElementsKind(to) || IsFastDoubleElementsKind(to))) { |
- return TRACK_ALLOCATION_SITE; |
- } |
- |
- return DONT_TRACK_ALLOCATION_SITE; |
-} |
- |
- |
uint32_t StringHasher::MakeArrayIndexHash(uint32_t value, int length) { |
// For array indexes mix the length into the hash as an array index could |
// be zero. |
@@ -8356,13 +8331,13 @@ MaybeObject* JSObject::OptimizeAsPrototype() { |
} |
-MUST_USE_RESULT static MaybeObject* CacheInitialJSArrayMaps( |
+MUST_USE_RESULT MaybeObject* CacheInitialJSArrayMaps( |
Context* native_context, Map* initial_map) { |
// Replace all of the cached initial array maps in the native context with |
// the appropriate transitioned elements kind maps. |
Heap* heap = native_context->GetHeap(); |
MaybeObject* maybe_maps = |
- heap->AllocateFixedArrayWithHoles(kElementsKindCount); |
+ heap->AllocateFixedArrayWithHoles(kElementsKindCount, TENURED); |
FixedArray* maps; |
if (!maybe_maps->To(&maps)) return maybe_maps; |
@@ -8416,7 +8391,8 @@ MaybeObject* JSFunction::SetInstancePrototype(Object* value) { |
Context* native_context = context()->native_context(); |
Object* array_function = native_context->get(Context::ARRAY_FUNCTION_INDEX); |
if (array_function->IsJSFunction() && |
- this == JSFunction::cast(array_function)) { |
+ this == JSFunction::cast(array_function)) { // && |
+ // native_context->js_array_maps()->IsUndefined()) { |
MaybeObject* ok = CacheInitialJSArrayMaps(native_context, new_map); |
if (ok->IsFailure()) return ok; |
} |