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

Unified Diff: src/liveedit.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: REBASE. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/liveedit.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index a87c31bac17f544093162e0f93136aaa363eb864..b1476a0b6ec32c09a8b04f7fb86e729234db32f7 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -605,13 +605,9 @@ static int GetArrayLength(Handle<JSArray> array) {
}
-void FunctionInfoWrapper::SetInitialProperties(Handle<String> name,
- int start_position,
- int end_position,
- int param_num,
- int literal_count,
- int slot_count,
- int parent_index) {
+void FunctionInfoWrapper::SetInitialProperties(
+ Handle<String> name, int start_position, int end_position, int param_num,
+ int literal_count, int slot_count, int ic_slot_count, int parent_index) {
HandleScope scope(isolate());
this->SetField(kFunctionNameOffset_, name);
this->SetSmiValueField(kStartPositionOffset_, start_position);
@@ -619,6 +615,7 @@ void FunctionInfoWrapper::SetInitialProperties(Handle<String> name,
this->SetSmiValueField(kParamNumOffset_, param_num);
this->SetSmiValueField(kLiteralNumOffset_, literal_count);
this->SetSmiValueField(kSlotNumOffset_, slot_count);
+ this->SetSmiValueField(kICSlotNumOffset_, ic_slot_count);
this->SetSmiValueField(kParentIndexOffset_, parent_index);
}
@@ -658,12 +655,15 @@ Handle<TypeFeedbackVector> FunctionInfoWrapper::GetFeedbackVector() {
Handle<SharedFunctionInfo> shared =
Handle<SharedFunctionInfo>::cast(raw_result);
result = Handle<TypeFeedbackVector>(shared->feedback_vector(), isolate());
- CHECK_EQ(result->length(), GetSlotCount());
+ CHECK_EQ(result->Slots(), GetSlotCount());
+ CHECK_EQ(result->ICSlots(), GetICSlotCount());
} else {
// Scripts may never have a SharedFunctionInfo created, so
// create a type feedback vector here.
int slot_count = GetSlotCount();
- result = isolate()->factory()->NewTypeFeedbackVector(slot_count);
+ int ic_slot_count = GetICSlotCount();
+ result =
+ isolate()->factory()->NewTypeFeedbackVector(slot_count, ic_slot_count);
}
return result;
}
@@ -706,11 +706,10 @@ class FunctionInfoListener {
void FunctionStarted(FunctionLiteral* fun) {
HandleScope scope(isolate());
FunctionInfoWrapper info = FunctionInfoWrapper::Create(isolate());
- info.SetInitialProperties(fun->name(), fun->start_position(),
- fun->end_position(), fun->parameter_count(),
- fun->materialized_literal_count(),
- fun->slot_count(),
- current_parent_index_);
+ info.SetInitialProperties(
+ fun->name(), fun->start_position(), fun->end_position(),
+ fun->parameter_count(), fun->materialized_literal_count(),
+ fun->slot_count(), fun->ic_slot_count(), current_parent_index_);
current_parent_index_ = len_;
SetElementSloppy(result_, len_, info.GetJSArray());
len_++;
« no previous file with comments | « src/liveedit.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698