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