| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 AbstractTypeArguments::ZoneHandle(type.arguments()); | 248 AbstractTypeArguments::ZoneHandle(type.arguments()); |
| 249 const bool is_raw_type = type_arguments.IsNull() || | 249 const bool is_raw_type = type_arguments.IsNull() || |
| 250 type_arguments.IsRaw(type_arguments.Length()); | 250 type_arguments.IsRaw(type_arguments.Length()); |
| 251 if (is_raw_type) { | 251 if (is_raw_type) { |
| 252 const Register kClassIdReg = ECX; | 252 const Register kClassIdReg = ECX; |
| 253 // dynamic type argument, check only classes. | 253 // dynamic type argument, check only classes. |
| 254 __ LoadClassId(kClassIdReg, kInstanceReg); | 254 __ LoadClassId(kClassIdReg, kInstanceReg); |
| 255 __ cmpl(kClassIdReg, Immediate(type_class.id())); | 255 __ cmpl(kClassIdReg, Immediate(type_class.id())); |
| 256 __ j(EQUAL, is_instance_lbl); | 256 __ j(EQUAL, is_instance_lbl); |
| 257 // List is a very common case. | 257 // List is a very common case. |
| 258 if (type_class.IsListClass()) { | 258 if (IsListClass(type_class)) { |
| 259 GenerateListTypeCheck(kClassIdReg, is_instance_lbl); | 259 GenerateListTypeCheck(kClassIdReg, is_instance_lbl); |
| 260 } | 260 } |
| 261 return GenerateSubtype1TestCacheLookup( | 261 return GenerateSubtype1TestCacheLookup( |
| 262 token_pos, type_class, is_instance_lbl, is_not_instance_lbl); | 262 token_pos, type_class, is_instance_lbl, is_not_instance_lbl); |
| 263 } | 263 } |
| 264 // If one type argument only, check if type argument is Object or dynamic. | 264 // If one type argument only, check if type argument is Object or dynamic. |
| 265 if (type_arguments.Length() == 1) { | 265 if (type_arguments.Length() == 1) { |
| 266 const AbstractType& tp_argument = AbstractType::ZoneHandle( | 266 const AbstractType& tp_argument = AbstractType::ZoneHandle( |
| 267 type_arguments.TypeAt(0)); | 267 type_arguments.TypeAt(0)); |
| 268 ASSERT(!tp_argument.IsMalformed()); | 268 ASSERT(!tp_argument.IsMalformed()); |
| (...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1907 __ movups(reg, Address(ESP, 0)); | 1907 __ movups(reg, Address(ESP, 0)); |
| 1908 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1908 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1909 } | 1909 } |
| 1910 | 1910 |
| 1911 | 1911 |
| 1912 #undef __ | 1912 #undef __ |
| 1913 | 1913 |
| 1914 } // namespace dart | 1914 } // namespace dart |
| 1915 | 1915 |
| 1916 #endif // defined TARGET_ARCH_IA32 | 1916 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |