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

Side by Side Diff: src/ic.cc

Issue 11412007: Removed a bunch of GetExistingThreadLocal calls by threading the Isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed feedback Created 8 years, 1 month 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/ia32/full-codegen-ia32.cc ('k') | src/ic-inl.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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 new_state == UNINITIALIZED || new_state == PREMONOMORPHIC; 303 new_state == UNINITIALIZED || new_state == PREMONOMORPHIC;
304 return (was_uninitialized && !is_uninitialized) ? 1 : 304 return (was_uninitialized && !is_uninitialized) ? 1 :
305 (!was_uninitialized && is_uninitialized) ? -1 : 0; 305 (!was_uninitialized && is_uninitialized) ? -1 : 0;
306 } 306 }
307 307
308 308
309 void IC::PostPatching(Address address, Code* target, Code* old_target) { 309 void IC::PostPatching(Address address, Code* target, Code* old_target) {
310 if (FLAG_type_info_threshold == 0 && !FLAG_watch_ic_patching) { 310 if (FLAG_type_info_threshold == 0 && !FLAG_watch_ic_patching) {
311 return; 311 return;
312 } 312 }
313 Code* host = target->GetHeap()->isolate()-> 313 Isolate* isolate = target->GetHeap()->isolate();
314 Code* host = isolate->
314 inner_pointer_to_code_cache()->GetCacheEntry(address)->code; 315 inner_pointer_to_code_cache()->GetCacheEntry(address)->code;
315 if (host->kind() != Code::FUNCTION) return; 316 if (host->kind() != Code::FUNCTION) return;
316 317
317 if (FLAG_type_info_threshold > 0 && 318 if (FLAG_type_info_threshold > 0 &&
318 old_target->is_inline_cache_stub() && 319 old_target->is_inline_cache_stub() &&
319 target->is_inline_cache_stub()) { 320 target->is_inline_cache_stub()) {
320 int delta = ComputeTypeInfoCountDelta(old_target->ic_state(), 321 int delta = ComputeTypeInfoCountDelta(old_target->ic_state(),
321 target->ic_state()); 322 target->ic_state());
322 // Not all Code objects have TypeFeedbackInfo. 323 // Not all Code objects have TypeFeedbackInfo.
323 if (host->type_feedback_info()->IsTypeFeedbackInfo() && delta != 0) { 324 if (host->type_feedback_info()->IsTypeFeedbackInfo() && delta != 0) {
324 TypeFeedbackInfo* info = 325 TypeFeedbackInfo* info =
325 TypeFeedbackInfo::cast(host->type_feedback_info()); 326 TypeFeedbackInfo::cast(host->type_feedback_info());
326 info->change_ic_with_type_info_count(delta); 327 info->change_ic_with_type_info_count(delta);
327 } 328 }
328 } 329 }
329 if (host->type_feedback_info()->IsTypeFeedbackInfo()) { 330 if (host->type_feedback_info()->IsTypeFeedbackInfo()) {
330 TypeFeedbackInfo* info = 331 TypeFeedbackInfo* info =
331 TypeFeedbackInfo::cast(host->type_feedback_info()); 332 TypeFeedbackInfo::cast(host->type_feedback_info());
332 info->change_own_type_change_checksum(); 333 info->change_own_type_change_checksum();
333 } 334 }
334 if (FLAG_watch_ic_patching) { 335 if (FLAG_watch_ic_patching) {
335 host->set_profiler_ticks(0); 336 host->set_profiler_ticks(0);
336 Isolate::Current()->runtime_profiler()->NotifyICChanged(); 337 isolate->runtime_profiler()->NotifyICChanged();
337 } 338 }
338 // TODO(2029): When an optimized function is patched, it would 339 // TODO(2029): When an optimized function is patched, it would
339 // be nice to propagate the corresponding type information to its 340 // be nice to propagate the corresponding type information to its
340 // unoptimized version for the benefit of later inlining. 341 // unoptimized version for the benefit of later inlining.
341 } 342 }
342 343
343 344
344 void IC::Clear(Address address) { 345 void IC::Clear(Address address) {
345 Code* target = GetTargetAtAddress(address); 346 Code* target = GetTargetAtAddress(address);
346 347
(...skipping 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after
2768 #undef ADDR 2769 #undef ADDR
2769 }; 2770 };
2770 2771
2771 2772
2772 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2773 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2773 return IC_utilities[id]; 2774 return IC_utilities[id];
2774 } 2775 }
2775 2776
2776 2777
2777 } } // namespace v8::internal 2778 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ic-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698