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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // Check scratch register is valid, extra and extra2 are unused. | 108 // Check scratch register is valid, extra and extra2 are unused. |
109 DCHECK(!scratch.is(no_reg)); | 109 DCHECK(!scratch.is(no_reg)); |
110 DCHECK(extra2.is(no_reg)); | 110 DCHECK(extra2.is(no_reg)); |
111 DCHECK(extra3.is(no_reg)); | 111 DCHECK(extra3.is(no_reg)); |
112 | 112 |
113 #ifdef DEBUG | 113 #ifdef DEBUG |
114 // If vector-based ics are in use, ensure that scratch doesn't conflict with | 114 // If vector-based ics are in use, ensure that scratch doesn't conflict with |
115 // the vector and slot registers, which need to be preserved for a handler | 115 // the vector and slot registers, which need to be preserved for a handler |
116 // call or miss. | 116 // call or miss. |
117 if (IC::ICUseVector(ic_kind)) { | 117 if (IC::ICUseVector(ic_kind)) { |
118 Register vector = VectorLoadICDescriptor::VectorRegister(); | 118 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
119 Register slot = VectorLoadICDescriptor::SlotRegister(); | 119 Register slot = LoadDescriptor::SlotRegister(); |
120 DCHECK(!AreAliased(vector, slot, scratch)); | 120 DCHECK(!AreAliased(vector, slot, scratch)); |
121 } | 121 } |
122 #endif | 122 #endif |
123 | 123 |
124 Counters* counters = masm->isolate()->counters(); | 124 Counters* counters = masm->isolate()->counters(); |
125 __ IncrementCounter(counters->megamorphic_stub_cache_probes(), 1); | 125 __ IncrementCounter(counters->megamorphic_stub_cache_probes(), 1); |
126 | 126 |
127 // Check that the receiver isn't a smi. | 127 // Check that the receiver isn't a smi. |
128 __ JumpIfSmi(receiver, &miss); | 128 __ JumpIfSmi(receiver, &miss); |
129 | 129 |
(...skipping 28 matching lines...) Expand all Loading... |
158 __ bind(&miss); | 158 __ bind(&miss); |
159 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); | 159 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); |
160 } | 160 } |
161 | 161 |
162 | 162 |
163 #undef __ | 163 #undef __ |
164 } | 164 } |
165 } // namespace v8::internal | 165 } // namespace v8::internal |
166 | 166 |
167 #endif // V8_TARGET_ARCH_X64 | 167 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |