Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index f9a52e59c7455d2986ade2ac70296c2dd5db5034..07452c68a55a9f4685499d63d2a192ae37acd15f 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -11836,6 +11836,23 @@ Handle<FixedArray> JSObject::SetFastElementsCapacityAndLength( |
| } |
| +void Code::GetICCounts(int* ic_with_type_info_count, |
| + int* ic_total_count, |
| + int* percentage) { |
| + *ic_total_count = 0; |
| + *ic_with_type_info_count = 0; |
| + Object* raw_info = type_feedback_info(); |
| + if (raw_info->IsTypeFeedbackInfo()) { |
| + TypeFeedbackInfo* info = TypeFeedbackInfo::cast(raw_info); |
| + *ic_with_type_info_count = info->ic_with_type_info_count(); |
| + *ic_total_count = info->ic_total_count(); |
| + } |
| + *percentage = *ic_total_count > 0 |
| + ? 100 * *ic_with_type_info_count / *ic_total_count |
| + : 100; |
| +} |
| + |
| + |
| void JSObject::SetFastDoubleElementsCapacityAndLength(Handle<JSObject> object, |
| int capacity, |
| int length) { |
| @@ -12315,7 +12332,8 @@ bool DependentCode::Contains(DependencyGroup group, Code* code) { |
| bool DependentCode::MarkCodeForDeoptimization( |
| Isolate* isolate, |
| - DependentCode::DependencyGroup group) { |
| + DependentCode::DependencyGroup group, |
| + bool instant_optimization) { |
| DisallowHeapAllocation no_allocation_scope; |
| DependentCode::GroupStartIndexes starts(this); |
| int start = starts.at(group); |
| @@ -12331,6 +12349,7 @@ bool DependentCode::MarkCodeForDeoptimization( |
| if (!code->marked_for_deoptimization()) { |
| code->set_marked_for_deoptimization(true); |
| marked = true; |
| + if (instant_optimization) code->set_marked_for_deoptimization(true); |
|
titzer
2014/05/12 12:05:24
You're setting the wrong thing here, I think. Why
Hannes Payer (out of office)
2014/05/12 16:31:19
Done, that was a renaming mistake.
|
| } |
| } else { |
| CompilationInfo* info = compilation_info_at(i); |