OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
(...skipping 10479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10490 if (kind == NULL || *kind == target->kind()) { | 10490 if (kind == NULL || *kind == target->kind()) { |
10491 IC::Clear(this->GetIsolate(), info->pc(), | 10491 IC::Clear(this->GetIsolate(), info->pc(), |
10492 info->host()->constant_pool()); | 10492 info->host()->constant_pool()); |
10493 } | 10493 } |
10494 } | 10494 } |
10495 } | 10495 } |
10496 } | 10496 } |
10497 | 10497 |
10498 | 10498 |
10499 void SharedFunctionInfo::ClearTypeFeedbackInfo() { | 10499 void SharedFunctionInfo::ClearTypeFeedbackInfo() { |
10500 TypeFeedbackVector* vector = feedback_vector(); | 10500 feedback_vector()->ClearSlots(this); |
10501 Heap* heap = GetHeap(); | |
10502 int length = vector->length(); | |
10503 | |
10504 for (int i = 0; i < length; i++) { | |
10505 Object* obj = vector->get(i); | |
10506 if (obj->IsHeapObject()) { | |
10507 InstanceType instance_type = | |
10508 HeapObject::cast(obj)->map()->instance_type(); | |
10509 switch (instance_type) { | |
10510 case ALLOCATION_SITE_TYPE: | |
10511 // AllocationSites are not cleared because they do not store | |
10512 // information that leaks. | |
10513 break; | |
10514 // Fall through... | |
10515 default: | |
10516 vector->set(i, TypeFeedbackVector::RawUninitializedSentinel(heap), | |
10517 SKIP_WRITE_BARRIER); | |
10518 } | |
10519 } | |
10520 } | |
10521 } | 10501 } |
10522 | 10502 |
10523 | 10503 |
10524 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10504 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
10525 DisallowHeapAllocation no_gc; | 10505 DisallowHeapAllocation no_gc; |
10526 DCHECK(kind() == FUNCTION); | 10506 DCHECK(kind() == FUNCTION); |
10527 BackEdgeTable back_edges(this, &no_gc); | 10507 BackEdgeTable back_edges(this, &no_gc); |
10528 for (uint32_t i = 0; i < back_edges.length(); i++) { | 10508 for (uint32_t i = 0; i < back_edges.length(); i++) { |
10529 if (back_edges.pc_offset(i) == pc_offset) return back_edges.ast_id(i); | 10509 if (back_edges.pc_offset(i) == pc_offset) return back_edges.ast_id(i); |
10530 } | 10510 } |
(...skipping 5984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16515 Handle<DependentCode> codes = | 16495 Handle<DependentCode> codes = |
16516 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), | 16496 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), |
16517 DependentCode::kPropertyCellChangedGroup, | 16497 DependentCode::kPropertyCellChangedGroup, |
16518 info->object_wrapper()); | 16498 info->object_wrapper()); |
16519 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 16499 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
16520 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 16500 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
16521 cell, info->zone()); | 16501 cell, info->zone()); |
16522 } | 16502 } |
16523 | 16503 |
16524 } } // namespace v8::internal | 16504 } } // namespace v8::internal |
OLD | NEW |