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_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
6 | 6 |
7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
8 | 8 |
9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
10 #include "vm/cha.h" | 10 #include "vm/cha.h" |
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 code.set_static_calls_target_table( | 897 code.set_static_calls_target_table( |
898 Array::Handle(Array::MakeArray(static_calls_target_table_))); | 898 Array::Handle(Array::MakeArray(static_calls_target_table_))); |
899 } | 899 } |
900 | 900 |
901 | 901 |
902 // Returns 'true' if code generation for this function is complete, i.e., | 902 // Returns 'true' if code generation for this function is complete, i.e., |
903 // no fall-through to regular code is needed. | 903 // no fall-through to regular code is needed. |
904 void FlowGraphCompiler::TryIntrinsify() { | 904 void FlowGraphCompiler::TryIntrinsify() { |
905 // Intrinsification skips arguments checks, therefore disable if in checked | 905 // Intrinsification skips arguments checks, therefore disable if in checked |
906 // mode. | 906 // mode. |
907 if (FLAG_intrinsify && !FLAG_enable_type_checks) { | 907 if (FLAG_intrinsify && !I->TypeChecksEnabled()) { |
908 if (parsed_function().function().kind() == RawFunction::kImplicitGetter) { | 908 if (parsed_function().function().kind() == RawFunction::kImplicitGetter) { |
909 // An implicit getter must have a specific AST structure. | 909 // An implicit getter must have a specific AST structure. |
910 const SequenceNode& sequence_node = *parsed_function().node_sequence(); | 910 const SequenceNode& sequence_node = *parsed_function().node_sequence(); |
911 ASSERT(sequence_node.length() == 1); | 911 ASSERT(sequence_node.length() == 1); |
912 ASSERT(sequence_node.NodeAt(0)->IsReturnNode()); | 912 ASSERT(sequence_node.NodeAt(0)->IsReturnNode()); |
913 const ReturnNode& return_node = *sequence_node.NodeAt(0)->AsReturnNode(); | 913 const ReturnNode& return_node = *sequence_node.NodeAt(0)->AsReturnNode(); |
914 ASSERT(return_node.value()->IsLoadInstanceFieldNode()); | 914 ASSERT(return_node.value()->IsLoadInstanceFieldNode()); |
915 const LoadInstanceFieldNode& load_node = | 915 const LoadInstanceFieldNode& load_node = |
916 *return_node.value()->AsLoadInstanceFieldNode(); | 916 *return_node.value()->AsLoadInstanceFieldNode(); |
917 // Only intrinsify getter if the field cannot contain a mutable double. | 917 // Only intrinsify getter if the field cannot contain a mutable double. |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 case kUnboxedMint: | 1574 case kUnboxedMint: |
1575 return mint_class(); | 1575 return mint_class(); |
1576 default: | 1576 default: |
1577 UNREACHABLE(); | 1577 UNREACHABLE(); |
1578 return Class::ZoneHandle(); | 1578 return Class::ZoneHandle(); |
1579 } | 1579 } |
1580 } | 1580 } |
1581 | 1581 |
1582 | 1582 |
1583 } // namespace dart | 1583 } // namespace dart |
OLD | NEW |