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/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 | 128 |
129 void IC::set_target(Code* code) { | 129 void IC::set_target(Code* code) { |
130 SetTargetAtAddress(address(), code, constant_pool()); | 130 SetTargetAtAddress(address(), code, constant_pool()); |
131 target_set_ = true; | 131 target_set_ = true; |
132 } | 132 } |
133 | 133 |
134 | 134 |
135 void LoadIC::set_target(Code* code) { | 135 void LoadIC::set_target(Code* code) { |
136 // The contextual mode must be preserved across IC patching. | 136 // The contextual mode must be preserved across IC patching. |
137 DCHECK(LoadICState::GetContextualMode(code->extra_ic_state()) == | 137 DCHECK(LoadICState::GetTypeofMode(code->extra_ic_state()) == |
138 LoadICState::GetContextualMode(target()->extra_ic_state())); | 138 LoadICState::GetTypeofMode(target()->extra_ic_state())); |
139 // Strongness must be preserved across IC patching. | 139 // Strongness must be preserved across IC patching. |
140 DCHECK(LoadICState::GetLanguageMode(code->extra_ic_state()) == | 140 DCHECK(LoadICState::GetLanguageMode(code->extra_ic_state()) == |
141 LoadICState::GetLanguageMode(target()->extra_ic_state())); | 141 LoadICState::GetLanguageMode(target()->extra_ic_state())); |
142 | 142 |
143 IC::set_target(code); | 143 IC::set_target(code); |
144 } | 144 } |
145 | 145 |
146 | 146 |
147 void StoreIC::set_target(Code* code) { | 147 void StoreIC::set_target(Code* code) { |
148 // Language mode must be preserved across IC patching. | 148 // Language mode must be preserved across IC patching. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { | 233 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { |
234 Code* host = | 234 Code* host = |
235 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; | 235 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; |
236 return (host->kind() == Code::OPTIMIZED_FUNCTION && | 236 return (host->kind() == Code::OPTIMIZED_FUNCTION && |
237 host->marked_for_deoptimization()); | 237 host->marked_for_deoptimization()); |
238 } | 238 } |
239 } | 239 } |
240 } // namespace v8::internal | 240 } // namespace v8::internal |
241 | 241 |
242 #endif // V8_IC_INL_H_ | 242 #endif // V8_IC_INL_H_ |
OLD | NEW |