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

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

Issue 2859673002: Pass type argument vector to generic functions (if --reify-generic-functions is (Closed)
Patch Set: sync and work in progress 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
OLDNEW
1 1
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
7 #if defined(TARGET_ARCH_ARM) 7 #if defined(TARGET_ARCH_ARM)
8 8
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 10
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 LocationSummary* summary = new (zone) 218 LocationSummary* summary = new (zone)
219 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); 219 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall);
220 summary->set_in(0, Location::RegisterLocation(R0)); // Function. 220 summary->set_in(0, Location::RegisterLocation(R0)); // Function.
221 summary->set_out(0, Location::RegisterLocation(R0)); 221 summary->set_out(0, Location::RegisterLocation(R0));
222 return summary; 222 return summary;
223 } 223 }
224 224
225 225
226 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 226 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
227 // Load arguments descriptor in R4. 227 // Load arguments descriptor in R4.
228 int argument_count = ArgumentCount(); 228 const intptr_t argument_count = ArgumentCount(); // Includes type args.
229 const Array& arguments_descriptor = Array::ZoneHandle( 229 const Array& arguments_descriptor = GetArgumentsDescriptor(Z);
230 ArgumentsDescriptor::New(argument_count, argument_names()));
231 __ LoadObject(R4, arguments_descriptor); 230 __ LoadObject(R4, arguments_descriptor);
232 231
233 // R4: Arguments descriptor. 232 // R4: Arguments descriptor.
234 // R0: Function. 233 // R0: Function.
235 ASSERT(locs()->in(0).reg() == R0); 234 ASSERT(locs()->in(0).reg() == R0);
236 __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset())); 235 __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset()));
237 __ ldr(R2, FieldAddress(R0, Function::entry_point_offset())); 236 __ ldr(R2, FieldAddress(R0, Function::entry_point_offset()));
238 237
239 // R2: instructions entry point. 238 // R2: instructions entry point.
240 // R9: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 239 // R9: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); 1059 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall);
1061 summary->set_in(0, Location::RegisterLocation(R0)); 1060 summary->set_in(0, Location::RegisterLocation(R0));
1062 summary->set_out(0, Location::RegisterLocation(R0)); 1061 summary->set_out(0, Location::RegisterLocation(R0));
1063 return summary; 1062 return summary;
1064 } 1063 }
1065 1064
1066 1065
1067 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1066 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1068 const Register array = locs()->in(0).reg(); 1067 const Register array = locs()->in(0).reg();
1069 __ Push(array); 1068 __ Push(array);
1069 const int kTypeArgsLen = 0;
1070 const int kNumberOfArguments = 1; 1070 const int kNumberOfArguments = 1;
1071 const Array& kNoArgumentNames = Object::null_array(); 1071 const Array& kNoArgumentNames = Object::null_array();
1072 ArgumentsInfo args_info(kTypeArgsLen, kNumberOfArguments, kNoArgumentNames);
1072 compiler->GenerateStaticCall(deopt_id(), token_pos(), CallFunction(), 1073 compiler->GenerateStaticCall(deopt_id(), token_pos(), CallFunction(),
1073 kNumberOfArguments, kNoArgumentNames, locs(), 1074 args_info, locs(), ICData::Handle());
1074 ICData::Handle());
1075 ASSERT(locs()->out(0).reg() == R0); 1075 ASSERT(locs()->out(0).reg() == R0);
1076 } 1076 }
1077 1077
1078 1078
1079 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone, 1079 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone,
1080 bool opt) const { 1080 bool opt) const {
1081 const intptr_t kNumInputs = 1; 1081 const intptr_t kNumInputs = 1;
1082 return LocationSummary::Make(zone, kNumInputs, Location::RequiresRegister(), 1082 return LocationSummary::Make(zone, kNumInputs, Location::RequiresRegister(),
1083 LocationSummary::kNoCall); 1083 LocationSummary::kNoCall);
1084 } 1084 }
(...skipping 4774 matching lines...) Expand 10 before | Expand all | Expand 10 after
5859 __ CompareImmediate(result, 0xC0000000); 5859 __ CompareImmediate(result, 0xC0000000);
5860 __ SmiTag(result, PL); 5860 __ SmiTag(result, PL);
5861 __ b(&done, PL); 5861 __ b(&done, PL);
5862 5862
5863 __ Bind(&do_call); 5863 __ Bind(&do_call);
5864 __ Push(value_obj); 5864 __ Push(value_obj);
5865 ASSERT(instance_call()->HasICData()); 5865 ASSERT(instance_call()->HasICData());
5866 const ICData& ic_data = *instance_call()->ic_data(); 5866 const ICData& ic_data = *instance_call()->ic_data();
5867 ASSERT(ic_data.NumberOfChecksIs(1)); 5867 ASSERT(ic_data.NumberOfChecksIs(1));
5868 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); 5868 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0));
5869 5869 const int kTypeArgsLen = 0;
5870 const intptr_t kNumberOfArguments = 1; 5870 const int kNumberOfArguments = 1;
5871 const Array& kNoArgumentNames = Object::null_array();
5872 ArgumentsInfo args_info(kTypeArgsLen, kNumberOfArguments, kNoArgumentNames);
5871 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target, 5873 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target,
5872 kNumberOfArguments, 5874 args_info, locs(), ICData::Handle());
5873 Object::null_array(), // No argument names.,
5874 locs(), ICData::Handle());
5875 __ Bind(&done); 5875 __ Bind(&done);
5876 } 5876 }
5877 5877
5878 5878
5879 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone, 5879 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone,
5880 bool opt) const { 5880 bool opt) const {
5881 const intptr_t kNumInputs = 1; 5881 const intptr_t kNumInputs = 1;
5882 const intptr_t kNumTemps = 0; 5882 const intptr_t kNumTemps = 0;
5883 LocationSummary* result = new (zone) 5883 LocationSummary* result = new (zone)
5884 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); 5884 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
7289 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), 7289 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
7290 kGrowRegExpStackRuntimeEntry, 1, locs()); 7290 kGrowRegExpStackRuntimeEntry, 1, locs());
7291 __ Drop(1); 7291 __ Drop(1);
7292 __ Pop(result); 7292 __ Pop(result);
7293 } 7293 }
7294 7294
7295 7295
7296 } // namespace dart 7296 } // namespace dart
7297 7297
7298 #endif // defined TARGET_ARCH_ARM 7298 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698