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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 LocationSummary::kNoCall); | 972 LocationSummary::kNoCall); |
973 } | 973 } |
974 | 974 |
975 | 975 |
976 void StringToCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 976 void StringToCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
977 ASSERT(cid_ == kOneByteStringCid); | 977 ASSERT(cid_ == kOneByteStringCid); |
978 Register str = locs()->in(0).reg(); | 978 Register str = locs()->in(0).reg(); |
979 Register result = locs()->out(0).reg(); | 979 Register result = locs()->out(0).reg(); |
980 __ ldr(result, FieldAddress(str, String::length_offset())); | 980 __ ldr(result, FieldAddress(str, String::length_offset())); |
981 __ cmp(result, ShifterOperand(Smi::RawValue(1))); | 981 __ cmp(result, ShifterOperand(Smi::RawValue(1))); |
982 __ LoadImmediate(result, Smi::RawValue(-1), NE); | 982 __ LoadImmediate(result, -1, NE); |
983 __ ldrb(result, FieldAddress(str, OneByteString::data_offset()), EQ); | 983 __ ldrb(result, FieldAddress(str, OneByteString::data_offset()), EQ); |
984 __ SmiTag(result); | 984 __ SmiTag(result); |
985 } | 985 } |
986 | 986 |
987 | 987 |
988 LocationSummary* StringInterpolateInstr::MakeLocationSummary(bool opt) const { | 988 LocationSummary* StringInterpolateInstr::MakeLocationSummary(bool opt) const { |
989 const intptr_t kNumInputs = 1; | 989 const intptr_t kNumInputs = 1; |
990 const intptr_t kNumTemps = 0; | 990 const intptr_t kNumTemps = 0; |
991 LocationSummary* summary = | 991 LocationSummary* summary = |
992 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 992 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
(...skipping 5150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6143 compiler->GenerateCall(token_pos(), | 6143 compiler->GenerateCall(token_pos(), |
6144 &label, | 6144 &label, |
6145 PcDescriptors::kOther, | 6145 PcDescriptors::kOther, |
6146 locs()); | 6146 locs()); |
6147 __ Drop(ArgumentCount()); // Discard arguments. | 6147 __ Drop(ArgumentCount()); // Discard arguments. |
6148 } | 6148 } |
6149 | 6149 |
6150 } // namespace dart | 6150 } // namespace dart |
6151 | 6151 |
6152 #endif // defined TARGET_ARCH_ARM | 6152 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |