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_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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 // - EDX: instantiator type arguments or raw_null. | 677 // - EDX: instantiator type arguments or raw_null. |
678 // Returns: | 678 // Returns: |
679 // - object in EAX for successful assignable check (or throws TypeError). | 679 // - object in EAX for successful assignable check (or throws TypeError). |
680 // Performance notes: positive checks must be quick, negative checks can be slow | 680 // Performance notes: positive checks must be quick, negative checks can be slow |
681 // as they throw an exception. | 681 // as they throw an exception. |
682 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, | 682 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, |
683 intptr_t deopt_id, | 683 intptr_t deopt_id, |
684 const AbstractType& dst_type, | 684 const AbstractType& dst_type, |
685 const String& dst_name, | 685 const String& dst_name, |
686 LocationSummary* locs) { | 686 LocationSummary* locs) { |
687 ASSERT(Scanner::ValidSourcePosition(token_pos)); | 687 ASSERT(!Token::IsClassifying(token_pos)); |
688 ASSERT(!dst_type.IsNull()); | 688 ASSERT(!dst_type.IsNull()); |
689 ASSERT(dst_type.IsFinalized()); | 689 ASSERT(dst_type.IsFinalized()); |
690 // Assignable check is skipped in FlowGraphBuilder, not here. | 690 // Assignable check is skipped in FlowGraphBuilder, not here. |
691 ASSERT(dst_type.IsMalformedOrMalbounded() || | 691 ASSERT(dst_type.IsMalformedOrMalbounded() || |
692 (!dst_type.IsDynamicType() && !dst_type.IsObjectType())); | 692 (!dst_type.IsDynamicType() && !dst_type.IsObjectType())); |
693 __ pushl(EDX); // Store instantiator type arguments. | 693 __ pushl(EDX); // Store instantiator type arguments. |
694 // A null object is always assignable and is returned as result. | 694 // A null object is always assignable and is returned as result. |
695 const Immediate& raw_null = | 695 const Immediate& raw_null = |
696 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 696 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
697 Label is_assignable, runtime_call; | 697 Label is_assignable, runtime_call; |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1838 __ movups(reg, Address(ESP, 0)); | 1838 __ movups(reg, Address(ESP, 0)); |
1839 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1839 __ addl(ESP, Immediate(kFpuRegisterSize)); |
1840 } | 1840 } |
1841 | 1841 |
1842 | 1842 |
1843 #undef __ | 1843 #undef __ |
1844 | 1844 |
1845 } // namespace dart | 1845 } // namespace dart |
1846 | 1846 |
1847 #endif // defined TARGET_ARCH_IA32 | 1847 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |