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 #ifndef V8_IC_INL_H_ | 5 #ifndef V8_IC_INL_H_ |
6 #define V8_IC_INL_H_ | 6 #define V8_IC_INL_H_ |
7 | 7 |
8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
9 | 9 |
10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 void IC::set_target(Code* code) { | 87 void IC::set_target(Code* code) { |
88 SetTargetAtAddress(address(), code, constant_pool()); | 88 SetTargetAtAddress(address(), code, constant_pool()); |
89 } | 89 } |
90 | 90 |
91 Code* IC::target() const { | 91 Code* IC::target() const { |
92 return GetTargetAtAddress(address(), constant_pool()); | 92 return GetTargetAtAddress(address(), constant_pool()); |
93 } | 93 } |
94 | 94 |
95 bool IC::IsHandler(Object* object) { | 95 bool IC::IsHandler(Object* object) { |
96 return (object->IsSmi() && (object != nullptr)) || | 96 return (object->IsSmi() && (object != nullptr)) || (object->IsTuple3()) || |
97 (object->IsCode() && Code::cast(object)->is_handler()); | 97 (object->IsCode() && Code::cast(object)->is_handler()); |
98 } | 98 } |
99 | 99 |
100 Handle<Map> IC::GetHandlerCacheHolder(Handle<Map> receiver_map, | 100 Handle<Map> IC::GetHandlerCacheHolder(Handle<Map> receiver_map, |
101 bool receiver_is_holder, Isolate* isolate, | 101 bool receiver_is_holder, Isolate* isolate, |
102 CacheHolderFlag* flag) { | 102 CacheHolderFlag* flag) { |
103 if (receiver_is_holder) { | 103 if (receiver_is_holder) { |
104 *flag = kCacheOnReceiver; | 104 *flag = kCacheOnReceiver; |
105 return receiver_map; | 105 return receiver_map; |
106 } | 106 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { | 147 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { |
148 Code* host = | 148 Code* host = |
149 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; | 149 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; |
150 return (host->kind() == Code::OPTIMIZED_FUNCTION && | 150 return (host->kind() == Code::OPTIMIZED_FUNCTION && |
151 host->marked_for_deoptimization()); | 151 host->marked_for_deoptimization()); |
152 } | 152 } |
153 } // namespace internal | 153 } // namespace internal |
154 } // namespace v8 | 154 } // namespace v8 |
155 | 155 |
156 #endif // V8_IC_INL_H_ | 156 #endif // V8_IC_INL_H_ |
OLD | NEW |