| 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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 // An implicit getter must have a specific AST structure. | 1102 // An implicit getter must have a specific AST structure. |
| 1103 const SequenceNode& sequence_node = *parsed_function().node_sequence(); | 1103 const SequenceNode& sequence_node = *parsed_function().node_sequence(); |
| 1104 ASSERT(sequence_node.length() == 1); | 1104 ASSERT(sequence_node.length() == 1); |
| 1105 ASSERT(sequence_node.NodeAt(0)->IsReturnNode()); | 1105 ASSERT(sequence_node.NodeAt(0)->IsReturnNode()); |
| 1106 const ReturnNode& return_node = *sequence_node.NodeAt(0)->AsReturnNode(); | 1106 const ReturnNode& return_node = *sequence_node.NodeAt(0)->AsReturnNode(); |
| 1107 ASSERT(return_node.value()->IsLoadInstanceFieldNode()); | 1107 ASSERT(return_node.value()->IsLoadInstanceFieldNode()); |
| 1108 const LoadInstanceFieldNode& load_node = | 1108 const LoadInstanceFieldNode& load_node = |
| 1109 *return_node.value()->AsLoadInstanceFieldNode(); | 1109 *return_node.value()->AsLoadInstanceFieldNode(); |
| 1110 // Only intrinsify getter if the field cannot contain a mutable double. | 1110 // Only intrinsify getter if the field cannot contain a mutable double. |
| 1111 // Reading from a mutable double box requires allocating a fresh double. | 1111 // Reading from a mutable double box requires allocating a fresh double. |
| 1112 if (load_node.field().guarded_cid() == kDynamicCid) { | 1112 if (!IsPotentialUnboxedField(load_node.field())) { |
| 1113 GenerateInlinedGetter(load_node.field().Offset()); | 1113 GenerateInlinedGetter(load_node.field().Offset()); |
| 1114 return !FLAG_use_field_guards; | 1114 return !FLAG_use_field_guards; |
| 1115 } | 1115 } |
| 1116 return false; | 1116 return false; |
| 1117 } | 1117 } |
| 1118 if (parsed_function().function().kind() == RawFunction::kImplicitSetter) { | 1118 if (parsed_function().function().kind() == RawFunction::kImplicitSetter) { |
| 1119 // An implicit setter must have a specific AST structure. | 1119 // An implicit setter must have a specific AST structure. |
| 1120 // Sequence node has one store node and one return NULL node. | 1120 // Sequence node has one store node and one return NULL node. |
| 1121 const SequenceNode& sequence_node = *parsed_function().node_sequence(); | 1121 const SequenceNode& sequence_node = *parsed_function().node_sequence(); |
| 1122 ASSERT(sequence_node.length() == 2); | 1122 ASSERT(sequence_node.length() == 2); |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1934 | 1934 |
| 1935 | 1935 |
| 1936 void FlowGraphCompiler::FrameStateClear() { | 1936 void FlowGraphCompiler::FrameStateClear() { |
| 1937 ASSERT(!is_optimizing()); | 1937 ASSERT(!is_optimizing()); |
| 1938 frame_state_.TruncateTo(0); | 1938 frame_state_.TruncateTo(0); |
| 1939 } | 1939 } |
| 1940 #endif | 1940 #endif |
| 1941 | 1941 |
| 1942 | 1942 |
| 1943 } // namespace dart | 1943 } // namespace dart |
| OLD | NEW |