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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm.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 | « no previous file | runtime/vm/flow_graph_compiler_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest( 268 FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest(
269 intptr_t token_pos, 269 intptr_t token_pos,
270 const AbstractType& type, 270 const AbstractType& type,
271 Label* is_instance_lbl, 271 Label* is_instance_lbl,
272 Label* is_not_instance_lbl) { 272 Label* is_not_instance_lbl) {
273 __ Comment("InstantiatedTypeWithArgumentsTest"); 273 __ Comment("InstantiatedTypeWithArgumentsTest");
274 ASSERT(type.IsInstantiated()); 274 ASSERT(type.IsInstantiated());
275 const Class& type_class = Class::ZoneHandle(zone(), type.type_class()); 275 const Class& type_class = Class::ZoneHandle(zone(), type.type_class());
276 ASSERT((type_class.NumTypeArguments() > 0) || type_class.IsSignatureClass()); 276 ASSERT((type_class.NumTypeArguments() > 0) || type_class.IsSignatureClass());
277 const Register kInstanceReg = R0; 277 const Register kInstanceReg = R0;
278 Error& malformed_error = Error::Handle(zone()); 278 Error& bound_error = Error::Handle(zone());
279 const Type& int_type = Type::Handle(zone(), Type::IntType()); 279 const Type& int_type = Type::Handle(zone(), Type::IntType());
280 const bool smi_is_ok = 280 const bool smi_is_ok = int_type.IsSubtypeOf(type, &bound_error, Heap::kOld);
281 int_type.IsSubtypeOf(type, &malformed_error, Heap::kOld);
282 // Malformed type should have been handled at graph construction time. 281 // Malformed type should have been handled at graph construction time.
283 ASSERT(smi_is_ok || malformed_error.IsNull()); 282 ASSERT(smi_is_ok || bound_error.IsNull());
284 __ tst(kInstanceReg, Operand(kSmiTagMask)); 283 __ tst(kInstanceReg, Operand(kSmiTagMask));
285 if (smi_is_ok) { 284 if (smi_is_ok) {
286 __ b(is_instance_lbl, EQ); 285 __ b(is_instance_lbl, EQ);
287 } else { 286 } else {
288 __ b(is_not_instance_lbl, EQ); 287 __ b(is_not_instance_lbl, EQ);
289 } 288 }
290 const intptr_t num_type_args = type_class.NumTypeArguments(); 289 const intptr_t num_type_args = type_class.NumTypeArguments();
291 const intptr_t num_type_params = type_class.NumTypeParameters(); 290 const intptr_t num_type_params = type_class.NumTypeParameters();
292 const intptr_t from_index = num_type_args - num_type_params; 291 const intptr_t from_index = num_type_args - num_type_params;
293 const TypeArguments& type_arguments = 292 const TypeArguments& type_arguments =
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 DRegister dreg = EvenDRegisterOf(reg); 1932 DRegister dreg = EvenDRegisterOf(reg);
1934 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1933 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1935 } 1934 }
1936 1935
1937 1936
1938 #undef __ 1937 #undef __
1939 1938
1940 } // namespace dart 1939 } // namespace dart
1941 1940
1942 #endif // defined TARGET_ARCH_ARM 1941 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698