| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void IC::set_target(Code* code) { | 88 void IC::set_target(Code* code) { |
| 89 SetTargetAtAddress(address(), code, constant_pool()); | 89 SetTargetAtAddress(address(), code, constant_pool()); |
| 90 target_set_ = true; | 90 target_set_ = true; |
| 91 } | 91 } |
| 92 | 92 |
| 93 | 93 |
| 94 void LoadIC::set_target(Code* code) { | 94 void LoadIC::set_target(Code* code) { |
| 95 // The contextual mode must be preserved across IC patching. | 95 // The contextual mode must be preserved across IC patching. |
| 96 DCHECK(LoadICState::GetTypeofMode(code->extra_ic_state()) == | 96 DCHECK(LoadICState::GetTypeofMode(code->extra_ic_state()) == |
| 97 LoadICState::GetTypeofMode(target()->extra_ic_state())); | 97 LoadICState::GetTypeofMode(target()->extra_ic_state())); |
| 98 // Strongness must be preserved across IC patching. | |
| 99 DCHECK(LoadICState::GetLanguageMode(code->extra_ic_state()) == | |
| 100 LoadICState::GetLanguageMode(target()->extra_ic_state())); | |
| 101 | 98 |
| 102 IC::set_target(code); | 99 IC::set_target(code); |
| 103 } | 100 } |
| 104 | 101 |
| 105 | 102 |
| 106 void StoreIC::set_target(Code* code) { | 103 void StoreIC::set_target(Code* code) { |
| 107 // Language mode must be preserved across IC patching. | 104 // Language mode must be preserved across IC patching. |
| 108 DCHECK(StoreICState::GetLanguageMode(code->extra_ic_state()) == | 105 DCHECK(StoreICState::GetLanguageMode(code->extra_ic_state()) == |
| 109 StoreICState::GetLanguageMode(target()->extra_ic_state())); | 106 StoreICState::GetLanguageMode(target()->extra_ic_state())); |
| 110 IC::set_target(code); | 107 IC::set_target(code); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { | 173 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { |
| 177 Code* host = | 174 Code* host = |
| 178 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; | 175 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; |
| 179 return (host->kind() == Code::OPTIMIZED_FUNCTION && | 176 return (host->kind() == Code::OPTIMIZED_FUNCTION && |
| 180 host->marked_for_deoptimization()); | 177 host->marked_for_deoptimization()); |
| 181 } | 178 } |
| 182 } // namespace internal | 179 } // namespace internal |
| 183 } // namespace v8 | 180 } // namespace v8 |
| 184 | 181 |
| 185 #endif // V8_IC_INL_H_ | 182 #endif // V8_IC_INL_H_ |
| OLD | NEW |