| 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 // - RDX: instantiator type arguments or raw_null. | 670 // - RDX: instantiator type arguments or raw_null. |
| 671 // Returns: | 671 // Returns: |
| 672 // - object in RAX for successful assignable check (or throws TypeError). | 672 // - object in RAX for successful assignable check (or throws TypeError). |
| 673 // Performance notes: positive checks must be quick, negative checks can be slow | 673 // Performance notes: positive checks must be quick, negative checks can be slow |
| 674 // as they throw an exception. | 674 // as they throw an exception. |
| 675 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, | 675 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, |
| 676 intptr_t deopt_id, | 676 intptr_t deopt_id, |
| 677 const AbstractType& dst_type, | 677 const AbstractType& dst_type, |
| 678 const String& dst_name, | 678 const String& dst_name, |
| 679 LocationSummary* locs) { | 679 LocationSummary* locs) { |
| 680 ASSERT(token_pos >= 0); | 680 ASSERT(Scanner::ValidSourcePosition(token_pos)); |
| 681 ASSERT(!dst_type.IsNull()); | 681 ASSERT(!dst_type.IsNull()); |
| 682 ASSERT(dst_type.IsFinalized()); | 682 ASSERT(dst_type.IsFinalized()); |
| 683 // Assignable check is skipped in FlowGraphBuilder, not here. | 683 // Assignable check is skipped in FlowGraphBuilder, not here. |
| 684 ASSERT(dst_type.IsMalformedOrMalbounded() || | 684 ASSERT(dst_type.IsMalformedOrMalbounded() || |
| 685 (!dst_type.IsDynamicType() && !dst_type.IsObjectType())); | 685 (!dst_type.IsDynamicType() && !dst_type.IsObjectType())); |
| 686 __ pushq(RDX); // Store instantiator type arguments. | 686 __ pushq(RDX); // Store instantiator type arguments. |
| 687 // A null object is always assignable and is returned as result. | 687 // A null object is always assignable and is returned as result. |
| 688 Label is_assignable, runtime_call; | 688 Label is_assignable, runtime_call; |
| 689 __ CompareObject(RAX, Object::null_object()); | 689 __ CompareObject(RAX, Object::null_object()); |
| 690 __ j(EQUAL, &is_assignable); | 690 __ j(EQUAL, &is_assignable); |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 __ movups(reg, Address(RSP, 0)); | 1811 __ movups(reg, Address(RSP, 0)); |
| 1812 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); | 1812 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); |
| 1813 } | 1813 } |
| 1814 | 1814 |
| 1815 | 1815 |
| 1816 #undef __ | 1816 #undef __ |
| 1817 | 1817 |
| 1818 } // namespace dart | 1818 } // namespace dart |
| 1819 | 1819 |
| 1820 #endif // defined TARGET_ARCH_X64 | 1820 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |