| 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 | 957 |
| 958 __ LoadImmediate(result, | 958 __ LoadImmediate(result, |
| 959 reinterpret_cast<uword>(Symbols::PredefinedAddress())); | 959 reinterpret_cast<uword>(Symbols::PredefinedAddress())); |
| 960 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); | 960 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); |
| 961 __ sll(TMP1, char_code, 1); // Char code is a smi. | 961 __ sll(TMP1, char_code, 1); // Char code is a smi. |
| 962 __ addu(TMP1, TMP1, result); | 962 __ addu(TMP1, TMP1, result); |
| 963 __ lw(result, Address(TMP1)); | 963 __ lw(result, Address(TMP1)); |
| 964 } | 964 } |
| 965 | 965 |
| 966 | 966 |
| 967 LocationSummary* StringInterpolateInstr::MakeLocationSummary() const { |
| 968 const intptr_t kNumInputs = 1; |
| 969 const intptr_t kNumTemps = 0; |
| 970 LocationSummary* summary = |
| 971 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 972 summary->set_in(0, Location::RegisterLocation(A0)); |
| 973 summary->set_out(Location::RegisterLocation(V0)); |
| 974 return summary; |
| 975 } |
| 976 |
| 977 |
| 978 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 979 Register array = locs()->in(0).reg(); |
| 980 __ Push(array); |
| 981 const int kNumberOfArguments = 1; |
| 982 const Array& kNoArgumentNames = Object::null_array(); |
| 983 compiler->GenerateStaticCall(deopt_id(), |
| 984 token_pos(), |
| 985 CallFunction(), |
| 986 kNumberOfArguments, |
| 987 kNoArgumentNames, |
| 988 locs()); |
| 989 ASSERT(locs()->out().reg() == V0); |
| 990 } |
| 991 |
| 992 |
| 967 LocationSummary* LoadUntaggedInstr::MakeLocationSummary() const { | 993 LocationSummary* LoadUntaggedInstr::MakeLocationSummary() const { |
| 968 const intptr_t kNumInputs = 1; | 994 const intptr_t kNumInputs = 1; |
| 969 return LocationSummary::Make(kNumInputs, | 995 return LocationSummary::Make(kNumInputs, |
| 970 Location::RequiresRegister(), | 996 Location::RequiresRegister(), |
| 971 LocationSummary::kNoCall); | 997 LocationSummary::kNoCall); |
| 972 } | 998 } |
| 973 | 999 |
| 974 | 1000 |
| 975 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1001 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 976 Register object = locs()->in(0).reg(); | 1002 Register object = locs()->in(0).reg(); |
| (...skipping 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4050 compiler->GenerateCall(token_pos(), | 4076 compiler->GenerateCall(token_pos(), |
| 4051 &label, | 4077 &label, |
| 4052 PcDescriptors::kOther, | 4078 PcDescriptors::kOther, |
| 4053 locs()); | 4079 locs()); |
| 4054 __ Drop(2); // Discard type arguments and receiver. | 4080 __ Drop(2); // Discard type arguments and receiver. |
| 4055 } | 4081 } |
| 4056 | 4082 |
| 4057 } // namespace dart | 4083 } // namespace dart |
| 4058 | 4084 |
| 4059 #endif // defined TARGET_ARCH_MIPS | 4085 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |