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

Side by Side Diff: src/ic/mips/handler-compiler-mips.cc

Issue 538573002: MIPS: Make concrete classes for individual call descriptors. - internal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips64 port added. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/mips/access-compiler-mips.cc ('k') | src/ic/mips/ic-compiler-mips.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); 279 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
280 __ TailCallStub(&stub); 280 __ TailCallStub(&stub);
281 } 281 }
282 282
283 283
284 void ElementHandlerCompiler::GenerateLoadDictionaryElement( 284 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
285 MacroAssembler* masm) { 285 MacroAssembler* masm) {
286 // The return address is in ra. 286 // The return address is in ra.
287 Label slow, miss; 287 Label slow, miss;
288 288
289 Register key = LoadConvention::NameRegister(); 289 Register key = LoadDescriptor::NameRegister();
290 Register receiver = LoadConvention::ReceiverRegister(); 290 Register receiver = LoadDescriptor::ReceiverRegister();
291 DCHECK(receiver.is(a1)); 291 DCHECK(receiver.is(a1));
292 DCHECK(key.is(a2)); 292 DCHECK(key.is(a2));
293 293
294 __ UntagAndJumpIfNotSmi(t2, key, &miss); 294 __ UntagAndJumpIfNotSmi(t2, key, &miss);
295 __ lw(t0, FieldMemOperand(receiver, JSObject::kElementsOffset)); 295 __ lw(t0, FieldMemOperand(receiver, JSObject::kElementsOffset));
296 __ LoadFromNumberDictionary(&slow, t0, key, v0, t2, a3, t1); 296 __ LoadFromNumberDictionary(&slow, t0, key, v0, t2, a3, t1);
297 __ Ret(); 297 __ Ret();
298 298
299 // Slow case, key and receiver still unmodified. 299 // Slow case, key and receiver still unmodified.
300 __ bind(&slow); 300 __ bind(&slow);
301 __ IncrementCounter( 301 __ IncrementCounter(
302 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, a2, a3); 302 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, a2, a3);
303 303
304 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); 304 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
305 305
306 // Miss case, call the runtime. 306 // Miss case, call the runtime.
307 __ bind(&miss); 307 __ bind(&miss);
308 308
309 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 309 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
310 } 310 }
311 311
312 312
313 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 313 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
314 // Push receiver, key and value for runtime call. 314 // Push receiver, key and value for runtime call.
315 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 315 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
316 StoreConvention::ValueRegister()); 316 StoreDescriptor::ValueRegister());
317 317
318 // The slow case calls into the runtime to complete the store without causing 318 // The slow case calls into the runtime to complete the store without causing
319 // an IC miss that would otherwise cause a transition to the generic stub. 319 // an IC miss that would otherwise cause a transition to the generic stub.
320 ExternalReference ref = 320 ExternalReference ref =
321 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate()); 321 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
322 __ TailCallExternalReference(ref, 3, 1); 322 __ TailCallExternalReference(ref, 3, 1);
323 } 323 }
324 324
325 325
326 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { 326 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
327 // Push receiver, key and value for runtime call. 327 // Push receiver, key and value for runtime call.
328 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 328 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
329 StoreConvention::ValueRegister()); 329 StoreDescriptor::ValueRegister());
330 330
331 // The slow case calls into the runtime to complete the store without causing 331 // The slow case calls into the runtime to complete the store without causing
332 // an IC miss that would otherwise cause a transition to the generic stub. 332 // an IC miss that would otherwise cause a transition to the generic stub.
333 ExternalReference ref = 333 ExternalReference ref =
334 ExternalReference(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate()); 334 ExternalReference(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate());
335 __ TailCallExternalReference(ref, 3, 1); 335 __ TailCallExternalReference(ref, 3, 1);
336 } 336 }
337 337
338 338
339 #undef __ 339 #undef __
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 ExternalReference store_ic_property = ExternalReference( 822 ExternalReference store_ic_property = ExternalReference(
823 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 823 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
824 __ TailCallExternalReference(store_ic_property, 3, 1); 824 __ TailCallExternalReference(store_ic_property, 3, 1);
825 825
826 // Return the generated code. 826 // Return the generated code.
827 return GetCode(kind(), Code::FAST, name); 827 return GetCode(kind(), Code::FAST, name);
828 } 828 }
829 829
830 830
831 Register NamedStoreHandlerCompiler::value() { 831 Register NamedStoreHandlerCompiler::value() {
832 return StoreConvention::ValueRegister(); 832 return StoreDescriptor::ValueRegister();
833 } 833 }
834 834
835 835
836 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( 836 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
837 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { 837 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
838 Label miss; 838 Label miss;
839 839
840 FrontendHeader(receiver(), name, &miss); 840 FrontendHeader(receiver(), name, &miss);
841 841
842 // Get the value from the cell. 842 // Get the value from the cell.
843 Register result = StoreConvention::ValueRegister(); 843 Register result = StoreDescriptor::ValueRegister();
844 __ li(result, Operand(cell)); 844 __ li(result, Operand(cell));
845 __ lw(result, FieldMemOperand(result, Cell::kValueOffset)); 845 __ lw(result, FieldMemOperand(result, Cell::kValueOffset));
846 846
847 // Check for deleted property if property can actually be deleted. 847 // Check for deleted property if property can actually be deleted.
848 if (is_configurable) { 848 if (is_configurable) {
849 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 849 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
850 __ Branch(&miss, eq, result, Operand(at)); 850 __ Branch(&miss, eq, result, Operand(at));
851 } 851 }
852 852
853 Counters* counters = isolate()->counters(); 853 Counters* counters = isolate()->counters();
854 __ IncrementCounter(counters->named_load_global_stub(), 1, a1, a3); 854 __ IncrementCounter(counters->named_load_global_stub(), 1, a1, a3);
855 __ Ret(USE_DELAY_SLOT); 855 __ Ret(USE_DELAY_SLOT);
856 __ mov(v0, result); 856 __ mov(v0, result);
857 857
858 FrontendFooter(name, &miss); 858 FrontendFooter(name, &miss);
859 859
860 // Return the generated code. 860 // Return the generated code.
861 return GetCode(kind(), Code::NORMAL, name); 861 return GetCode(kind(), Code::NORMAL, name);
862 } 862 }
863 863
864 864
865 #undef __ 865 #undef __
866 } 866 }
867 } // namespace v8::internal 867 } // namespace v8::internal
868 868
869 #endif // V8_TARGET_ARCH_MIPS 869 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/mips/access-compiler-mips.cc ('k') | src/ic/mips/ic-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698