| 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 // - object in A0 for successful assignable check (or throws TypeError). | 661 // - object in A0 for successful assignable check (or throws TypeError). |
| 662 // Clobbers: T0, T1, T2 | 662 // Clobbers: T0, T1, T2 |
| 663 // Performance notes: positive checks must be quick, negative checks can be slow | 663 // Performance notes: positive checks must be quick, negative checks can be slow |
| 664 // as they throw an exception. | 664 // as they throw an exception. |
| 665 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, | 665 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, |
| 666 intptr_t deopt_id, | 666 intptr_t deopt_id, |
| 667 const AbstractType& dst_type, | 667 const AbstractType& dst_type, |
| 668 const String& dst_name, | 668 const String& dst_name, |
| 669 LocationSummary* locs) { | 669 LocationSummary* locs) { |
| 670 __ Comment("AssertAssignable"); | 670 __ Comment("AssertAssignable"); |
| 671 ASSERT(token_pos >= 0); | 671 ASSERT(Scanner::ValidSourcePosition(token_pos)); |
| 672 ASSERT(!dst_type.IsNull()); | 672 ASSERT(!dst_type.IsNull()); |
| 673 ASSERT(dst_type.IsFinalized()); | 673 ASSERT(dst_type.IsFinalized()); |
| 674 // Assignable check is skipped in FlowGraphBuilder, not here. | 674 // Assignable check is skipped in FlowGraphBuilder, not here. |
| 675 ASSERT(dst_type.IsMalformedOrMalbounded() || | 675 ASSERT(dst_type.IsMalformedOrMalbounded() || |
| 676 (!dst_type.IsDynamicType() && !dst_type.IsObjectType())); | 676 (!dst_type.IsDynamicType() && !dst_type.IsObjectType())); |
| 677 // Preserve instantiator type arguments. | 677 // Preserve instantiator type arguments. |
| 678 __ addiu(SP, SP, Immediate(-1 * kWordSize)); | 678 __ addiu(SP, SP, Immediate(-1 * kWordSize)); |
| 679 __ sw(A1, Address(SP, 0 * kWordSize)); | 679 __ sw(A1, Address(SP, 0 * kWordSize)); |
| 680 | 680 |
| 681 // A null object is always assignable and is returned as result. | 681 // A null object is always assignable and is returned as result. |
| (...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1897 __ AddImmediate(SP, kDoubleSize); | 1897 __ AddImmediate(SP, kDoubleSize); |
| 1898 } | 1898 } |
| 1899 | 1899 |
| 1900 | 1900 |
| 1901 #undef __ | 1901 #undef __ |
| 1902 | 1902 |
| 1903 | 1903 |
| 1904 } // namespace dart | 1904 } // namespace dart |
| 1905 | 1905 |
| 1906 #endif // defined TARGET_ARCH_MIPS | 1906 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |