| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 53 | 53 | 
| 54 void IC::SetTargetAtAddress(Address address, Code* target, | 54 void IC::SetTargetAtAddress(Address address, Code* target, | 
| 55                             Address constant_pool) { | 55                             Address constant_pool) { | 
| 56   if (AddressIsDeoptimizedCode(target->GetIsolate(), address)) return; | 56   if (AddressIsDeoptimizedCode(target->GetIsolate(), address)) return; | 
| 57 | 57 | 
| 58   DCHECK(target->is_inline_cache_stub() || target->is_compare_ic_stub()); | 58   DCHECK(target->is_inline_cache_stub() || target->is_compare_ic_stub()); | 
| 59 | 59 | 
| 60   DCHECK(!target->is_inline_cache_stub() || | 60   DCHECK(!target->is_inline_cache_stub() || | 
| 61          (target->kind() != Code::LOAD_IC && | 61          (target->kind() != Code::LOAD_IC && | 
| 62           target->kind() != Code::KEYED_LOAD_IC && | 62           target->kind() != Code::KEYED_LOAD_IC && | 
|  | 63           target->kind() != Code::CALL_IC && | 
| 63           (!FLAG_vector_stores || (target->kind() != Code::STORE_IC && | 64           (!FLAG_vector_stores || (target->kind() != Code::STORE_IC && | 
| 64                                    target->kind() != Code::KEYED_STORE_IC)))); | 65                                    target->kind() != Code::KEYED_STORE_IC)))); | 
| 65 | 66 | 
| 66   Heap* heap = target->GetHeap(); | 67   Heap* heap = target->GetHeap(); | 
| 67   Code* old_target = GetTargetAtAddress(address, constant_pool); | 68   Code* old_target = GetTargetAtAddress(address, constant_pool); | 
| 68 #ifdef DEBUG | 69 #ifdef DEBUG | 
| 69   // STORE_IC and KEYED_STORE_IC use Code::extra_ic_state() to mark | 70   // STORE_IC and KEYED_STORE_IC use Code::extra_ic_state() to mark | 
| 70   // ICs as language mode. The language mode of the IC must be preserved. | 71   // ICs as language mode. The language mode of the IC must be preserved. | 
| 71   if (old_target->kind() == Code::STORE_IC || | 72   if (old_target->kind() == Code::STORE_IC || | 
| 72       old_target->kind() == Code::KEYED_STORE_IC) { | 73       old_target->kind() == Code::KEYED_STORE_IC) { | 
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 189 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { | 190 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { | 
| 190   Code* host = | 191   Code* host = | 
| 191       isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; | 192       isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; | 
| 192   return (host->kind() == Code::OPTIMIZED_FUNCTION && | 193   return (host->kind() == Code::OPTIMIZED_FUNCTION && | 
| 193           host->marked_for_deoptimization()); | 194           host->marked_for_deoptimization()); | 
| 194 } | 195 } | 
| 195 } | 196 } | 
| 196 }  // namespace v8::internal | 197 }  // namespace v8::internal | 
| 197 | 198 | 
| 198 #endif  // V8_IC_INL_H_ | 199 #endif  // V8_IC_INL_H_ | 
| OLD | NEW | 
|---|