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 4584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4595 compiler->GenerateStaticCall(deopt_id(), | 4595 compiler->GenerateStaticCall(deopt_id(), |
4596 instance_call()->token_pos(), | 4596 instance_call()->token_pos(), |
4597 target, | 4597 target, |
4598 instance_call()->ArgumentCount(), | 4598 instance_call()->ArgumentCount(), |
4599 instance_call()->argument_names(), | 4599 instance_call()->argument_names(), |
4600 locs(), | 4600 locs(), |
4601 ICData::Handle()); | 4601 ICData::Handle()); |
4602 return; | 4602 return; |
4603 } | 4603 } |
4604 | 4604 |
4605 // Load receiver into T0. | |
4606 __ LoadFromOffset(T0, SP, (instance_call()->ArgumentCount() - 1) * kWordSize); | |
4607 | 4605 |
4608 Label* deopt = compiler->AddDeoptStub( | 4606 Label* deopt = compiler->AddDeoptStub( |
4609 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); | 4607 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); |
4610 LoadValueCid(compiler, T2, T0, | 4608 Label ok; |
4611 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | |
4612 | |
4613 compiler->EmitTestAndCall(ic_data(), | 4609 compiler->EmitTestAndCall(ic_data(), |
4614 T2, // Class id register. | |
4615 instance_call()->ArgumentCount(), | 4610 instance_call()->ArgumentCount(), |
4616 instance_call()->argument_names(), | 4611 instance_call()->argument_names(), |
4617 deopt, | 4612 deopt, |
| 4613 &ok, |
4618 deopt_id(), | 4614 deopt_id(), |
4619 instance_call()->token_pos(), | 4615 instance_call()->token_pos(), |
4620 locs()); | 4616 locs()); |
| 4617 __ Bind(&ok); |
4621 } | 4618 } |
4622 | 4619 |
4623 | 4620 |
4624 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, | 4621 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, |
4625 bool opt) const { | 4622 bool opt) const { |
4626 comparison()->InitializeLocationSummary(zone, opt); | 4623 comparison()->InitializeLocationSummary(zone, opt); |
4627 // Branches don't produce a result. | 4624 // Branches don't produce a result. |
4628 comparison()->locs()->set_out(0, Location::NoLocation()); | 4625 comparison()->locs()->set_out(0, Location::NoLocation()); |
4629 return comparison()->locs(); | 4626 return comparison()->locs(); |
4630 } | 4627 } |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5626 1, | 5623 1, |
5627 locs()); | 5624 locs()); |
5628 __ lw(result, Address(SP, 1 * kWordSize)); | 5625 __ lw(result, Address(SP, 1 * kWordSize)); |
5629 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5626 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
5630 } | 5627 } |
5631 | 5628 |
5632 | 5629 |
5633 } // namespace dart | 5630 } // namespace dart |
5634 | 5631 |
5635 #endif // defined TARGET_ARCH_MIPS | 5632 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |