| 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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 code.set_static_calls_target_table(targets); | 973 code.set_static_calls_target_table(targets); |
| 974 INC_STAT(isolate(), total_code_size, targets.Length() * sizeof(uword)); | 974 INC_STAT(isolate(), total_code_size, targets.Length() * sizeof(uword)); |
| 975 } | 975 } |
| 976 | 976 |
| 977 | 977 |
| 978 // Returns 'true' if code generation for this function is complete, i.e., | 978 // Returns 'true' if code generation for this function is complete, i.e., |
| 979 // no fall-through to regular code is needed. | 979 // no fall-through to regular code is needed. |
| 980 void FlowGraphCompiler::TryIntrinsify() { | 980 void FlowGraphCompiler::TryIntrinsify() { |
| 981 // Intrinsification skips arguments checks, therefore disable if in checked | 981 // Intrinsification skips arguments checks, therefore disable if in checked |
| 982 // mode. | 982 // mode. |
| 983 if (FLAG_intrinsify && !isolate()->TypeChecksEnabled()) { | 983 if (FLAG_intrinsify && !isolate()->flags().type_checks()) { |
| 984 if (parsed_function().function().kind() == RawFunction::kImplicitGetter) { | 984 if (parsed_function().function().kind() == RawFunction::kImplicitGetter) { |
| 985 // An implicit getter must have a specific AST structure. | 985 // An implicit getter must have a specific AST structure. |
| 986 const SequenceNode& sequence_node = *parsed_function().node_sequence(); | 986 const SequenceNode& sequence_node = *parsed_function().node_sequence(); |
| 987 ASSERT(sequence_node.length() == 1); | 987 ASSERT(sequence_node.length() == 1); |
| 988 ASSERT(sequence_node.NodeAt(0)->IsReturnNode()); | 988 ASSERT(sequence_node.NodeAt(0)->IsReturnNode()); |
| 989 const ReturnNode& return_node = *sequence_node.NodeAt(0)->AsReturnNode(); | 989 const ReturnNode& return_node = *sequence_node.NodeAt(0)->AsReturnNode(); |
| 990 ASSERT(return_node.value()->IsLoadInstanceFieldNode()); | 990 ASSERT(return_node.value()->IsLoadInstanceFieldNode()); |
| 991 const LoadInstanceFieldNode& load_node = | 991 const LoadInstanceFieldNode& load_node = |
| 992 *return_node.value()->AsLoadInstanceFieldNode(); | 992 *return_node.value()->AsLoadInstanceFieldNode(); |
| 993 // Only intrinsify getter if the field cannot contain a mutable double. | 993 // Only intrinsify getter if the field cannot contain a mutable double. |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1737 | 1737 |
| 1738 | 1738 |
| 1739 void FlowGraphCompiler::FrameStateClear() { | 1739 void FlowGraphCompiler::FrameStateClear() { |
| 1740 ASSERT(!is_optimizing()); | 1740 ASSERT(!is_optimizing()); |
| 1741 frame_state_.TruncateTo(0); | 1741 frame_state_.TruncateTo(0); |
| 1742 } | 1742 } |
| 1743 #endif | 1743 #endif |
| 1744 | 1744 |
| 1745 | 1745 |
| 1746 } // namespace dart | 1746 } // namespace dart |
| OLD | NEW |