| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 0e3750664eaa7941824c14b645a7f5a001bc4d71..bfbe558c89f27f52064ff284ae63807dbabd8013 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -575,6 +575,9 @@ void Heap::GarbageCollectionEpilogue() {
|
| ZapFromSpace();
|
| }
|
|
|
| + // Process pretenuring feedback and update allocation sites.
|
| + ProcessPretenuringFeedback();
|
| +
|
| #ifdef VERIFY_HEAP
|
| if (FLAG_verify_heap) {
|
| Verify();
|
| @@ -1618,8 +1621,6 @@ void Heap::Scavenge() {
|
| IncrementYoungSurvivorsCounter(static_cast<int>(
|
| (PromotedSpaceSizeOfObjects() - survived_watermark) + new_space_.Size()));
|
|
|
| - ProcessPretenuringFeedback();
|
| -
|
| LOG(isolate_, ResourceEvent("scavenge", "end"));
|
|
|
| gc_state_ = NOT_IN_GC;
|
| @@ -2669,8 +2670,7 @@ MaybeObject* Heap::AllocateTypeFeedbackInfo() {
|
| if (!maybe_info->To(&info)) return maybe_info;
|
| }
|
| info->initialize_storage();
|
| - info->set_type_feedback_cells(TypeFeedbackCells::cast(empty_fixed_array()),
|
| - SKIP_WRITE_BARRIER);
|
| + info->set_feedback_vector(empty_fixed_array(), SKIP_WRITE_BARRIER);
|
| return info;
|
| }
|
|
|
| @@ -3627,8 +3627,14 @@ void Heap::InitializeAllocationSitesScratchpad() {
|
|
|
| void Heap::AddAllocationSiteToScratchpad(AllocationSite* site) {
|
| if (allocation_sites_scratchpad_length_ < kAllocationSiteScratchpadSize) {
|
| + // We cannot use the normal write-barrier because slots need to be
|
| + // recorded with non-incremental marking as well. We have to explicitly
|
| + // record the slot to take evacuation candidates into account.
|
| allocation_sites_scratchpad()->set(
|
| - allocation_sites_scratchpad_length_, site);
|
| + allocation_sites_scratchpad_length_, site, SKIP_WRITE_BARRIER);
|
| + Object** slot = allocation_sites_scratchpad()->RawFieldOfElementAt(
|
| + allocation_sites_scratchpad_length_);
|
| + mark_compact_collector()->RecordSlot(slot, slot, *slot);
|
| allocation_sites_scratchpad_length_++;
|
| }
|
| }
|
| @@ -3775,7 +3781,6 @@ MaybeObject* Heap::AllocateJSMessageObject(String* type,
|
| int start_position,
|
| int end_position,
|
| Object* script,
|
| - Object* stack_trace,
|
| Object* stack_frames) {
|
| Object* result;
|
| { MaybeObject* maybe_result = Allocate(message_object_map(), NEW_SPACE);
|
| @@ -3790,7 +3795,6 @@ MaybeObject* Heap::AllocateJSMessageObject(String* type,
|
| message->set_start_position(start_position);
|
| message->set_end_position(end_position);
|
| message->set_script(script);
|
| - message->set_stack_trace(stack_trace);
|
| message->set_stack_frames(stack_frames);
|
| return result;
|
| }
|
|
|