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 4652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4663 } | 4663 } |
4664 return summary; | 4664 return summary; |
4665 } | 4665 } |
4666 | 4666 |
4667 | 4667 |
4668 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 4668 void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
4669 Label* deopt = compiler->AddDeoptStub(deopt_id(), | 4669 Label* deopt = compiler->AddDeoptStub(deopt_id(), |
4670 ICData::kDeoptCheckClass, | 4670 ICData::kDeoptCheckClass, |
4671 licm_hoisted_ ? ICData::kHoisted : 0); | 4671 licm_hoisted_ ? ICData::kHoisted : 0); |
4672 if (IsNullCheck()) { | 4672 if (IsNullCheck()) { |
4673 __ BranchEqual(locs()->in(0).reg(), Object::null_object(), deopt); | 4673 if (DeoptIfNull()) { |
| 4674 __ BranchEqual(locs()->in(0).reg(), Object::null_object(), deopt); |
| 4675 } else { |
| 4676 ASSERT(DeoptIfNotNull()); |
| 4677 __ BranchNotEqual(locs()->in(0).reg(), Object::null_object(), deopt); |
| 4678 } |
4674 return; | 4679 return; |
4675 } | 4680 } |
4676 | 4681 |
4677 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || | 4682 ASSERT((unary_checks().GetReceiverClassIdAt(0) != kSmiCid) || |
4678 (unary_checks().NumberOfChecks() > 1)); | 4683 (unary_checks().NumberOfChecks() > 1)); |
4679 Register value = locs()->in(0).reg(); | 4684 Register value = locs()->in(0).reg(); |
4680 Register temp = locs()->temp(0).reg(); | 4685 Register temp = locs()->temp(0).reg(); |
4681 Label is_ok; | 4686 Label is_ok; |
4682 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { | 4687 if (unary_checks().GetReceiverClassIdAt(0) == kSmiCid) { |
4683 __ andi(CMPRES1, value, Immediate(kSmiTagMask)); | 4688 __ andi(CMPRES1, value, Immediate(kSmiTagMask)); |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5620 1, | 5625 1, |
5621 locs()); | 5626 locs()); |
5622 __ lw(result, Address(SP, 1 * kWordSize)); | 5627 __ lw(result, Address(SP, 1 * kWordSize)); |
5623 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5628 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
5624 } | 5629 } |
5625 | 5630 |
5626 | 5631 |
5627 } // namespace dart | 5632 } // namespace dart |
5628 | 5633 |
5629 #endif // defined TARGET_ARCH_MIPS | 5634 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |