| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index f9a52e59c7455d2986ade2ac70296c2dd5db5034..c526b4810cbfc43b1cdec83507af89b809eb9d8c 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,9 @@ bool DependentCode::MarkCodeForDeoptimization(
|
| if (!code->marked_for_deoptimization()) {
|
| code->set_marked_for_deoptimization(true);
|
| marked = true;
|
| + if (instant_optimization) {
|
| + code->set_marked_for_instant_optimization(true);
|
| + }
|
| }
|
| } else {
|
| CompilationInfo* info = compilation_info_at(i);
|
|
|