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

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

Issue 12529008: Collect type feedback for fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Ivan's comments Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | 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/cha.h" 9 #include "vm/cha.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 } 553 }
554 if (parsed_function().function().kind() == RawFunction::kImplicitSetter) { 554 if (parsed_function().function().kind() == RawFunction::kImplicitSetter) {
555 // An implicit setter must have a specific AST structure. 555 // An implicit setter must have a specific AST structure.
556 // Sequence node has one store node and one return NULL node. 556 // Sequence node has one store node and one return NULL node.
557 const SequenceNode& sequence_node = *parsed_function().node_sequence(); 557 const SequenceNode& sequence_node = *parsed_function().node_sequence();
558 ASSERT(sequence_node.length() == 2); 558 ASSERT(sequence_node.length() == 2);
559 ASSERT(sequence_node.NodeAt(0)->IsStoreInstanceFieldNode()); 559 ASSERT(sequence_node.NodeAt(0)->IsStoreInstanceFieldNode());
560 ASSERT(sequence_node.NodeAt(1)->IsReturnNode()); 560 ASSERT(sequence_node.NodeAt(1)->IsReturnNode());
561 const StoreInstanceFieldNode& store_node = 561 const StoreInstanceFieldNode& store_node =
562 *sequence_node.NodeAt(0)->AsStoreInstanceFieldNode(); 562 *sequence_node.NodeAt(0)->AsStoreInstanceFieldNode();
563 GenerateInlinedSetter(store_node.field().Offset()); 563 if (store_node.field().guarded_cid() == kDynamicCid) {
564 return true; 564 GenerateInlinedSetter(store_node.field().Offset());
565 return true;
566 }
565 } 567 }
566 } 568 }
567 // Even if an intrinsified version of the function was successfully 569 // Even if an intrinsified version of the function was successfully
568 // generated, it may fall through to the non-intrinsified method body. 570 // generated, it may fall through to the non-intrinsified method body.
569 return Intrinsifier::Intrinsify(parsed_function().function(), assembler()); 571 return Intrinsifier::Intrinsify(parsed_function().function(), assembler());
570 } 572 }
571 573
572 574
573 void FlowGraphCompiler::GenerateInstanceCall( 575 void FlowGraphCompiler::GenerateInstanceCall(
574 intptr_t deopt_id, 576 intptr_t deopt_id,
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 if (i != largest_ix) { 1067 if (i != largest_ix) {
1066 // Swap. 1068 // Swap.
1067 CidTarget temp = (*sorted)[i]; 1069 CidTarget temp = (*sorted)[i];
1068 (*sorted)[i] = (*sorted)[largest_ix]; 1070 (*sorted)[i] = (*sorted)[largest_ix];
1069 (*sorted)[largest_ix] = temp; 1071 (*sorted)[largest_ix] = temp;
1070 } 1072 }
1071 } 1073 }
1072 } 1074 }
1073 1075
1074 } // namespace dart 1076 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698