OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 Code* host = target->GetHeap()->isolate()-> | 313 Code* host = target->GetHeap()->isolate()-> |
314 inner_pointer_to_code_cache()->GetCacheEntry(address)->code; | 314 inner_pointer_to_code_cache()->GetCacheEntry(address)->code; |
315 if (host->kind() != Code::FUNCTION) return; | 315 if (host->kind() != Code::FUNCTION) return; |
316 | 316 |
317 if (FLAG_type_info_threshold > 0 && | 317 if (FLAG_type_info_threshold > 0 && |
318 old_target->is_inline_cache_stub() && | 318 old_target->is_inline_cache_stub() && |
319 target->is_inline_cache_stub()) { | 319 target->is_inline_cache_stub()) { |
320 int delta = ComputeTypeInfoCountDelta(old_target->ic_state(), | 320 int delta = ComputeTypeInfoCountDelta(old_target->ic_state(), |
321 target->ic_state()); | 321 target->ic_state()); |
322 // Not all Code objects have TypeFeedbackInfo. | 322 // Not all Code objects have TypeFeedbackInfo. |
323 if (delta != 0 && host->type_feedback_info()->IsTypeFeedbackInfo()) { | 323 if (host->type_feedback_info()->IsTypeFeedbackInfo() && delta != 0) { |
324 TypeFeedbackInfo* info = | 324 TypeFeedbackInfo* info = |
325 TypeFeedbackInfo::cast(host->type_feedback_info()); | 325 TypeFeedbackInfo::cast(host->type_feedback_info()); |
326 info->set_ic_with_type_info_count( | 326 info->change_ic_with_type_info_count(delta); |
327 info->ic_with_type_info_count() + delta); | |
328 } | 327 } |
329 } | 328 } |
| 329 if (host->type_feedback_info()->IsTypeFeedbackInfo()) { |
| 330 TypeFeedbackInfo* info = |
| 331 TypeFeedbackInfo::cast(host->type_feedback_info()); |
| 332 info->change_own_type_change_checksum(); |
| 333 } |
330 if (FLAG_watch_ic_patching) { | 334 if (FLAG_watch_ic_patching) { |
331 host->set_profiler_ticks(0); | 335 host->set_profiler_ticks(0); |
332 Isolate::Current()->runtime_profiler()->NotifyICChanged(); | 336 Isolate::Current()->runtime_profiler()->NotifyICChanged(); |
333 } | 337 } |
334 // TODO(2029): When an optimized function is patched, it would | 338 // TODO(2029): When an optimized function is patched, it would |
335 // be nice to propagate the corresponding type information to its | 339 // be nice to propagate the corresponding type information to its |
336 // unoptimized version for the benefit of later inlining. | 340 // unoptimized version for the benefit of later inlining. |
337 } | 341 } |
338 | 342 |
339 | 343 |
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2697 #undef ADDR | 2701 #undef ADDR |
2698 }; | 2702 }; |
2699 | 2703 |
2700 | 2704 |
2701 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2705 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2702 return IC_utilities[id]; | 2706 return IC_utilities[id]; |
2703 } | 2707 } |
2704 | 2708 |
2705 | 2709 |
2706 } } // namespace v8::internal | 2710 } } // namespace v8::internal |
OLD | NEW |