| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_DBC. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. |
| 6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 | 236 |
| 237 | 237 |
| 238 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( | 238 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( |
| 239 Zone* zone, bool optimizing) const { | 239 Zone* zone, bool optimizing) const { |
| 240 return MakeCallSummary(zone); | 240 return MakeCallSummary(zone); |
| 241 } | 241 } |
| 242 | 242 |
| 243 | 243 |
| 244 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 244 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 245 ASSERT(ic_data().NumArgsTested() == 1); |
| 246 if (!with_checks()) { |
| 247 ASSERT(ic_data().HasOneTarget()); |
| 248 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); |
| 249 const Array& arguments_descriptor = |
| 250 Array::Handle(ArgumentsDescriptor::New( |
| 251 instance_call()->ArgumentCount(), |
| 252 instance_call()->argument_names())); |
| 253 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor); |
| 254 |
| 255 __ PushConstant(target); |
| 256 __ StaticCall(instance_call()->ArgumentCount(), argdesc_kidx); |
| 257 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, |
| 258 deopt_id(), instance_call()->token_pos()); |
| 259 compiler->RecordAfterCall(this); |
| 260 __ PopLocal(locs()->out(0).reg()); |
| 261 return; |
| 262 } |
| 245 Unsupported(compiler); | 263 Unsupported(compiler); |
| 246 UNREACHABLE(); | 264 UNREACHABLE(); |
| 247 } | 265 } |
| 248 | 266 |
| 249 | 267 |
| 250 EMIT_NATIVE_CODE(Stop, 0) { | 268 EMIT_NATIVE_CODE(Stop, 0) { |
| 251 __ Stop(message()); | 269 __ Stop(message()); |
| 252 } | 270 } |
| 253 | 271 |
| 254 | 272 |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1463 __ IfULe(length, index); | 1481 __ IfULe(length, index); |
| 1464 compiler->EmitDeopt(deopt_id(), | 1482 compiler->EmitDeopt(deopt_id(), |
| 1465 ICData::kDeoptCheckArrayBound, | 1483 ICData::kDeoptCheckArrayBound, |
| 1466 (generalized_ ? ICData::kGeneralized : 0) | | 1484 (generalized_ ? ICData::kGeneralized : 0) | |
| 1467 (licm_hoisted_ ? ICData::kHoisted : 0)); | 1485 (licm_hoisted_ ? ICData::kHoisted : 0)); |
| 1468 } | 1486 } |
| 1469 | 1487 |
| 1470 } // namespace dart | 1488 } // namespace dart |
| 1471 | 1489 |
| 1472 #endif // defined TARGET_ARCH_DBC | 1490 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |