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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 Code* old_target = GetTargetAtAddress(address, constant_pool); | 67 Code* old_target = GetTargetAtAddress(address, constant_pool); |
68 #ifdef DEBUG | 68 #ifdef DEBUG |
69 // STORE_IC and KEYED_STORE_IC use Code::extra_ic_state() to mark | 69 // 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. | 70 // ICs as language mode. The language mode of the IC must be preserved. |
71 if (old_target->kind() == Code::STORE_IC || | 71 if (old_target->kind() == Code::STORE_IC || |
72 old_target->kind() == Code::KEYED_STORE_IC) { | 72 old_target->kind() == Code::KEYED_STORE_IC) { |
73 DCHECK(StoreICState::GetLanguageMode(old_target->extra_ic_state()) == | 73 DCHECK(StoreICState::GetLanguageMode(old_target->extra_ic_state()) == |
74 StoreICState::GetLanguageMode(target->extra_ic_state())); | 74 StoreICState::GetLanguageMode(target->extra_ic_state())); |
75 } | 75 } |
76 #endif | 76 #endif |
77 Assembler::set_target_address_at(address, constant_pool, | 77 Assembler::set_target_address_at(heap->isolate(), address, constant_pool, |
78 target->instruction_start()); | 78 target->instruction_start()); |
79 if (heap->gc_state() == Heap::MARK_COMPACT) { | 79 if (heap->gc_state() == Heap::MARK_COMPACT) { |
80 heap->mark_compact_collector()->RecordCodeTargetPatch(address, target); | 80 heap->mark_compact_collector()->RecordCodeTargetPatch(address, target); |
81 } else { | 81 } else { |
82 heap->incremental_marking()->RecordCodeTargetPatch(address, target); | 82 heap->incremental_marking()->RecordCodeTargetPatch(address, target); |
83 } | 83 } |
84 PostPatching(address, target, old_target); | 84 PostPatching(address, target, old_target); |
85 } | 85 } |
86 | 86 |
87 | 87 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { | 176 bool IC::AddressIsDeoptimizedCode(Isolate* isolate, Address address) { |
177 Code* host = | 177 Code* host = |
178 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; | 178 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code; |
179 return (host->kind() == Code::OPTIMIZED_FUNCTION && | 179 return (host->kind() == Code::OPTIMIZED_FUNCTION && |
180 host->marked_for_deoptimization()); | 180 host->marked_for_deoptimization()); |
181 } | 181 } |
182 } // namespace internal | 182 } // namespace internal |
183 } // namespace v8 | 183 } // namespace v8 |
184 | 184 |
185 #endif // V8_IC_INL_H_ | 185 #endif // V8_IC_INL_H_ |
OLD | NEW |