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)) || (object->IsTuple3()) || | 96 return (object->IsSmi() && (object != nullptr)) || object->IsTuple3() || |
| 97 object->IsFixedArray() || |
97 (object->IsCode() && Code::cast(object)->is_handler()); | 98 (object->IsCode() && Code::cast(object)->is_handler()); |
98 } | 99 } |
99 | 100 |
100 Handle<Map> IC::GetHandlerCacheHolder(Handle<Map> receiver_map, | 101 Handle<Map> IC::GetHandlerCacheHolder(Handle<Map> receiver_map, |
101 bool receiver_is_holder, Isolate* isolate, | 102 bool receiver_is_holder, Isolate* isolate, |
102 CacheHolderFlag* flag) { | 103 CacheHolderFlag* flag) { |
103 if (receiver_is_holder) { | 104 if (receiver_is_holder) { |
104 *flag = kCacheOnReceiver; | 105 *flag = kCacheOnReceiver; |
105 return receiver_map; | 106 return receiver_map; |
106 } | 107 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { | 148 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { |
148 Code* host = | 149 Code* host = |
149 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; | 150 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; |
150 return (host->kind() == Code::OPTIMIZED_FUNCTION && | 151 return (host->kind() == Code::OPTIMIZED_FUNCTION && |
151 host->marked_for_deoptimization()); | 152 host->marked_for_deoptimization()); |
152 } | 153 } |
153 } // namespace internal | 154 } // namespace internal |
154 } // namespace v8 | 155 } // namespace v8 |
155 | 156 |
156 #endif // V8_IC_INL_H_ | 157 #endif // V8_IC_INL_H_ |
OLD | NEW |