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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 __ lw(A1, Address(SP, 0)); // Get instantiator type arguments. | 442 __ lw(A1, Address(SP, 0)); // Get instantiator type arguments. |
443 // A1: instantiator type arguments. | 443 // A1: instantiator type arguments. |
444 // Check if type arguments are null, i.e. equivalent to vector of dynamic. | 444 // Check if type arguments are null, i.e. equivalent to vector of dynamic. |
445 __ LoadObject(T7, Object::null_object()); | 445 __ LoadObject(T7, Object::null_object()); |
446 __ beq(A1, T7, is_instance_lbl); | 446 __ beq(A1, T7, is_instance_lbl); |
447 __ lw(T2, | 447 __ lw(T2, |
448 FieldAddress(A1, TypeArguments::type_at_offset(type_param.index()))); | 448 FieldAddress(A1, TypeArguments::type_at_offset(type_param.index()))); |
449 // R2: concrete type of type. | 449 // R2: concrete type of type. |
450 // Check if type argument is dynamic. | 450 // Check if type argument is dynamic. |
451 __ BranchEqual(T2, | 451 __ BranchEqual(T2, |
452 Type::ZoneHandle(zone(), Type::DynamicType()), is_instance_lbl); | 452 Object::dynamic_type(), is_instance_lbl); |
453 __ BranchEqual(T2, | 453 __ BranchEqual(T2, |
454 Type::ZoneHandle(zone(), Type::ObjectType()), is_instance_lbl); | 454 Type::ZoneHandle(zone(), Type::ObjectType()), is_instance_lbl); |
455 | 455 |
456 // For Smi check quickly against int and num interfaces. | 456 // For Smi check quickly against int and num interfaces. |
457 Label not_smi; | 457 Label not_smi; |
458 __ andi(CMPRES1, A0, Immediate(kSmiTagMask)); | 458 __ andi(CMPRES1, A0, Immediate(kSmiTagMask)); |
459 __ bne(CMPRES1, ZR, ¬_smi); // Value is Smi? | 459 __ bne(CMPRES1, ZR, ¬_smi); // Value is Smi? |
460 __ BranchEqual(T2, | 460 __ BranchEqual(T2, |
461 Type::ZoneHandle(zone(), Type::IntType()), is_instance_lbl); | 461 Type::ZoneHandle(zone(), Type::IntType()), is_instance_lbl); |
462 __ BranchEqual(T2, | 462 __ BranchEqual(T2, |
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1879 __ AddImmediate(SP, kDoubleSize); | 1879 __ AddImmediate(SP, kDoubleSize); |
1880 } | 1880 } |
1881 | 1881 |
1882 | 1882 |
1883 #undef __ | 1883 #undef __ |
1884 | 1884 |
1885 | 1885 |
1886 } // namespace dart | 1886 } // namespace dart |
1887 | 1887 |
1888 #endif // defined TARGET_ARCH_MIPS | 1888 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |