Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 1580643004: Fix finalization of recursive type graph with bounds (issue 25389). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest( 272 FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest(
273 intptr_t token_pos, 273 intptr_t token_pos,
274 const AbstractType& type, 274 const AbstractType& type,
275 Label* is_instance_lbl, 275 Label* is_instance_lbl,
276 Label* is_not_instance_lbl) { 276 Label* is_not_instance_lbl) {
277 __ Comment("InstantiatedTypeWithArgumentsTest"); 277 __ Comment("InstantiatedTypeWithArgumentsTest");
278 ASSERT(type.IsInstantiated()); 278 ASSERT(type.IsInstantiated());
279 const Class& type_class = Class::ZoneHandle(zone(), type.type_class()); 279 const Class& type_class = Class::ZoneHandle(zone(), type.type_class());
280 ASSERT((type_class.NumTypeArguments() > 0) || type_class.IsSignatureClass()); 280 ASSERT((type_class.NumTypeArguments() > 0) || type_class.IsSignatureClass());
281 const Register kInstanceReg = EAX; 281 const Register kInstanceReg = EAX;
282 Error& malformed_error = Error::Handle(zone()); 282 Error& bound_error = Error::Handle(zone());
283 const Type& int_type = Type::Handle(zone(), Type::IntType()); 283 const Type& int_type = Type::Handle(zone(), Type::IntType());
284 const bool smi_is_ok = 284 const bool smi_is_ok = int_type.IsSubtypeOf(type, &bound_error, Heap::kOld);
285 int_type.IsSubtypeOf(type, &malformed_error, Heap::kOld);
286 // Malformed type should have been handled at graph construction time. 285 // Malformed type should have been handled at graph construction time.
287 ASSERT(smi_is_ok || malformed_error.IsNull()); 286 ASSERT(smi_is_ok || bound_error.IsNull());
288 __ testl(kInstanceReg, Immediate(kSmiTagMask)); 287 __ testl(kInstanceReg, Immediate(kSmiTagMask));
289 if (smi_is_ok) { 288 if (smi_is_ok) {
290 __ j(ZERO, is_instance_lbl); 289 __ j(ZERO, is_instance_lbl);
291 } else { 290 } else {
292 __ j(ZERO, is_not_instance_lbl); 291 __ j(ZERO, is_not_instance_lbl);
293 } 292 }
294 const intptr_t num_type_args = type_class.NumTypeArguments(); 293 const intptr_t num_type_args = type_class.NumTypeArguments();
295 const intptr_t num_type_params = type_class.NumTypeParameters(); 294 const intptr_t num_type_params = type_class.NumTypeParameters();
296 const intptr_t from_index = num_type_args - num_type_params; 295 const intptr_t from_index = num_type_args - num_type_params;
297 const TypeArguments& type_arguments = 296 const TypeArguments& type_arguments =
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 __ movups(reg, Address(ESP, 0)); 1838 __ movups(reg, Address(ESP, 0));
1840 __ addl(ESP, Immediate(kFpuRegisterSize)); 1839 __ addl(ESP, Immediate(kFpuRegisterSize));
1841 } 1840 }
1842 1841
1843 1842
1844 #undef __ 1843 #undef __
1845 1844
1846 } // namespace dart 1845 } // namespace dart
1847 1846
1848 #endif // defined TARGET_ARCH_IA32 1847 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698