OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/ic/ic.h" | 5 #include "src/ic/ic.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/api-arguments-inl.h" | 10 #include "src/api-arguments-inl.h" |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 } | 429 } |
430 | 430 |
431 // static | 431 // static |
432 void IC::OnFeedbackChanged(Isolate* isolate, JSFunction* host_function) { | 432 void IC::OnFeedbackChanged(Isolate* isolate, JSFunction* host_function) { |
433 Code* host = host_function->shared()->code(); | 433 Code* host = host_function->shared()->code(); |
434 | 434 |
435 if (host->kind() == Code::FUNCTION) { | 435 if (host->kind() == Code::FUNCTION) { |
436 TypeFeedbackInfo* info = TypeFeedbackInfo::cast(host->type_feedback_info()); | 436 TypeFeedbackInfo* info = TypeFeedbackInfo::cast(host->type_feedback_info()); |
437 info->change_own_type_change_checksum(); | 437 info->change_own_type_change_checksum(); |
438 host->set_profiler_ticks(0); | 438 host->set_profiler_ticks(0); |
| 439 } else if (host_function->IsInterpreted()) { |
| 440 host_function->shared()->set_profiler_ticks(0); |
439 } | 441 } |
440 isolate->runtime_profiler()->NotifyICChanged(); | 442 isolate->runtime_profiler()->NotifyICChanged(); |
441 // TODO(2029): When an optimized function is patched, it would | 443 // TODO(2029): When an optimized function is patched, it would |
442 // be nice to propagate the corresponding type information to its | 444 // be nice to propagate the corresponding type information to its |
443 // unoptimized version for the benefit of later inlining. | 445 // unoptimized version for the benefit of later inlining. |
444 } | 446 } |
445 | 447 |
446 void IC::PostPatching(Address address, Code* target, Code* old_target) { | 448 void IC::PostPatching(Address address, Code* target, Code* old_target) { |
447 // Type vector based ICs update these statistics at a different time because | 449 // Type vector based ICs update these statistics at a different time because |
448 // they don't always patch on state change. | 450 // they don't always patch on state change. |
(...skipping 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3104 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 3106 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
3105 it.Next(); | 3107 it.Next(); |
3106 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 3108 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
3107 Object::GetProperty(&it)); | 3109 Object::GetProperty(&it)); |
3108 } | 3110 } |
3109 | 3111 |
3110 return *result; | 3112 return *result; |
3111 } | 3113 } |
3112 } // namespace internal | 3114 } // namespace internal |
3113 } // namespace v8 | 3115 } // namespace v8 |
OLD | NEW |