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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 break; | 211 break; |
212 default: | 212 default: |
213 UNREACHABLE(); | 213 UNREACHABLE(); |
214 } | 214 } |
215 } | 215 } |
216 } | 216 } |
217 | 217 |
218 | 218 |
219 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, | 219 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Zone* zone, |
220 bool opt) const { | 220 bool opt) const { |
221 const intptr_t kNumInputs = 3; | 221 const intptr_t kNumInputs = 2; |
222 const intptr_t kNumTemps = 0; | 222 const intptr_t kNumTemps = 0; |
223 LocationSummary* summary = new(zone) LocationSummary( | 223 LocationSummary* summary = new(zone) LocationSummary( |
224 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 224 zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
225 summary->set_in(0, Location::RegisterLocation(EAX)); // Value. | 225 summary->set_in(0, Location::RegisterLocation(EAX)); // Value. |
226 summary->set_in(1, Location::RegisterLocation(ECX)); // Instantiator. | 226 summary->set_in(1, Location::RegisterLocation(EDX)); // Type arguments. |
227 summary->set_in(2, Location::RegisterLocation(EDX)); // Type arguments. | |
228 summary->set_out(0, Location::RegisterLocation(EAX)); | 227 summary->set_out(0, Location::RegisterLocation(EAX)); |
229 return summary; | 228 return summary; |
230 } | 229 } |
231 | 230 |
232 | 231 |
233 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, | 232 LocationSummary* AssertBooleanInstr::MakeLocationSummary(Zone* zone, |
234 bool opt) const { | 233 bool opt) const { |
235 const intptr_t kNumInputs = 1; | 234 const intptr_t kNumInputs = 1; |
236 const intptr_t kNumTemps = 0; | 235 const intptr_t kNumTemps = 0; |
237 LocationSummary* locs = new(zone) LocationSummary( | 236 LocationSummary* locs = new(zone) LocationSummary( |
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2003 CanValueBeSmi()); | 2002 CanValueBeSmi()); |
2004 } else { | 2003 } else { |
2005 __ StoreIntoObjectNoBarrier( | 2004 __ StoreIntoObjectNoBarrier( |
2006 temp, FieldAddress(temp, Field::static_value_offset()), value); | 2005 temp, FieldAddress(temp, Field::static_value_offset()), value); |
2007 } | 2006 } |
2008 } | 2007 } |
2009 | 2008 |
2010 | 2009 |
2011 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, | 2010 LocationSummary* InstanceOfInstr::MakeLocationSummary(Zone* zone, |
2012 bool opt) const { | 2011 bool opt) const { |
2013 const intptr_t kNumInputs = 3; | 2012 const intptr_t kNumInputs = 2; |
2014 const intptr_t kNumTemps = 0; | 2013 const intptr_t kNumTemps = 0; |
2015 LocationSummary* summary = new(zone) LocationSummary( | 2014 LocationSummary* summary = new(zone) LocationSummary( |
2016 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 2015 zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
2017 summary->set_in(0, Location::RegisterLocation(EAX)); | 2016 summary->set_in(0, Location::RegisterLocation(EAX)); |
2018 summary->set_in(1, Location::RegisterLocation(ECX)); | 2017 summary->set_in(1, Location::RegisterLocation(EDX)); |
2019 summary->set_in(2, Location::RegisterLocation(EDX)); | |
2020 summary->set_out(0, Location::RegisterLocation(EAX)); | 2018 summary->set_out(0, Location::RegisterLocation(EAX)); |
2021 return summary; | 2019 return summary; |
2022 } | 2020 } |
2023 | 2021 |
2024 | 2022 |
2025 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2023 void InstanceOfInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2026 ASSERT(locs()->in(0).reg() == EAX); // Value. | 2024 ASSERT(locs()->in(0).reg() == EAX); // Value. |
2027 ASSERT(locs()->in(1).reg() == ECX); // Instantiator. | 2025 ASSERT(locs()->in(1).reg() == EDX); // Instantiator type arguments. |
2028 ASSERT(locs()->in(2).reg() == EDX); // Instantiator type arguments. | |
2029 | 2026 |
2030 compiler->GenerateInstanceOf(token_pos(), | 2027 compiler->GenerateInstanceOf(token_pos(), |
2031 deopt_id(), | 2028 deopt_id(), |
2032 type(), | 2029 type(), |
2033 negate_result(), | 2030 negate_result(), |
2034 locs()); | 2031 locs()); |
2035 ASSERT(locs()->out(0).reg() == EAX); | 2032 ASSERT(locs()->out(0).reg() == EAX); |
2036 } | 2033 } |
2037 | 2034 |
2038 | 2035 |
(...skipping 4834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6873 __ Drop(1); | 6870 __ Drop(1); |
6874 __ popl(result); | 6871 __ popl(result); |
6875 } | 6872 } |
6876 | 6873 |
6877 | 6874 |
6878 } // namespace dart | 6875 } // namespace dart |
6879 | 6876 |
6880 #undef __ | 6877 #undef __ |
6881 | 6878 |
6882 #endif // defined TARGET_ARCH_IA32 | 6879 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |