OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 | 89 |
90 | 90 |
91 void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind, | 91 void StubCache::GenerateProbe(MacroAssembler* masm, Code::Kind ic_kind, |
92 Code::Flags flags, Register receiver, | 92 Code::Flags flags, Register receiver, |
93 Register name, Register scratch, Register extra, | 93 Register name, Register scratch, Register extra, |
94 Register extra2, Register extra3) { | 94 Register extra2, Register extra3) { |
95 Isolate* isolate = masm->isolate(); | 95 Isolate* isolate = masm->isolate(); |
96 Label miss; | 96 Label miss; |
97 | 97 |
98 // Make sure the flags does not name a specific type. | |
99 DCHECK(Code::ExtractTypeFromFlags(flags) == 0); | |
100 | |
101 // Make sure that there are no register conflicts. | 98 // Make sure that there are no register conflicts. |
102 DCHECK(!AreAliased(receiver, name, scratch, extra, extra2, extra3)); | 99 DCHECK(!AreAliased(receiver, name, scratch, extra, extra2, extra3)); |
103 | 100 |
104 // Make sure extra and extra2 registers are valid. | 101 // Make sure extra and extra2 registers are valid. |
105 DCHECK(!extra.is(no_reg)); | 102 DCHECK(!extra.is(no_reg)); |
106 DCHECK(!extra2.is(no_reg)); | 103 DCHECK(!extra2.is(no_reg)); |
107 DCHECK(!extra3.is(no_reg)); | 104 DCHECK(!extra3.is(no_reg)); |
108 | 105 |
109 #ifdef DEBUG | 106 #ifdef DEBUG |
110 // If vector-based ics are in use, ensure that scratch, extra, extra2 and | 107 // If vector-based ics are in use, ensure that scratch, extra, extra2 and |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // Cache miss: Fall-through and let caller handle the miss by | 152 // Cache miss: Fall-through and let caller handle the miss by |
156 // entering the runtime system. | 153 // entering the runtime system. |
157 __ Bind(&miss); | 154 __ Bind(&miss); |
158 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, extra2, | 155 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, extra2, |
159 extra3); | 156 extra3); |
160 } | 157 } |
161 } // namespace internal | 158 } // namespace internal |
162 } // namespace v8 | 159 } // namespace v8 |
163 | 160 |
164 #endif // V8_TARGET_ARCH_ARM64 | 161 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |