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