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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
10 #include "src/interface-descriptors.h" | 10 #include "src/interface-descriptors.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // If vector-based ics are in use, ensure that scratch doesn't conflict with | 103 // If vector-based ics are in use, ensure that scratch doesn't conflict with |
104 // the vector and slot registers, which need to be preserved for a handler | 104 // the vector and slot registers, which need to be preserved for a handler |
105 // call or miss. | 105 // call or miss. |
106 if (IC::ICUseVector(ic_kind_)) { | 106 if (IC::ICUseVector(ic_kind_)) { |
107 if (ic_kind_ == Code::LOAD_IC || ic_kind_ == Code::KEYED_LOAD_IC) { | 107 if (ic_kind_ == Code::LOAD_IC || ic_kind_ == Code::KEYED_LOAD_IC) { |
108 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 108 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
109 Register slot = LoadDescriptor::SlotRegister(); | 109 Register slot = LoadDescriptor::SlotRegister(); |
110 DCHECK(!AreAliased(vector, slot, scratch)); | 110 DCHECK(!AreAliased(vector, slot, scratch)); |
111 } else { | 111 } else { |
112 DCHECK(ic_kind_ == Code::STORE_IC || ic_kind_ == Code::KEYED_STORE_IC); | 112 DCHECK(ic_kind_ == Code::STORE_IC || ic_kind_ == Code::KEYED_STORE_IC); |
113 Register vector = VectorStoreICDescriptor::VectorRegister(); | 113 Register vector = StoreWithVectorDescriptor::VectorRegister(); |
114 Register slot = VectorStoreICDescriptor::SlotRegister(); | 114 Register slot = StoreWithVectorDescriptor::SlotRegister(); |
115 DCHECK(!AreAliased(vector, slot, scratch)); | 115 DCHECK(!AreAliased(vector, slot, scratch)); |
116 } | 116 } |
117 } | 117 } |
118 #endif | 118 #endif |
119 | 119 |
120 Counters* counters = masm->isolate()->counters(); | 120 Counters* counters = masm->isolate()->counters(); |
121 __ IncrementCounter(counters->megamorphic_stub_cache_probes(), 1); | 121 __ IncrementCounter(counters->megamorphic_stub_cache_probes(), 1); |
122 | 122 |
123 // Check that the receiver isn't a smi. | 123 // Check that the receiver isn't a smi. |
124 __ JumpIfSmi(receiver, &miss); | 124 __ JumpIfSmi(receiver, &miss); |
(...skipping 24 matching lines...) Expand all Loading... |
149 __ bind(&miss); | 149 __ bind(&miss); |
150 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); | 150 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); |
151 } | 151 } |
152 | 152 |
153 | 153 |
154 #undef __ | 154 #undef __ |
155 } // namespace internal | 155 } // namespace internal |
156 } // namespace v8 | 156 } // namespace v8 |
157 | 157 |
158 #endif // V8_TARGET_ARCH_X64 | 158 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |