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

Side by Side Diff: runtime/vm/intermediate_language_mips.cc

Issue 2859673002: Pass type argument vector to generic functions (if --reify-generic-functions is (Closed)
Patch Set: address review comments and sync Created 3 years, 7 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 | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 LocationSummary* summary = new (zone) 279 LocationSummary* summary = new (zone)
280 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); 280 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall);
281 summary->set_in(0, Location::RegisterLocation(T0)); // Function. 281 summary->set_in(0, Location::RegisterLocation(T0)); // Function.
282 summary->set_out(0, Location::RegisterLocation(V0)); 282 summary->set_out(0, Location::RegisterLocation(V0));
283 return summary; 283 return summary;
284 } 284 }
285 285
286 286
287 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 287 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
288 // Load arguments descriptor in S4. 288 // Load arguments descriptor in S4.
289 int argument_count = ArgumentCount(); 289 const intptr_t argument_count = ArgumentCount(); // Includes type args.
290 const Array& arguments_descriptor = Array::ZoneHandle( 290 const Array& arguments_descriptor =
291 ArgumentsDescriptor::New(argument_count, argument_names())); 291 Array::ZoneHandle(Z, GetArgumentsDescriptor());
292 __ LoadObject(S4, arguments_descriptor); 292 __ LoadObject(S4, arguments_descriptor);
293 293
294 // Load closure function code in T2. 294 // Load closure function code in T2.
295 // S4: arguments descriptor array. 295 // S4: arguments descriptor array.
296 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 296 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
297 ASSERT(locs()->in(0).reg() == T0); 297 ASSERT(locs()->in(0).reg() == T0);
298 __ LoadImmediate(S5, 0); 298 __ LoadImmediate(S5, 0);
299 __ lw(T2, FieldAddress(T0, Function::entry_point_offset())); 299 __ lw(T2, FieldAddress(T0, Function::entry_point_offset()));
300 __ lw(CODE_REG, FieldAddress(T0, Function::code_offset())); 300 __ lw(CODE_REG, FieldAddress(T0, Function::code_offset()));
301 __ jalr(T2); 301 __ jalr(T2);
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); 1128 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall);
1129 summary->set_in(0, Location::RegisterLocation(A0)); 1129 summary->set_in(0, Location::RegisterLocation(A0));
1130 summary->set_out(0, Location::RegisterLocation(V0)); 1130 summary->set_out(0, Location::RegisterLocation(V0));
1131 return summary; 1131 return summary;
1132 } 1132 }
1133 1133
1134 1134
1135 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1135 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1136 Register array = locs()->in(0).reg(); 1136 Register array = locs()->in(0).reg();
1137 __ Push(array); 1137 __ Push(array);
1138 const int kTypeArgsLen = 0;
1138 const int kNumberOfArguments = 1; 1139 const int kNumberOfArguments = 1;
1139 const Array& kNoArgumentNames = Object::null_array(); 1140 const Array& kNoArgumentNames = Object::null_array();
1141 ArgumentsInfo args_info(kTypeArgsLen, kNumberOfArguments, kNoArgumentNames);
1140 compiler->GenerateStaticCall(deopt_id(), token_pos(), CallFunction(), 1142 compiler->GenerateStaticCall(deopt_id(), token_pos(), CallFunction(),
1141 kNumberOfArguments, kNoArgumentNames, locs(), 1143 args_info, locs(), ICData::Handle());
1142 ICData::Handle());
1143 ASSERT(locs()->out(0).reg() == V0); 1144 ASSERT(locs()->out(0).reg() == V0);
1144 } 1145 }
1145 1146
1146 1147
1147 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone, 1148 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone,
1148 bool opt) const { 1149 bool opt) const {
1149 const intptr_t kNumInputs = 1; 1150 const intptr_t kNumInputs = 1;
1150 return LocationSummary::Make(zone, kNumInputs, Location::RequiresRegister(), 1151 return LocationSummary::Make(zone, kNumInputs, Location::RequiresRegister(),
1151 LocationSummary::kNoCall); 1152 LocationSummary::kNoCall);
1152 } 1153 }
(...skipping 3521 matching lines...) Expand 10 before | Expand all | Expand 10 after
4674 __ subu(CMPRES1, result, TMP); 4675 __ subu(CMPRES1, result, TMP);
4675 __ bltz(CMPRES1, &do_call); 4676 __ bltz(CMPRES1, &do_call);
4676 __ SmiTag(result); 4677 __ SmiTag(result);
4677 __ b(&done); 4678 __ b(&done);
4678 __ Bind(&do_call); 4679 __ Bind(&do_call);
4679 __ Push(value_obj); 4680 __ Push(value_obj);
4680 ASSERT(instance_call()->HasICData()); 4681 ASSERT(instance_call()->HasICData());
4681 const ICData& ic_data = *instance_call()->ic_data(); 4682 const ICData& ic_data = *instance_call()->ic_data();
4682 ASSERT(ic_data.NumberOfChecksIs(1)); 4683 ASSERT(ic_data.NumberOfChecksIs(1));
4683 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); 4684 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0));
4684 4685 const int kTypeArgsLen = 0;
4685 const intptr_t kNumberOfArguments = 1; 4686 const int kNumberOfArguments = 1;
4687 const Array& kNoArgumentNames = Object::null_array();
4688 ArgumentsInfo args_info(kTypeArgsLen, kNumberOfArguments, kNoArgumentNames);
4686 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target, 4689 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target,
4687 kNumberOfArguments, 4690 args_info, locs(), ICData::Handle());
4688 Object::null_array(), // No argument names.
4689 locs(), ICData::Handle());
4690 __ Bind(&done); 4691 __ Bind(&done);
4691 } 4692 }
4692 4693
4693 4694
4694 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone, 4695 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone,
4695 bool opt) const { 4696 bool opt) const {
4696 const intptr_t kNumInputs = 1; 4697 const intptr_t kNumInputs = 1;
4697 const intptr_t kNumTemps = 0; 4698 const intptr_t kNumTemps = 0;
4698 LocationSummary* result = new (zone) 4699 LocationSummary* result = new (zone)
4699 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); 4700 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
6088 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), 6089 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
6089 kGrowRegExpStackRuntimeEntry, 1, locs()); 6090 kGrowRegExpStackRuntimeEntry, 1, locs());
6090 __ lw(result, Address(SP, 1 * kWordSize)); 6091 __ lw(result, Address(SP, 1 * kWordSize));
6091 __ addiu(SP, SP, Immediate(2 * kWordSize)); 6092 __ addiu(SP, SP, Immediate(2 * kWordSize));
6092 } 6093 }
6093 6094
6094 6095
6095 } // namespace dart 6096 } // namespace dart
6096 6097
6097 #endif // defined TARGET_ARCH_MIPS 6098 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698