OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 type_arguments.IsRaw(type_arguments.Length()); | 151 type_arguments.IsRaw(type_arguments.Length()); |
152 if (is_raw_type) { | 152 if (is_raw_type) { |
153 const Register kClassIdReg = R10; | 153 const Register kClassIdReg = R10; |
154 // dynamic type argument, check only classes. | 154 // dynamic type argument, check only classes. |
155 // List is a very common case. | 155 // List is a very common case. |
156 __ LoadClassId(kClassIdReg, kInstanceReg); | 156 __ LoadClassId(kClassIdReg, kInstanceReg); |
157 if (!type_class.is_interface()) { | 157 if (!type_class.is_interface()) { |
158 __ cmpl(kClassIdReg, Immediate(type_class.id())); | 158 __ cmpl(kClassIdReg, Immediate(type_class.id())); |
159 __ j(EQUAL, is_instance_lbl); | 159 __ j(EQUAL, is_instance_lbl); |
160 } | 160 } |
161 if (type.IsListInterface()) { | 161 if (type_class.raw() == Isolate::Current()->object_store()->list_class()) { |
regis
2012/11/20 19:37:33
Done here too.
| |
162 GenerateListTypeCheck(kClassIdReg, is_instance_lbl); | 162 GenerateListTypeCheck(kClassIdReg, is_instance_lbl); |
163 } | 163 } |
164 return GenerateSubtype1TestCacheLookup( | 164 return GenerateSubtype1TestCacheLookup( |
165 token_pos, type_class, is_instance_lbl, is_not_instance_lbl); | 165 token_pos, type_class, is_instance_lbl, is_not_instance_lbl); |
166 } | 166 } |
167 // If one type argument only, check if type argument is Object or dynamic. | 167 // If one type argument only, check if type argument is Object or dynamic. |
168 if (type_arguments.Length() == 1) { | 168 if (type_arguments.Length() == 1) { |
169 const AbstractType& tp_argument = AbstractType::ZoneHandle( | 169 const AbstractType& tp_argument = AbstractType::ZoneHandle( |
170 type_arguments.TypeAt(0)); | 170 type_arguments.TypeAt(0)); |
171 ASSERT(!tp_argument.IsMalformed()); | 171 ASSERT(!tp_argument.IsMalformed()); |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1363 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1363 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
1364 __ Exchange(mem1, mem2); | 1364 __ Exchange(mem1, mem2); |
1365 } | 1365 } |
1366 | 1366 |
1367 | 1367 |
1368 #undef __ | 1368 #undef __ |
1369 | 1369 |
1370 } // namespace dart | 1370 } // namespace dart |
1371 | 1371 |
1372 #endif // defined TARGET_ARCH_X64 | 1372 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |