| OLD | NEW |
| 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 Loading... |
| 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 ta_len = type_args_len(); |
| 229 const Array& arguments_descriptor = Array::ZoneHandle( | 229 const intptr_t argument_count = ArgumentCount(); // Includes type args. |
| 230 ArgumentsDescriptor::New(argument_count, argument_names())); | 230 const Array& arguments_descriptor = |
| 231 Array::ZoneHandle(ArgumentsDescriptor::New( |
| 232 ta_len, argument_count - (ta_len > 0 ? 1 : 0), argument_names())); |
| 231 __ LoadObject(R4, arguments_descriptor); | 233 __ LoadObject(R4, arguments_descriptor); |
| 232 | 234 |
| 233 // R4: Arguments descriptor. | 235 // R4: Arguments descriptor. |
| 234 // R0: Function. | 236 // R0: Function. |
| 235 ASSERT(locs()->in(0).reg() == R0); | 237 ASSERT(locs()->in(0).reg() == R0); |
| 236 __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset())); | 238 __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset())); |
| 237 __ ldr(R2, FieldAddress(R0, Function::entry_point_offset())); | 239 __ ldr(R2, FieldAddress(R0, Function::entry_point_offset())); |
| 238 | 240 |
| 239 // R2: instructions entry point. | 241 // R2: instructions entry point. |
| 240 // R9: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 242 // 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 Loading... |
| 1060 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 1062 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
| 1061 summary->set_in(0, Location::RegisterLocation(R0)); | 1063 summary->set_in(0, Location::RegisterLocation(R0)); |
| 1062 summary->set_out(0, Location::RegisterLocation(R0)); | 1064 summary->set_out(0, Location::RegisterLocation(R0)); |
| 1063 return summary; | 1065 return summary; |
| 1064 } | 1066 } |
| 1065 | 1067 |
| 1066 | 1068 |
| 1067 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1069 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1068 const Register array = locs()->in(0).reg(); | 1070 const Register array = locs()->in(0).reg(); |
| 1069 __ Push(array); | 1071 __ Push(array); |
| 1072 const int kTypeArgsLen = 0; |
| 1070 const int kNumberOfArguments = 1; | 1073 const int kNumberOfArguments = 1; |
| 1071 const Array& kNoArgumentNames = Object::null_array(); | 1074 const Array& kNoArgumentNames = Object::null_array(); |
| 1072 compiler->GenerateStaticCall(deopt_id(), token_pos(), CallFunction(), | 1075 compiler->GenerateStaticCall(deopt_id(), token_pos(), CallFunction(), |
| 1073 kNumberOfArguments, kNoArgumentNames, locs(), | 1076 kTypeArgsLen, kNumberOfArguments, |
| 1074 ICData::Handle()); | 1077 kNoArgumentNames, locs(), ICData::Handle()); |
| 1075 ASSERT(locs()->out(0).reg() == R0); | 1078 ASSERT(locs()->out(0).reg() == R0); |
| 1076 } | 1079 } |
| 1077 | 1080 |
| 1078 | 1081 |
| 1079 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone, | 1082 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Zone* zone, |
| 1080 bool opt) const { | 1083 bool opt) const { |
| 1081 const intptr_t kNumInputs = 1; | 1084 const intptr_t kNumInputs = 1; |
| 1082 return LocationSummary::Make(zone, kNumInputs, Location::RequiresRegister(), | 1085 return LocationSummary::Make(zone, kNumInputs, Location::RequiresRegister(), |
| 1083 LocationSummary::kNoCall); | 1086 LocationSummary::kNoCall); |
| 1084 } | 1087 } |
| (...skipping 4775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5860 __ SmiTag(result, PL); | 5863 __ SmiTag(result, PL); |
| 5861 __ b(&done, PL); | 5864 __ b(&done, PL); |
| 5862 | 5865 |
| 5863 __ Bind(&do_call); | 5866 __ Bind(&do_call); |
| 5864 __ Push(value_obj); | 5867 __ Push(value_obj); |
| 5865 ASSERT(instance_call()->HasICData()); | 5868 ASSERT(instance_call()->HasICData()); |
| 5866 const ICData& ic_data = *instance_call()->ic_data(); | 5869 const ICData& ic_data = *instance_call()->ic_data(); |
| 5867 ASSERT(ic_data.NumberOfChecksIs(1)); | 5870 ASSERT(ic_data.NumberOfChecksIs(1)); |
| 5868 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); | 5871 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); |
| 5869 | 5872 |
| 5873 const intptr_t kTypeArgsLen = 0; |
| 5870 const intptr_t kNumberOfArguments = 1; | 5874 const intptr_t kNumberOfArguments = 1; |
| 5871 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target, | 5875 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target, |
| 5872 kNumberOfArguments, | 5876 kTypeArgsLen, kNumberOfArguments, |
| 5873 Object::null_array(), // No argument names., | 5877 Object::null_array(), // No argument names., |
| 5874 locs(), ICData::Handle()); | 5878 locs(), ICData::Handle()); |
| 5875 __ Bind(&done); | 5879 __ Bind(&done); |
| 5876 } | 5880 } |
| 5877 | 5881 |
| 5878 | 5882 |
| 5879 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone, | 5883 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Zone* zone, |
| 5880 bool opt) const { | 5884 bool opt) const { |
| 5881 const intptr_t kNumInputs = 1; | 5885 const intptr_t kNumInputs = 1; |
| 5882 const intptr_t kNumTemps = 0; | 5886 const intptr_t kNumTemps = 0; |
| (...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7289 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 7293 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
| 7290 kGrowRegExpStackRuntimeEntry, 1, locs()); | 7294 kGrowRegExpStackRuntimeEntry, 1, locs()); |
| 7291 __ Drop(1); | 7295 __ Drop(1); |
| 7292 __ Pop(result); | 7296 __ Pop(result); |
| 7293 } | 7297 } |
| 7294 | 7298 |
| 7295 | 7299 |
| 7296 } // namespace dart | 7300 } // namespace dart |
| 7297 | 7301 |
| 7298 #endif // defined TARGET_ARCH_ARM | 7302 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |