| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 AbstractTypeArguments::ZoneHandle(type.arguments()); | 244 AbstractTypeArguments::ZoneHandle(type.arguments()); |
| 245 const bool is_raw_type = type_arguments.IsNull() || | 245 const bool is_raw_type = type_arguments.IsNull() || |
| 246 type_arguments.IsRaw(type_arguments.Length()); | 246 type_arguments.IsRaw(type_arguments.Length()); |
| 247 if (is_raw_type) { | 247 if (is_raw_type) { |
| 248 const Register kClassIdReg = R10; | 248 const Register kClassIdReg = R10; |
| 249 // dynamic type argument, check only classes. | 249 // dynamic type argument, check only classes. |
| 250 __ LoadClassId(kClassIdReg, kInstanceReg); | 250 __ LoadClassId(kClassIdReg, kInstanceReg); |
| 251 __ cmpl(kClassIdReg, Immediate(type_class.id())); | 251 __ cmpl(kClassIdReg, Immediate(type_class.id())); |
| 252 __ j(EQUAL, is_instance_lbl); | 252 __ j(EQUAL, is_instance_lbl); |
| 253 // List is a very common case. | 253 // List is a very common case. |
| 254 if (type_class.IsListClass()) { | 254 if (IsListClass(type_class)) { |
| 255 GenerateListTypeCheck(kClassIdReg, is_instance_lbl); | 255 GenerateListTypeCheck(kClassIdReg, is_instance_lbl); |
| 256 } | 256 } |
| 257 return GenerateSubtype1TestCacheLookup( | 257 return GenerateSubtype1TestCacheLookup( |
| 258 token_pos, type_class, is_instance_lbl, is_not_instance_lbl); | 258 token_pos, type_class, is_instance_lbl, is_not_instance_lbl); |
| 259 } | 259 } |
| 260 // If one type argument only, check if type argument is Object or dynamic. | 260 // If one type argument only, check if type argument is Object or dynamic. |
| 261 if (type_arguments.Length() == 1) { | 261 if (type_arguments.Length() == 1) { |
| 262 const AbstractType& tp_argument = AbstractType::ZoneHandle( | 262 const AbstractType& tp_argument = AbstractType::ZoneHandle( |
| 263 type_arguments.TypeAt(0)); | 263 type_arguments.TypeAt(0)); |
| 264 ASSERT(!tp_argument.IsMalformed()); | 264 ASSERT(!tp_argument.IsMalformed()); |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1885 __ movups(reg, Address(RSP, 0)); | 1885 __ movups(reg, Address(RSP, 0)); |
| 1886 __ addq(RSP, Immediate(kFpuRegisterSize)); | 1886 __ addq(RSP, Immediate(kFpuRegisterSize)); |
| 1887 } | 1887 } |
| 1888 | 1888 |
| 1889 | 1889 |
| 1890 #undef __ | 1890 #undef __ |
| 1891 | 1891 |
| 1892 } // namespace dart | 1892 } // namespace dart |
| 1893 | 1893 |
| 1894 #endif // defined TARGET_ARCH_X64 | 1894 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |