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

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

Issue 645883002: MIPS: Teach TurboFan to call vector-based ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | no next file » | 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 2860 matching lines...) Expand 10 before | Expand all | Expand 10 after
2871 DCHECK(ToRegister(instr->context()).is(cp)); 2871 DCHECK(ToRegister(instr->context()).is(cp));
2872 DCHECK(ToRegister(instr->global_object()) 2872 DCHECK(ToRegister(instr->global_object())
2873 .is(LoadDescriptor::ReceiverRegister())); 2873 .is(LoadDescriptor::ReceiverRegister()));
2874 DCHECK(ToRegister(instr->result()).is(v0)); 2874 DCHECK(ToRegister(instr->result()).is(v0));
2875 2875
2876 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2876 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2877 if (FLAG_vector_ics) { 2877 if (FLAG_vector_ics) {
2878 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2878 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2879 } 2879 }
2880 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2880 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2881 Handle<Code> ic = CodeFactory::LoadIC(isolate(), mode).code(); 2881 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code();
2882 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2882 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2883 } 2883 }
2884 2884
2885 2885
2886 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 2886 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2887 Register value = ToRegister(instr->value()); 2887 Register value = ToRegister(instr->value());
2888 Register cell = scratch0(); 2888 Register cell = scratch0();
2889 2889
2890 // Load the cell. 2890 // Load the cell.
2891 __ li(cell, Operand(instr->hydrogen()->cell().handle())); 2891 __ li(cell, Operand(instr->hydrogen()->cell().handle()));
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3012 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3013 DCHECK(ToRegister(instr->context()).is(cp)); 3013 DCHECK(ToRegister(instr->context()).is(cp));
3014 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3014 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3015 DCHECK(ToRegister(instr->result()).is(v0)); 3015 DCHECK(ToRegister(instr->result()).is(v0));
3016 3016
3017 // Name is always in a2. 3017 // Name is always in a2.
3018 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 3018 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
3019 if (FLAG_vector_ics) { 3019 if (FLAG_vector_ics) {
3020 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3020 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3021 } 3021 }
3022 Handle<Code> ic = CodeFactory::LoadIC(isolate(), NOT_CONTEXTUAL).code(); 3022 Handle<Code> ic =
3023 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code();
3023 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3024 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3024 } 3025 }
3025 3026
3026 3027
3027 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3028 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3028 Register scratch = scratch0(); 3029 Register scratch = scratch0();
3029 Register function = ToRegister(instr->function()); 3030 Register function = ToRegister(instr->function());
3030 Register result = ToRegister(instr->result()); 3031 Register result = ToRegister(instr->result());
3031 3032
3032 // Get the prototype or initial map from the function. 3033 // Get the prototype or initial map from the function.
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
3361 3362
3362 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3363 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3363 DCHECK(ToRegister(instr->context()).is(cp)); 3364 DCHECK(ToRegister(instr->context()).is(cp));
3364 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3365 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3365 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3366 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3366 3367
3367 if (FLAG_vector_ics) { 3368 if (FLAG_vector_ics) {
3368 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3369 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3369 } 3370 }
3370 3371
3371 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code(); 3372 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code();
3372 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3373 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3373 } 3374 }
3374 3375
3375 3376
3376 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3377 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3377 Register scratch = scratch0(); 3378 Register scratch = scratch0();
3378 Register temp = scratch1(); 3379 Register temp = scratch1();
3379 Register result = ToRegister(instr->result()); 3380 Register result = ToRegister(instr->result());
3380 3381
3381 if (instr->hydrogen()->from_inlined()) { 3382 if (instr->hydrogen()->from_inlined()) {
(...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after
5955 __ li(at, scope_info); 5956 __ li(at, scope_info);
5956 __ Push(at, ToRegister(instr->function())); 5957 __ Push(at, ToRegister(instr->function()));
5957 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5958 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5958 RecordSafepoint(Safepoint::kNoLazyDeopt); 5959 RecordSafepoint(Safepoint::kNoLazyDeopt);
5959 } 5960 }
5960 5961
5961 5962
5962 #undef __ 5963 #undef __
5963 5964
5964 } } // namespace v8::internal 5965 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698