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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.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_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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // Load instantiator (or null) and instantiator type arguments on stack. 461 // Load instantiator (or null) and instantiator type arguments on stack.
462 __ movl(EDX, Address(ESP, 0)); // Get instantiator type arguments. 462 __ movl(EDX, Address(ESP, 0)); // Get instantiator type arguments.
463 // EDX: instantiator type arguments. 463 // EDX: instantiator type arguments.
464 // Check if type arguments are null, i.e. equivalent to vector of dynamic. 464 // Check if type arguments are null, i.e. equivalent to vector of dynamic.
465 __ cmpl(EDX, raw_null); 465 __ cmpl(EDX, raw_null);
466 __ j(EQUAL, is_instance_lbl); 466 __ j(EQUAL, is_instance_lbl);
467 __ movl(EDI, 467 __ movl(EDI,
468 FieldAddress(EDX, TypeArguments::type_at_offset(type_param.index()))); 468 FieldAddress(EDX, TypeArguments::type_at_offset(type_param.index())));
469 // EDI: concrete type of type. 469 // EDI: concrete type of type.
470 // Check if type argument is dynamic. 470 // Check if type argument is dynamic.
471 __ CompareObject(EDI, Type::ZoneHandle(zone(), Type::DynamicType())); 471 __ CompareObject(EDI, Object::dynamic_type());
472 __ j(EQUAL, is_instance_lbl); 472 __ j(EQUAL, is_instance_lbl);
473 __ CompareObject(EDI, Type::ZoneHandle(zone(), Type::ObjectType())); 473 __ CompareObject(EDI, Type::ZoneHandle(zone(), Type::ObjectType()));
474 __ j(EQUAL, is_instance_lbl); 474 __ j(EQUAL, is_instance_lbl);
475 475
476 // For Smi check quickly against int and num interfaces. 476 // For Smi check quickly against int and num interfaces.
477 Label not_smi; 477 Label not_smi;
478 __ testl(EAX, Immediate(kSmiTagMask)); // Value is Smi? 478 __ testl(EAX, Immediate(kSmiTagMask)); // Value is Smi?
479 __ j(NOT_ZERO, &not_smi, Assembler::kNearJump); 479 __ j(NOT_ZERO, &not_smi, Assembler::kNearJump);
480 __ CompareObject(EDI, Type::ZoneHandle(zone(), Type::IntType())); 480 __ CompareObject(EDI, Type::ZoneHandle(zone(), Type::IntType()));
481 __ j(EQUAL, is_instance_lbl); 481 __ j(EQUAL, is_instance_lbl);
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1834 __ movups(reg, Address(ESP, 0)); 1834 __ movups(reg, Address(ESP, 0));
1835 __ addl(ESP, Immediate(kFpuRegisterSize)); 1835 __ addl(ESP, Immediate(kFpuRegisterSize));
1836 } 1836 }
1837 1837
1838 1838
1839 #undef __ 1839 #undef __
1840 1840
1841 } // namespace dart 1841 } // namespace dart
1842 1842
1843 #endif // defined TARGET_ARCH_IA32 1843 #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