| OLD | NEW |
| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 897 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 898 Register char_code = locs()->in(0).reg(); | 898 Register char_code = locs()->in(0).reg(); |
| 899 Register result = locs()->out().reg(); | 899 Register result = locs()->out().reg(); |
| 900 __ LoadImmediate(result, | 900 __ LoadImmediate(result, |
| 901 reinterpret_cast<uword>(Symbols::PredefinedAddress())); | 901 reinterpret_cast<uword>(Symbols::PredefinedAddress())); |
| 902 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); | 902 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); |
| 903 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi. | 903 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi. |
| 904 } | 904 } |
| 905 | 905 |
| 906 | 906 |
| 907 LocationSummary* StringInterpolateInstr::MakeLocationSummary() const { |
| 908 const intptr_t kNumInputs = 1; |
| 909 const intptr_t kNumTemps = 0; |
| 910 LocationSummary* summary = |
| 911 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 912 summary->set_in(0, Location::RegisterLocation(R0)); |
| 913 summary->set_out(Location::RegisterLocation(R0)); |
| 914 return summary; |
| 915 } |
| 916 |
| 917 |
| 918 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 919 Register array = locs()->in(0).reg(); |
| 920 __ Push(array); |
| 921 const int kNumberOfArguments = 1; |
| 922 const Array& kNoArgumentNames = Object::null_array(); |
| 923 compiler->GenerateStaticCall(deopt_id(), |
| 924 token_pos(), |
| 925 CallFunction(), |
| 926 kNumberOfArguments, |
| 927 kNoArgumentNames, |
| 928 locs()); |
| 929 ASSERT(locs()->out().reg() == R0); |
| 930 } |
| 931 |
| 932 |
| 907 LocationSummary* LoadUntaggedInstr::MakeLocationSummary() const { | 933 LocationSummary* LoadUntaggedInstr::MakeLocationSummary() const { |
| 908 const intptr_t kNumInputs = 1; | 934 const intptr_t kNumInputs = 1; |
| 909 return LocationSummary::Make(kNumInputs, | 935 return LocationSummary::Make(kNumInputs, |
| 910 Location::RequiresRegister(), | 936 Location::RequiresRegister(), |
| 911 LocationSummary::kNoCall); | 937 LocationSummary::kNoCall); |
| 912 } | 938 } |
| 913 | 939 |
| 914 | 940 |
| 915 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 941 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 916 Register object = locs()->in(0).reg(); | 942 Register object = locs()->in(0).reg(); |
| (...skipping 3706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4623 compiler->GenerateCall(token_pos(), | 4649 compiler->GenerateCall(token_pos(), |
| 4624 &label, | 4650 &label, |
| 4625 PcDescriptors::kOther, | 4651 PcDescriptors::kOther, |
| 4626 locs()); | 4652 locs()); |
| 4627 __ Drop(2); // Discard type arguments and receiver. | 4653 __ Drop(2); // Discard type arguments and receiver. |
| 4628 } | 4654 } |
| 4629 | 4655 |
| 4630 } // namespace dart | 4656 } // namespace dart |
| 4631 | 4657 |
| 4632 #endif // defined TARGET_ARCH_ARM | 4658 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |