| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest( | 260 FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest( |
| 261 intptr_t token_pos, | 261 intptr_t token_pos, |
| 262 const AbstractType& type, | 262 const AbstractType& type, |
| 263 Label* is_instance_lbl, | 263 Label* is_instance_lbl, |
| 264 Label* is_not_instance_lbl) { | 264 Label* is_not_instance_lbl) { |
| 265 __ Comment("InstantiatedTypeWithArgumentsTest"); | 265 __ Comment("InstantiatedTypeWithArgumentsTest"); |
| 266 ASSERT(type.IsInstantiated()); | 266 ASSERT(type.IsInstantiated()); |
| 267 const Class& type_class = Class::ZoneHandle(zone(), type.type_class()); | 267 const Class& type_class = Class::ZoneHandle(zone(), type.type_class()); |
| 268 ASSERT((type_class.NumTypeArguments() > 0) || type_class.IsSignatureClass()); | 268 ASSERT((type_class.NumTypeArguments() > 0) || type_class.IsSignatureClass()); |
| 269 const Register kInstanceReg = R0; | 269 const Register kInstanceReg = R0; |
| 270 Error& malformed_error = Error::Handle(zone()); | 270 Error& bound_error = Error::Handle(zone()); |
| 271 const Type& int_type = Type::Handle(zone(), Type::IntType()); | 271 const Type& int_type = Type::Handle(zone(), Type::IntType()); |
| 272 const bool smi_is_ok = | 272 const bool smi_is_ok = int_type.IsSubtypeOf(type, &bound_error, Heap::kOld); |
| 273 int_type.IsSubtypeOf(type, &malformed_error, Heap::kOld); | |
| 274 // Malformed type should have been handled at graph construction time. | 273 // Malformed type should have been handled at graph construction time. |
| 275 ASSERT(smi_is_ok || malformed_error.IsNull()); | 274 ASSERT(smi_is_ok || bound_error.IsNull()); |
| 276 __ tsti(kInstanceReg, Immediate(kSmiTagMask)); | 275 __ tsti(kInstanceReg, Immediate(kSmiTagMask)); |
| 277 if (smi_is_ok) { | 276 if (smi_is_ok) { |
| 278 __ b(is_instance_lbl, EQ); | 277 __ b(is_instance_lbl, EQ); |
| 279 } else { | 278 } else { |
| 280 __ b(is_not_instance_lbl, EQ); | 279 __ b(is_not_instance_lbl, EQ); |
| 281 } | 280 } |
| 282 const intptr_t num_type_args = type_class.NumTypeArguments(); | 281 const intptr_t num_type_args = type_class.NumTypeArguments(); |
| 283 const intptr_t num_type_params = type_class.NumTypeParameters(); | 282 const intptr_t num_type_params = type_class.NumTypeParameters(); |
| 284 const intptr_t from_index = num_type_args - num_type_params; | 283 const intptr_t from_index = num_type_args - num_type_params; |
| 285 const TypeArguments& type_arguments = | 284 const TypeArguments& type_arguments = |
| (...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1870 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1872 __ PopDouble(reg); | 1871 __ PopDouble(reg); |
| 1873 } | 1872 } |
| 1874 | 1873 |
| 1875 | 1874 |
| 1876 #undef __ | 1875 #undef __ |
| 1877 | 1876 |
| 1878 } // namespace dart | 1877 } // namespace dart |
| 1879 | 1878 |
| 1880 #endif // defined TARGET_ARCH_ARM64 | 1879 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |