Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 1812103002: Fix fast intrinsics for getters and setters; previous strategy was too conservative. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: r Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698