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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 633423002: Teach TurboFan to call vector-based ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nits. Created 6 years, 2 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/ic.cc ('k') | src/x64/lithium-codegen-x64.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2890 matching lines...) Expand 10 before | Expand all | Expand 10 after
2901 DCHECK(ToRegister(instr->context()).is(cp)); 2901 DCHECK(ToRegister(instr->context()).is(cp));
2902 DCHECK(ToRegister(instr->global_object()) 2902 DCHECK(ToRegister(instr->global_object())
2903 .is(LoadDescriptor::ReceiverRegister())); 2903 .is(LoadDescriptor::ReceiverRegister()));
2904 DCHECK(ToRegister(instr->result()).is(v0)); 2904 DCHECK(ToRegister(instr->result()).is(v0));
2905 2905
2906 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2906 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2907 if (FLAG_vector_ics) { 2907 if (FLAG_vector_ics) {
2908 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2908 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2909 } 2909 }
2910 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2910 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2911 Handle<Code> ic = CodeFactory::LoadIC(isolate(), mode).code(); 2911 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code();
2912 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2912 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2913 } 2913 }
2914 2914
2915 2915
2916 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 2916 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2917 Register value = ToRegister(instr->value()); 2917 Register value = ToRegister(instr->value());
2918 Register cell = scratch0(); 2918 Register cell = scratch0();
2919 2919
2920 // Load the cell. 2920 // Load the cell.
2921 __ li(cell, Operand(instr->hydrogen()->cell().handle())); 2921 __ li(cell, Operand(instr->hydrogen()->cell().handle()));
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
3028 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3028 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3029 DCHECK(ToRegister(instr->context()).is(cp)); 3029 DCHECK(ToRegister(instr->context()).is(cp));
3030 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3030 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3031 DCHECK(ToRegister(instr->result()).is(v0)); 3031 DCHECK(ToRegister(instr->result()).is(v0));
3032 3032
3033 // Name is always in a2. 3033 // Name is always in a2.
3034 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 3034 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
3035 if (FLAG_vector_ics) { 3035 if (FLAG_vector_ics) {
3036 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3036 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3037 } 3037 }
3038 Handle<Code> ic = CodeFactory::LoadIC(isolate(), NOT_CONTEXTUAL).code(); 3038 Handle<Code> ic =
3039 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code();
3039 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3040 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3040 } 3041 }
3041 3042
3042 3043
3043 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3044 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3044 Register scratch = scratch0(); 3045 Register scratch = scratch0();
3045 Register function = ToRegister(instr->function()); 3046 Register function = ToRegister(instr->function());
3046 Register result = ToRegister(instr->result()); 3047 Register result = ToRegister(instr->result());
3047 3048
3048 // Get the prototype or initial map from the function. 3049 // Get the prototype or initial map from the function.
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
3336 3337
3337 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3338 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3338 DCHECK(ToRegister(instr->context()).is(cp)); 3339 DCHECK(ToRegister(instr->context()).is(cp));
3339 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3340 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3340 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3341 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3341 3342
3342 if (FLAG_vector_ics) { 3343 if (FLAG_vector_ics) {
3343 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3344 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3344 } 3345 }
3345 3346
3346 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code(); 3347 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code();
3347 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3348 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3348 } 3349 }
3349 3350
3350 3351
3351 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3352 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3352 Register scratch = scratch0(); 3353 Register scratch = scratch0();
3353 Register temp = scratch1(); 3354 Register temp = scratch1();
3354 Register result = ToRegister(instr->result()); 3355 Register result = ToRegister(instr->result());
3355 3356
3356 if (instr->hydrogen()->from_inlined()) { 3357 if (instr->hydrogen()->from_inlined()) {
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after
5924 __ li(at, scope_info); 5925 __ li(at, scope_info);
5925 __ Push(at, ToRegister(instr->function())); 5926 __ Push(at, ToRegister(instr->function()));
5926 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5927 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5927 RecordSafepoint(Safepoint::kNoLazyDeopt); 5928 RecordSafepoint(Safepoint::kNoLazyDeopt);
5928 } 5929 }
5929 5930
5930 5931
5931 #undef __ 5932 #undef __
5932 5933
5933 } } // namespace v8::internal 5934 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698