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

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

Issue 1289643005: Rename accessors of class Field to make it more apparent as to what is being accessed - static fiel… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-code-review Created 5 years, 3 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
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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 const SequenceNode& sequence_node = *parsed_function().node_sequence(); 1027 const SequenceNode& sequence_node = *parsed_function().node_sequence();
1028 ASSERT(sequence_node.length() == 1); 1028 ASSERT(sequence_node.length() == 1);
1029 ASSERT(sequence_node.NodeAt(0)->IsReturnNode()); 1029 ASSERT(sequence_node.NodeAt(0)->IsReturnNode());
1030 const ReturnNode& return_node = *sequence_node.NodeAt(0)->AsReturnNode(); 1030 const ReturnNode& return_node = *sequence_node.NodeAt(0)->AsReturnNode();
1031 ASSERT(return_node.value()->IsLoadInstanceFieldNode()); 1031 ASSERT(return_node.value()->IsLoadInstanceFieldNode());
1032 const LoadInstanceFieldNode& load_node = 1032 const LoadInstanceFieldNode& load_node =
1033 *return_node.value()->AsLoadInstanceFieldNode(); 1033 *return_node.value()->AsLoadInstanceFieldNode();
1034 // Only intrinsify getter if the field cannot contain a mutable double. 1034 // Only intrinsify getter if the field cannot contain a mutable double.
1035 // Reading from a mutable double box requires allocating a fresh double. 1035 // Reading from a mutable double box requires allocating a fresh double.
1036 if (load_node.field().guarded_cid() == kDynamicCid) { 1036 if (load_node.field().guarded_cid() == kDynamicCid) {
1037 GenerateInlinedGetter(load_node.field().Offset()); 1037 GenerateInlinedGetter(load_node.field().InstanceFieldOffset());
1038 } 1038 }
1039 return; 1039 return;
1040 } 1040 }
1041 if (parsed_function().function().kind() == RawFunction::kImplicitSetter) { 1041 if (parsed_function().function().kind() == RawFunction::kImplicitSetter) {
1042 // An implicit setter must have a specific AST structure. 1042 // An implicit setter must have a specific AST structure.
1043 // Sequence node has one store node and one return NULL node. 1043 // Sequence node has one store node and one return NULL node.
1044 const SequenceNode& sequence_node = *parsed_function().node_sequence(); 1044 const SequenceNode& sequence_node = *parsed_function().node_sequence();
1045 ASSERT(sequence_node.length() == 2); 1045 ASSERT(sequence_node.length() == 2);
1046 ASSERT(sequence_node.NodeAt(0)->IsStoreInstanceFieldNode()); 1046 ASSERT(sequence_node.NodeAt(0)->IsStoreInstanceFieldNode());
1047 ASSERT(sequence_node.NodeAt(1)->IsReturnNode()); 1047 ASSERT(sequence_node.NodeAt(1)->IsReturnNode());
1048 const StoreInstanceFieldNode& store_node = 1048 const StoreInstanceFieldNode& store_node =
1049 *sequence_node.NodeAt(0)->AsStoreInstanceFieldNode(); 1049 *sequence_node.NodeAt(0)->AsStoreInstanceFieldNode();
1050 if (store_node.field().guarded_cid() == kDynamicCid) { 1050 if (store_node.field().guarded_cid() == kDynamicCid) {
1051 GenerateInlinedSetter(store_node.field().Offset()); 1051 GenerateInlinedSetter(store_node.field().InstanceFieldOffset());
1052 return; 1052 return;
1053 } 1053 }
1054 } 1054 }
1055 } 1055 }
1056 1056
1057 EnterIntrinsicMode(); 1057 EnterIntrinsicMode();
1058 1058
1059 Intrinsifier::Intrinsify(parsed_function(), this); 1059 Intrinsifier::Intrinsify(parsed_function(), this);
1060 1060
1061 ExitIntrinsicMode(); 1061 ExitIntrinsicMode();
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 1827
1828 1828
1829 void FlowGraphCompiler::FrameStateClear() { 1829 void FlowGraphCompiler::FrameStateClear() {
1830 ASSERT(!is_optimizing()); 1830 ASSERT(!is_optimizing());
1831 frame_state_.TruncateTo(0); 1831 frame_state_.TruncateTo(0);
1832 } 1832 }
1833 #endif 1833 #endif
1834 1834
1835 1835
1836 } // namespace dart 1836 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698