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

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

Issue 892383003: emit premonomorphic ics for loads/stores in optimized code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 10 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/ic-compiler.cc ('k') | src/mips64/lithium-codegen-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.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 2933 matching lines...) Expand 10 before | Expand all | Expand 10 after
2944 DCHECK(ToRegister(instr->context()).is(cp)); 2944 DCHECK(ToRegister(instr->context()).is(cp));
2945 DCHECK(ToRegister(instr->global_object()) 2945 DCHECK(ToRegister(instr->global_object())
2946 .is(LoadDescriptor::ReceiverRegister())); 2946 .is(LoadDescriptor::ReceiverRegister()));
2947 DCHECK(ToRegister(instr->result()).is(v0)); 2947 DCHECK(ToRegister(instr->result()).is(v0));
2948 2948
2949 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2949 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2950 if (FLAG_vector_ics) { 2950 if (FLAG_vector_ics) {
2951 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2951 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2952 } 2952 }
2953 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2953 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2954 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code(); 2954 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode,
2955 PREMONOMORPHIC).code();
2955 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2956 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2956 } 2957 }
2957 2958
2958 2959
2959 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 2960 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2960 Register value = ToRegister(instr->value()); 2961 Register value = ToRegister(instr->value());
2961 Register cell = scratch0(); 2962 Register cell = scratch0();
2962 2963
2963 // Load the cell. 2964 // Load the cell.
2964 __ li(cell, Operand(instr->hydrogen()->cell().handle())); 2965 __ li(cell, Operand(instr->hydrogen()->cell().handle()));
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
3071 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 3072 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
3072 DCHECK(ToRegister(instr->context()).is(cp)); 3073 DCHECK(ToRegister(instr->context()).is(cp));
3073 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3074 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3074 DCHECK(ToRegister(instr->result()).is(v0)); 3075 DCHECK(ToRegister(instr->result()).is(v0));
3075 3076
3076 // Name is always in a2. 3077 // Name is always in a2.
3077 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 3078 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
3078 if (FLAG_vector_ics) { 3079 if (FLAG_vector_ics) {
3079 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 3080 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
3080 } 3081 }
3081 Handle<Code> ic = 3082 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(
3082 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code(); 3083 isolate(), NOT_CONTEXTUAL,
3084 instr->hydrogen()->initialization_state()).code();
3083 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3085 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3084 } 3086 }
3085 3087
3086 3088
3087 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 3089 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
3088 Register scratch = scratch0(); 3090 Register scratch = scratch0();
3089 Register function = ToRegister(instr->function()); 3091 Register function = ToRegister(instr->function());
3090 Register result = ToRegister(instr->result()); 3092 Register result = ToRegister(instr->result());
3091 3093
3092 // Get the prototype or initial map from the function. 3094 // Get the prototype or initial map from the function.
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
4274 } 4276 }
4275 } 4277 }
4276 4278
4277 4279
4278 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 4280 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
4279 DCHECK(ToRegister(instr->context()).is(cp)); 4281 DCHECK(ToRegister(instr->context()).is(cp));
4280 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 4282 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4281 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 4283 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4282 4284
4283 __ li(StoreDescriptor::NameRegister(), Operand(instr->name())); 4285 __ li(StoreDescriptor::NameRegister(), Operand(instr->name()));
4284 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->language_mode()); 4286 Handle<Code> ic =
4287 StoreIC::initialize_stub(isolate(), instr->language_mode(),
4288 instr->hydrogen()->initialization_state());
4285 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4289 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4286 } 4290 }
4287 4291
4288 4292
4289 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 4293 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
4290 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs; 4294 Condition cc = instr->hydrogen()->allow_equality() ? hi : hs;
4291 Operand operand(0); 4295 Operand operand(0);
4292 Register reg; 4296 Register reg;
4293 if (instr->index()->IsConstantOperand()) { 4297 if (instr->index()->IsConstantOperand()) {
4294 operand = ToOperand(instr->index()); 4298 operand = ToOperand(instr->index());
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after
6027 __ li(at, scope_info); 6031 __ li(at, scope_info);
6028 __ Push(at, ToRegister(instr->function())); 6032 __ Push(at, ToRegister(instr->function()));
6029 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6033 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6030 RecordSafepoint(Safepoint::kNoLazyDeopt); 6034 RecordSafepoint(Safepoint::kNoLazyDeopt);
6031 } 6035 }
6032 6036
6033 6037
6034 #undef __ 6038 #undef __
6035 6039
6036 } } // namespace v8::internal 6040 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ic-compiler.cc ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698