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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm64.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_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_ia32.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 // Load instantiator (or null) and instantiator type arguments on stack. 445 // Load instantiator (or null) and instantiator type arguments on stack.
446 __ ldr(R1, Address(SP)); // Get instantiator type arguments. 446 __ ldr(R1, Address(SP)); // Get instantiator type arguments.
447 // R1: instantiator type arguments. 447 // R1: instantiator type arguments.
448 // Check if type arguments are null, i.e. equivalent to vector of dynamic. 448 // Check if type arguments are null, i.e. equivalent to vector of dynamic.
449 __ CompareObject(R1, Object::null_object()); 449 __ CompareObject(R1, Object::null_object());
450 __ b(is_instance_lbl, EQ); 450 __ b(is_instance_lbl, EQ);
451 __ LoadFieldFromOffset( 451 __ LoadFieldFromOffset(
452 R2, R1, TypeArguments::type_at_offset(type_param.index())); 452 R2, R1, TypeArguments::type_at_offset(type_param.index()));
453 // R2: concrete type of type. 453 // R2: concrete type of type.
454 // Check if type argument is dynamic. 454 // Check if type argument is dynamic.
455 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::DynamicType())); 455 __ CompareObject(R2, Object::dynamic_type());
456 __ b(is_instance_lbl, EQ); 456 __ b(is_instance_lbl, EQ);
457 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::ObjectType())); 457 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::ObjectType()));
458 __ b(is_instance_lbl, EQ); 458 __ b(is_instance_lbl, EQ);
459 459
460 // For Smi check quickly against int and num interfaces. 460 // For Smi check quickly against int and num interfaces.
461 Label not_smi; 461 Label not_smi;
462 __ tsti(R0, Immediate(kSmiTagMask)); // Value is Smi? 462 __ tsti(R0, Immediate(kSmiTagMask)); // Value is Smi?
463 __ b(&not_smi, NE); 463 __ b(&not_smi, NE);
464 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::IntType())); 464 __ CompareObject(R2, Type::ZoneHandle(zone(), Type::IntType()));
465 __ b(is_instance_lbl, EQ); 465 __ b(is_instance_lbl, EQ);
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1857 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1858 __ PopDouble(reg); 1858 __ PopDouble(reg);
1859 } 1859 }
1860 1860
1861 1861
1862 #undef __ 1862 #undef __
1863 1863
1864 } // namespace dart 1864 } // namespace dart
1865 1865
1866 #endif // defined TARGET_ARCH_ARM64 1866 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698