Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: src/ic/arm/ic-arm.cc

Issue 2623483002: [cleanup] Port KeyedLoadIC_{Slow,Miss} to TF and drop unused IC handler code (Closed)
Patch Set: rebased Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/arm64/handler-compiler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_ARM 5 #if V8_TARGET_ARCH_ARM
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/ic-compiler.h" 9 #include "src/ic/ic-compiler.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // Dictionary load failed, go slow (but don't miss). 130 // Dictionary load failed, go slow (but don't miss).
131 __ bind(&slow); 131 __ bind(&slow);
132 GenerateRuntimeGetProperty(masm); 132 GenerateRuntimeGetProperty(masm);
133 } 133 }
134 134
135 135
136 // A register that isn't one of the parameters to the load ic. 136 // A register that isn't one of the parameters to the load ic.
137 static const Register LoadIC_TempRegister() { return r3; } 137 static const Register LoadIC_TempRegister() { return r3; }
138 138
139
140 static void LoadIC_PushArgs(MacroAssembler* masm) {
141 Register receiver = LoadDescriptor::ReceiverRegister();
142 Register name = LoadDescriptor::NameRegister();
143 Register slot = LoadDescriptor::SlotRegister();
144 Register vector = LoadWithVectorDescriptor::VectorRegister();
145
146 __ Push(receiver, name, slot, vector);
147 }
148
149
150 void LoadIC::GenerateMiss(MacroAssembler* masm) {
151 // The return address is in lr.
152 Isolate* isolate = masm->isolate();
153
154 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(),
155 LoadWithVectorDescriptor::VectorRegister()));
156 __ IncrementCounter(isolate->counters()->ic_load_miss(), 1, r4, r5);
157
158 LoadIC_PushArgs(masm);
159
160 // Perform tail call to the entry.
161 __ TailCallRuntime(Runtime::kLoadIC_Miss);
162 }
163
164 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 139 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
165 // The return address is in lr. 140 // The return address is in lr.
166 141
167 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); 142 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
168 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister()); 143 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
169 144
170 // Do tail-call to runtime routine. 145 // Do tail-call to runtime routine.
171 __ TailCallRuntime(Runtime::kGetProperty); 146 __ TailCallRuntime(Runtime::kGetProperty);
172 } 147 }
173 148
174
175 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
176 // The return address is in lr.
177 Isolate* isolate = masm->isolate();
178
179 DCHECK(!AreAliased(r4, r5, LoadWithVectorDescriptor::SlotRegister(),
180 LoadWithVectorDescriptor::VectorRegister()));
181 __ IncrementCounter(isolate->counters()->ic_keyed_load_miss(), 1, r4, r5);
182
183 LoadIC_PushArgs(masm);
184
185 // Perform tail call to the entry.
186 __ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
187 }
188
189 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
190 // The return address is in lr.
191
192 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
193
194 // Perform tail call to the entry.
195 // Do tail-call to runtime routine.
196 __ TailCallRuntime(Runtime::kKeyedGetProperty);
197 }
198
199 static void StoreIC_PushArgs(MacroAssembler* masm) { 149 static void StoreIC_PushArgs(MacroAssembler* masm) {
200 __ Push(StoreWithVectorDescriptor::ValueRegister(), 150 __ Push(StoreWithVectorDescriptor::ValueRegister(),
201 StoreWithVectorDescriptor::SlotRegister(), 151 StoreWithVectorDescriptor::SlotRegister(),
202 StoreWithVectorDescriptor::VectorRegister(), 152 StoreWithVectorDescriptor::VectorRegister(),
203 StoreWithVectorDescriptor::ReceiverRegister(), 153 StoreWithVectorDescriptor::ReceiverRegister(),
204 StoreWithVectorDescriptor::NameRegister()); 154 StoreWithVectorDescriptor::NameRegister());
205 } 155 }
206 156
207 157
208 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 158 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 patcher.EmitCondition(ne); 295 patcher.EmitCondition(ne);
346 } else { 296 } else {
347 DCHECK(Assembler::GetCondition(branch_instr) == ne); 297 DCHECK(Assembler::GetCondition(branch_instr) == ne);
348 patcher.EmitCondition(eq); 298 patcher.EmitCondition(eq);
349 } 299 }
350 } 300 }
351 } // namespace internal 301 } // namespace internal
352 } // namespace v8 302 } // namespace v8
353 303
354 #endif // V8_TARGET_ARCH_ARM 304 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/ic/arm/handler-compiler-arm.cc ('k') | src/ic/arm64/handler-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698