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

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

Issue 1528873002: VM: Use read-only handle Object::dynamic_type() where possible. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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_builder.cc ('k') | 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 // Load instantiator (or null) and instantiator type arguments on stack. 453 // Load instantiator (or null) and instantiator type arguments on stack.
454 __ ldr(R1, Address(SP, 0)); // Get instantiator type arguments. 454 __ ldr(R1, Address(SP, 0)); // Get instantiator type arguments.
455 // R1: instantiator type arguments. 455 // R1: instantiator type arguments.
456 // Check if type arguments are null, i.e. equivalent to vector of dynamic. 456 // Check if type arguments are null, i.e. equivalent to vector of dynamic.
457 __ CompareObject(R1, Object::null_object()); 457 __ CompareObject(R1, Object::null_object());
458 __ b(is_instance_lbl, EQ); 458 __ b(is_instance_lbl, EQ);
459 __ ldr(R2, 459 __ ldr(R2,
460 FieldAddress(R1, TypeArguments::type_at_offset(type_param.index()))); 460 FieldAddress(R1, TypeArguments::type_at_offset(type_param.index())));
461 // R2: concrete type of type. 461 // R2: concrete type of type.
462 // Check if type argument is dynamic. 462 // Check if type argument is dynamic.
463 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::DynamicType())); 463 __ CompareObject(R2, Object::dynamic_type());
464 __ b(is_instance_lbl, EQ); 464 __ b(is_instance_lbl, EQ);
465 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::ObjectType())); 465 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::ObjectType()));
466 __ b(is_instance_lbl, EQ); 466 __ b(is_instance_lbl, EQ);
467 467
468 // For Smi check quickly against int and num interfaces. 468 // For Smi check quickly against int and num interfaces.
469 Label not_smi; 469 Label not_smi;
470 __ tst(R0, Operand(kSmiTagMask)); // Value is Smi? 470 __ tst(R0, Operand(kSmiTagMask)); // Value is Smi?
471 __ b(&not_smi, NE); 471 __ b(&not_smi, NE);
472 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::IntType())); 472 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::IntType()));
473 __ b(is_instance_lbl, EQ); 473 __ b(is_instance_lbl, EQ);
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 DRegister dreg = EvenDRegisterOf(reg); 1910 DRegister dreg = EvenDRegisterOf(reg);
1911 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1911 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1912 } 1912 }
1913 1913
1914 1914
1915 #undef __ 1915 #undef __
1916 1916
1917 } // namespace dart 1917 } // namespace dart
1918 1918
1919 #endif // defined TARGET_ARCH_ARM 1919 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698