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

Side by Side Diff: src/ic/mips/ic-mips.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/mips/handler-compiler-mips.cc ('k') | src/ic/mips64/handler-compiler-mips64.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 // Dictionary load failed, go slow (but don't miss). 135 // Dictionary load failed, go slow (but don't miss).
136 __ bind(&slow); 136 __ bind(&slow);
137 GenerateRuntimeGetProperty(masm); 137 GenerateRuntimeGetProperty(masm);
138 } 138 }
139 139
140 140
141 // A register that isn't one of the parameters to the load ic. 141 // A register that isn't one of the parameters to the load ic.
142 static const Register LoadIC_TempRegister() { return a3; } 142 static const Register LoadIC_TempRegister() { return a3; }
143 143
144
145 static void LoadIC_PushArgs(MacroAssembler* masm) {
146 Register receiver = LoadDescriptor::ReceiverRegister();
147 Register name = LoadDescriptor::NameRegister();
148 Register slot = LoadDescriptor::SlotRegister();
149 Register vector = LoadWithVectorDescriptor::VectorRegister();
150
151 __ Push(receiver, name, slot, vector);
152 }
153
154
155 void LoadIC::GenerateMiss(MacroAssembler* masm) {
156 // The return address is in ra.
157 Isolate* isolate = masm->isolate();
158
159 DCHECK(!AreAliased(t0, t1, LoadWithVectorDescriptor::SlotRegister(),
160 LoadWithVectorDescriptor::VectorRegister()));
161 __ IncrementCounter(isolate->counters()->ic_load_miss(), 1, t0, t1);
162
163 LoadIC_PushArgs(masm);
164
165 // Perform tail call to the entry.
166 __ TailCallRuntime(Runtime::kLoadIC_Miss);
167 }
168
169 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 144 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
170 // The return address is in ra. 145 // The return address is in ra.
171 146
172 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); 147 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
173 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister()); 148 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
174 149
175 // Do tail-call to runtime routine. 150 // Do tail-call to runtime routine.
176 __ TailCallRuntime(Runtime::kGetProperty); 151 __ TailCallRuntime(Runtime::kGetProperty);
177 } 152 }
178 153
179
180 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
181 // The return address is in ra.
182 Isolate* isolate = masm->isolate();
183
184 DCHECK(!AreAliased(t0, t1, LoadWithVectorDescriptor::SlotRegister(),
185 LoadWithVectorDescriptor::VectorRegister()));
186 __ IncrementCounter(isolate->counters()->ic_keyed_load_miss(), 1, t0, t1);
187
188 LoadIC_PushArgs(masm);
189
190 // Perform tail call to the entry.
191 __ TailCallRuntime(Runtime::kKeyedLoadIC_Miss);
192 }
193
194 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
195 // The return address is in ra.
196
197 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
198
199 // Do tail-call to runtime routine.
200 __ TailCallRuntime(Runtime::kKeyedGetProperty);
201 }
202
203 static void StoreIC_PushArgs(MacroAssembler* masm) { 154 static void StoreIC_PushArgs(MacroAssembler* masm) {
204 __ Push(StoreWithVectorDescriptor::ValueRegister(), 155 __ Push(StoreWithVectorDescriptor::ValueRegister(),
205 StoreWithVectorDescriptor::SlotRegister(), 156 StoreWithVectorDescriptor::SlotRegister(),
206 StoreWithVectorDescriptor::VectorRegister(), 157 StoreWithVectorDescriptor::VectorRegister(),
207 StoreWithVectorDescriptor::ReceiverRegister(), 158 StoreWithVectorDescriptor::ReceiverRegister(),
208 StoreWithVectorDescriptor::NameRegister()); 159 StoreWithVectorDescriptor::NameRegister());
209 } 160 }
210 161
211 162
212 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 163 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 break; 331 break;
381 default: 332 default:
382 UNIMPLEMENTED(); 333 UNIMPLEMENTED();
383 } 334 }
384 patcher.ChangeBranchCondition(branch_instr, opcode); 335 patcher.ChangeBranchCondition(branch_instr, opcode);
385 } 336 }
386 } // namespace internal 337 } // namespace internal
387 } // namespace v8 338 } // namespace v8
388 339
389 #endif // V8_TARGET_ARCH_MIPS 340 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/mips/handler-compiler-mips.cc ('k') | src/ic/mips64/handler-compiler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698