| OLD | NEW |
| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 // Load instantiator (or null) and instantiator type arguments on stack. | 454 // Load instantiator (or null) and instantiator type arguments on stack. |
| 455 __ movq(RDX, Address(RSP, 0)); // Get instantiator type arguments. | 455 __ movq(RDX, Address(RSP, 0)); // Get instantiator type arguments. |
| 456 // RDX: instantiator type arguments. | 456 // RDX: instantiator type arguments. |
| 457 // Check if type arguments are null, i.e. equivalent to vector of dynamic. | 457 // Check if type arguments are null, i.e. equivalent to vector of dynamic. |
| 458 __ CompareObject(RDX, Object::null_object()); | 458 __ CompareObject(RDX, Object::null_object()); |
| 459 __ j(EQUAL, is_instance_lbl); | 459 __ j(EQUAL, is_instance_lbl); |
| 460 __ movq(RDI, | 460 __ movq(RDI, |
| 461 FieldAddress(RDX, TypeArguments::type_at_offset(type_param.index()))); | 461 FieldAddress(RDX, TypeArguments::type_at_offset(type_param.index()))); |
| 462 // RDI: Concrete type of type. | 462 // RDI: Concrete type of type. |
| 463 // Check if type argument is dynamic. | 463 // Check if type argument is dynamic. |
| 464 __ CompareObject(RDI, Type::ZoneHandle(zone(), Type::DynamicType())); | 464 __ CompareObject(RDI, Object::dynamic_type()); |
| 465 __ j(EQUAL, is_instance_lbl); | 465 __ j(EQUAL, is_instance_lbl); |
| 466 const Type& object_type = Type::ZoneHandle(zone(), Type::ObjectType()); | 466 const Type& object_type = Type::ZoneHandle(zone(), Type::ObjectType()); |
| 467 __ CompareObject(RDI, object_type); | 467 __ CompareObject(RDI, object_type); |
| 468 __ j(EQUAL, is_instance_lbl); | 468 __ j(EQUAL, is_instance_lbl); |
| 469 | 469 |
| 470 // For Smi check quickly against int and num interfaces. | 470 // For Smi check quickly against int and num interfaces. |
| 471 Label not_smi; | 471 Label not_smi; |
| 472 __ testq(RAX, Immediate(kSmiTagMask)); // Value is Smi? | 472 __ testq(RAX, Immediate(kSmiTagMask)); // Value is Smi? |
| 473 __ j(NOT_ZERO, ¬_smi, Assembler::kNearJump); | 473 __ j(NOT_ZERO, ¬_smi, Assembler::kNearJump); |
| 474 __ CompareObject(RDI, Type::ZoneHandle(zone(), Type::IntType())); | 474 __ CompareObject(RDI, Type::ZoneHandle(zone(), Type::IntType())); |
| (...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1795 __ movups(reg, Address(RSP, 0)); | 1795 __ movups(reg, Address(RSP, 0)); |
| 1796 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); | 1796 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); |
| 1797 } | 1797 } |
| 1798 | 1798 |
| 1799 | 1799 |
| 1800 #undef __ | 1800 #undef __ |
| 1801 | 1801 |
| 1802 } // namespace dart | 1802 } // namespace dart |
| 1803 | 1803 |
| 1804 #endif // defined TARGET_ARCH_X64 | 1804 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |