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 10375 matching lines...) Loading... |
10386 if (kind == NULL || *kind == target->kind()) { | 10386 if (kind == NULL || *kind == target->kind()) { |
10387 IC::Clear(this->GetIsolate(), info->pc(), | 10387 IC::Clear(this->GetIsolate(), info->pc(), |
10388 info->host()->constant_pool()); | 10388 info->host()->constant_pool()); |
10389 } | 10389 } |
10390 } | 10390 } |
10391 } | 10391 } |
10392 } | 10392 } |
10393 | 10393 |
10394 | 10394 |
10395 void SharedFunctionInfo::ClearTypeFeedbackInfo() { | 10395 void SharedFunctionInfo::ClearTypeFeedbackInfo() { |
10396 TypeFeedbackVector* vector = feedback_vector(); | 10396 feedback_vector()->ClearSlots(this); |
10397 Heap* heap = GetHeap(); | |
10398 int length = vector->length(); | |
10399 | |
10400 for (int i = 0; i < length; i++) { | |
10401 Object* obj = vector->get(i); | |
10402 if (obj->IsHeapObject()) { | |
10403 InstanceType instance_type = | |
10404 HeapObject::cast(obj)->map()->instance_type(); | |
10405 switch (instance_type) { | |
10406 case ALLOCATION_SITE_TYPE: | |
10407 // AllocationSites are not cleared because they do not store | |
10408 // information that leaks. | |
10409 break; | |
10410 // Fall through... | |
10411 default: | |
10412 vector->set(i, TypeFeedbackVector::RawUninitializedSentinel(heap), | |
10413 SKIP_WRITE_BARRIER); | |
10414 } | |
10415 } | |
10416 } | |
10417 } | 10397 } |
10418 | 10398 |
10419 | 10399 |
10420 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { | 10400 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { |
10421 DisallowHeapAllocation no_gc; | 10401 DisallowHeapAllocation no_gc; |
10422 DCHECK(kind() == FUNCTION); | 10402 DCHECK(kind() == FUNCTION); |
10423 BackEdgeTable back_edges(this, &no_gc); | 10403 BackEdgeTable back_edges(this, &no_gc); |
10424 for (uint32_t i = 0; i < back_edges.length(); i++) { | 10404 for (uint32_t i = 0; i < back_edges.length(); i++) { |
10425 if (back_edges.pc_offset(i) == pc_offset) return back_edges.ast_id(i); | 10405 if (back_edges.pc_offset(i) == pc_offset) return back_edges.ast_id(i); |
10426 } | 10406 } |
(...skipping 5961 matching lines...) Loading... |
16388 Handle<DependentCode> codes = | 16368 Handle<DependentCode> codes = |
16389 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), | 16369 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), |
16390 DependentCode::kPropertyCellChangedGroup, | 16370 DependentCode::kPropertyCellChangedGroup, |
16391 info->object_wrapper()); | 16371 info->object_wrapper()); |
16392 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 16372 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
16393 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 16373 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
16394 cell, info->zone()); | 16374 cell, info->zone()); |
16395 } | 16375 } |
16396 | 16376 |
16397 } } // namespace v8::internal | 16377 } } // namespace v8::internal |
OLD | NEW |