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/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
9 | 9 |
10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1658 Label fall_through; | 1658 Label fall_through; |
1659 __ lw(T0, Address(SP, 0 * kWordSize)); | 1659 __ lw(T0, Address(SP, 0 * kWordSize)); |
1660 __ LoadClassIdMayBeSmi(T1, T0); | 1660 __ LoadClassIdMayBeSmi(T1, T0); |
1661 __ BranchEqual(T1, Immediate(kClosureCid), &fall_through); | 1661 __ BranchEqual(T1, Immediate(kClosureCid), &fall_through); |
1662 __ LoadClassById(T2, T1); | 1662 __ LoadClassById(T2, T1); |
1663 // T2: class of instance (T0). | 1663 // T2: class of instance (T0). |
1664 | 1664 |
1665 __ lhu(T1, FieldAddress(T2, Class::num_type_arguments_offset())); | 1665 __ lhu(T1, FieldAddress(T2, Class::num_type_arguments_offset())); |
1666 __ BranchNotEqual(T1, Immediate(0), &fall_through); | 1666 __ BranchNotEqual(T1, Immediate(0), &fall_through); |
1667 | 1667 |
1668 __ lw(V0, FieldAddress(T2, Class::canonical_types_offset())); | 1668 __ lw(V0, FieldAddress(T2, Class::canonical_type_offset())); |
1669 __ BranchEqual(V0, Object::null_object(), &fall_through); | 1669 __ BranchEqual(V0, Object::null_object(), &fall_through); |
1670 __ Ret(); | 1670 __ Ret(); |
1671 | 1671 |
1672 __ Bind(&fall_through); | 1672 __ Bind(&fall_through); |
1673 } | 1673 } |
1674 | 1674 |
1675 | 1675 |
1676 void Intrinsifier::String_getHashCode(Assembler* assembler) { | 1676 void Intrinsifier::String_getHashCode(Assembler* assembler) { |
1677 Label fall_through; | 1677 Label fall_through; |
1678 __ lw(T0, Address(SP, 0 * kWordSize)); | 1678 __ lw(T0, Address(SP, 0 * kWordSize)); |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2227 __ Ret(); | 2227 __ Ret(); |
2228 // Enabled. | 2228 // Enabled. |
2229 __ Bind(&true_label); | 2229 __ Bind(&true_label); |
2230 __ LoadObject(V0, Bool::True()); | 2230 __ LoadObject(V0, Bool::True()); |
2231 __ Ret(); | 2231 __ Ret(); |
2232 } | 2232 } |
2233 | 2233 |
2234 } // namespace dart | 2234 } // namespace dart |
2235 | 2235 |
2236 #endif // defined TARGET_ARCH_MIPS | 2236 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |