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

Side by Side Diff: src/ic.cc

Issue 10867033: Disable speculative LICM when it may lead to unnecessary deopts (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: feedback addressed Created 8 years, 4 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
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698