| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 const Type& int_type = Type::Handle(Type::IntType()); | 229 const Type& int_type = Type::Handle(Type::IntType()); |
| 230 const bool smi_is_ok = int_type.IsSubtypeOf(type, &malformed_error); | 230 const bool smi_is_ok = int_type.IsSubtypeOf(type, &malformed_error); |
| 231 // Malformed type should have been handled at graph construction time. | 231 // Malformed type should have been handled at graph construction time. |
| 232 ASSERT(smi_is_ok || malformed_error.IsNull()); | 232 ASSERT(smi_is_ok || malformed_error.IsNull()); |
| 233 __ tst(kInstanceReg, ShifterOperand(kSmiTagMask)); | 233 __ tst(kInstanceReg, ShifterOperand(kSmiTagMask)); |
| 234 if (smi_is_ok) { | 234 if (smi_is_ok) { |
| 235 __ b(is_instance_lbl, EQ); | 235 __ b(is_instance_lbl, EQ); |
| 236 } else { | 236 } else { |
| 237 __ b(is_not_instance_lbl, EQ); | 237 __ b(is_not_instance_lbl, EQ); |
| 238 } | 238 } |
| 239 const intptr_t num_type_args = type_class.NumTypeArguments(); |
| 240 const intptr_t num_type_params = type_class.NumTypeParameters(); |
| 241 const intptr_t from_index = num_type_args - num_type_params; |
| 239 const AbstractTypeArguments& type_arguments = | 242 const AbstractTypeArguments& type_arguments = |
| 240 AbstractTypeArguments::ZoneHandle(type.arguments()); | 243 AbstractTypeArguments::ZoneHandle(type.arguments()); |
| 241 const bool is_raw_type = type_arguments.IsNull() || | 244 const bool is_raw_type = type_arguments.IsNull() || |
| 242 type_arguments.IsRaw(type_arguments.Length()); | 245 type_arguments.IsRaw(from_index, num_type_params); |
| 243 // Signature class is an instantiated parameterized type. | 246 // Signature class is an instantiated parameterized type. |
| 244 if (!type_class.IsSignatureClass()) { | 247 if (!type_class.IsSignatureClass()) { |
| 245 if (is_raw_type) { | 248 if (is_raw_type) { |
| 246 const Register kClassIdReg = R2; | 249 const Register kClassIdReg = R2; |
| 247 // dynamic type argument, check only classes. | 250 // dynamic type argument, check only classes. |
| 248 __ LoadClassId(kClassIdReg, kInstanceReg); | 251 __ LoadClassId(kClassIdReg, kInstanceReg); |
| 249 __ CompareImmediate(kClassIdReg, type_class.id()); | 252 __ CompareImmediate(kClassIdReg, type_class.id()); |
| 250 __ b(is_instance_lbl, EQ); | 253 __ b(is_instance_lbl, EQ); |
| 251 // List is a very common case. | 254 // List is a very common case. |
| 252 if (IsListClass(type_class)) { | 255 if (IsListClass(type_class)) { |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1873 DRegister dreg = EvenDRegisterOf(reg); | 1876 DRegister dreg = EvenDRegisterOf(reg); |
| 1874 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1877 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1875 } | 1878 } |
| 1876 | 1879 |
| 1877 | 1880 |
| 1878 #undef __ | 1881 #undef __ |
| 1879 | 1882 |
| 1880 } // namespace dart | 1883 } // namespace dart |
| 1881 | 1884 |
| 1882 #endif // defined TARGET_ARCH_ARM | 1885 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |