| 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 4568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4579 UNIMPLEMENTED(); | 4579 UNIMPLEMENTED(); |
| 4580 } | 4580 } |
| 4581 | 4581 |
| 4582 | 4582 |
| 4583 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( | 4583 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( |
| 4584 Zone* zone, bool opt) const { | 4584 Zone* zone, bool opt) const { |
| 4585 return MakeCallSummary(zone); | 4585 return MakeCallSummary(zone); |
| 4586 } | 4586 } |
| 4587 | 4587 |
| 4588 | 4588 |
| 4589 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | |
| 4590 __ Comment("PolymorphicInstanceCallInstr"); | |
| 4591 ASSERT(ic_data().NumArgsTested() == 1); | |
| 4592 if (!with_checks()) { | |
| 4593 ASSERT(ic_data().HasOneTarget()); | |
| 4594 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | |
| 4595 compiler->GenerateStaticCall(deopt_id(), | |
| 4596 instance_call()->token_pos(), | |
| 4597 target, | |
| 4598 instance_call()->ArgumentCount(), | |
| 4599 instance_call()->argument_names(), | |
| 4600 locs(), | |
| 4601 ICData::Handle()); | |
| 4602 return; | |
| 4603 } | |
| 4604 | |
| 4605 | |
| 4606 Label* deopt = compiler->AddDeoptStub( | |
| 4607 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); | |
| 4608 Label ok; | |
| 4609 compiler->EmitTestAndCall(ic_data(), | |
| 4610 instance_call()->ArgumentCount(), | |
| 4611 instance_call()->argument_names(), | |
| 4612 deopt, | |
| 4613 &ok, | |
| 4614 deopt_id(), | |
| 4615 instance_call()->token_pos(), | |
| 4616 locs()); | |
| 4617 __ Bind(&ok); | |
| 4618 } | |
| 4619 | |
| 4620 | |
| 4621 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, | 4589 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, |
| 4622 bool opt) const { | 4590 bool opt) const { |
| 4623 comparison()->InitializeLocationSummary(zone, opt); | 4591 comparison()->InitializeLocationSummary(zone, opt); |
| 4624 // Branches don't produce a result. | 4592 // Branches don't produce a result. |
| 4625 comparison()->locs()->set_out(0, Location::NoLocation()); | 4593 comparison()->locs()->set_out(0, Location::NoLocation()); |
| 4626 return comparison()->locs(); | 4594 return comparison()->locs(); |
| 4627 } | 4595 } |
| 4628 | 4596 |
| 4629 | 4597 |
| 4630 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4598 void BranchInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5623 1, | 5591 1, |
| 5624 locs()); | 5592 locs()); |
| 5625 __ lw(result, Address(SP, 1 * kWordSize)); | 5593 __ lw(result, Address(SP, 1 * kWordSize)); |
| 5626 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5594 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 5627 } | 5595 } |
| 5628 | 5596 |
| 5629 | 5597 |
| 5630 } // namespace dart | 5598 } // namespace dart |
| 5631 | 5599 |
| 5632 #endif // defined TARGET_ARCH_MIPS | 5600 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |