Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/objects.cc

Issue 650073002: vector-based ICs did not update type feedback counts correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reduced -inl.h file usage. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 10475 matching lines...) Expand 10 before | Expand all | Expand 10 after
10486 if (kind == NULL || *kind == target->kind()) { 10486 if (kind == NULL || *kind == target->kind()) {
10487 IC::Clear(this->GetIsolate(), info->pc(), 10487 IC::Clear(this->GetIsolate(), info->pc(),
10488 info->host()->constant_pool()); 10488 info->host()->constant_pool());
10489 } 10489 }
10490 } 10490 }
10491 } 10491 }
10492 } 10492 }
10493 10493
10494 10494
10495 void SharedFunctionInfo::ClearTypeFeedbackInfo() { 10495 void SharedFunctionInfo::ClearTypeFeedbackInfo() {
10496 TypeFeedbackVector* vector = feedback_vector(); 10496 feedback_vector()->ClearSlots(this);
10497 Heap* heap = GetHeap();
10498 int length = vector->length();
10499
10500 for (int i = 0; i < length; i++) {
10501 Object* obj = vector->get(i);
10502 if (obj->IsHeapObject()) {
10503 InstanceType instance_type =
10504 HeapObject::cast(obj)->map()->instance_type();
10505 switch (instance_type) {
10506 case ALLOCATION_SITE_TYPE:
10507 // AllocationSites are not cleared because they do not store
10508 // information that leaks.
10509 break;
10510 // Fall through...
10511 default:
10512 vector->set(i, TypeFeedbackVector::RawUninitializedSentinel(heap),
10513 SKIP_WRITE_BARRIER);
10514 }
10515 }
10516 }
10517 } 10497 }
10518 10498
10519 10499
10520 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) { 10500 BailoutId Code::TranslatePcOffsetToAstId(uint32_t pc_offset) {
10521 DisallowHeapAllocation no_gc; 10501 DisallowHeapAllocation no_gc;
10522 DCHECK(kind() == FUNCTION); 10502 DCHECK(kind() == FUNCTION);
10523 BackEdgeTable back_edges(this, &no_gc); 10503 BackEdgeTable back_edges(this, &no_gc);
10524 for (uint32_t i = 0; i < back_edges.length(); i++) { 10504 for (uint32_t i = 0; i < back_edges.length(); i++) {
10525 if (back_edges.pc_offset(i) == pc_offset) return back_edges.ast_id(i); 10505 if (back_edges.pc_offset(i) == pc_offset) return back_edges.ast_id(i);
10526 } 10506 }
(...skipping 5984 matching lines...) Expand 10 before | Expand all | Expand 10 after
16511 Handle<DependentCode> codes = 16491 Handle<DependentCode> codes =
16512 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16492 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16513 DependentCode::kPropertyCellChangedGroup, 16493 DependentCode::kPropertyCellChangedGroup,
16514 info->object_wrapper()); 16494 info->object_wrapper());
16515 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16495 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16516 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16496 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16517 cell, info->zone()); 16497 cell, info->zone());
16518 } 16498 }
16519 16499
16520 } } // namespace v8::internal 16500 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-printer.cc » ('j') | src/type-feedback-vector.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698