| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 Register result = locs()->out().reg(); | 953 Register result = locs()->out().reg(); |
| 954 __ LoadImmediate(result, | 954 __ LoadImmediate(result, |
| 955 Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress())), PP); | 955 Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress())), PP); |
| 956 __ movq(result, Address(result, | 956 __ movq(result, Address(result, |
| 957 char_code, | 957 char_code, |
| 958 TIMES_HALF_WORD_SIZE, // Char code is a smi. | 958 TIMES_HALF_WORD_SIZE, // Char code is a smi. |
| 959 Symbols::kNullCharCodeSymbolOffset * kWordSize)); | 959 Symbols::kNullCharCodeSymbolOffset * kWordSize)); |
| 960 } | 960 } |
| 961 | 961 |
| 962 | 962 |
| 963 LocationSummary* StringInterpolateInstr::MakeLocationSummary() const { |
| 964 const intptr_t kNumInputs = 1; |
| 965 const intptr_t kNumTemps = 0; |
| 966 LocationSummary* summary = |
| 967 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 968 summary->set_in(0, Location::RegisterLocation(RAX)); |
| 969 summary->set_out(Location::RegisterLocation(RAX)); |
| 970 return summary; |
| 971 } |
| 972 |
| 973 |
| 974 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 975 Register array = locs()->in(0).reg(); |
| 976 __ pushq(array); |
| 977 const int kNumberOfArguments = 1; |
| 978 const Array& kNoArgumentNames = Object::null_array(); |
| 979 compiler->GenerateStaticCall(deopt_id(), |
| 980 token_pos(), |
| 981 CallFunction(), |
| 982 kNumberOfArguments, |
| 983 kNoArgumentNames, |
| 984 locs()); |
| 985 ASSERT(locs()->out().reg() == RAX); |
| 986 } |
| 987 |
| 988 |
| 963 LocationSummary* LoadUntaggedInstr::MakeLocationSummary() const { | 989 LocationSummary* LoadUntaggedInstr::MakeLocationSummary() const { |
| 964 const intptr_t kNumInputs = 1; | 990 const intptr_t kNumInputs = 1; |
| 965 return LocationSummary::Make(kNumInputs, | 991 return LocationSummary::Make(kNumInputs, |
| 966 Location::RequiresRegister(), | 992 Location::RequiresRegister(), |
| 967 LocationSummary::kNoCall); | 993 LocationSummary::kNoCall); |
| 968 } | 994 } |
| 969 | 995 |
| 970 | 996 |
| 971 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 997 void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 972 Register object = locs()->in(0).reg(); | 998 Register object = locs()->in(0).reg(); |
| (...skipping 3806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4779 PcDescriptors::kOther, | 4805 PcDescriptors::kOther, |
| 4780 locs()); | 4806 locs()); |
| 4781 __ Drop(2); // Discard type arguments and receiver. | 4807 __ Drop(2); // Discard type arguments and receiver. |
| 4782 } | 4808 } |
| 4783 | 4809 |
| 4784 } // namespace dart | 4810 } // namespace dart |
| 4785 | 4811 |
| 4786 #undef __ | 4812 #undef __ |
| 4787 | 4813 |
| 4788 #endif // defined TARGET_ARCH_X64 | 4814 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |