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

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

Issue 10875058: Require ResultCid specification in every computation, that way we can differentiate between computa… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | « no previous file | runtime/vm/intermediate_language.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/cha.h" 7 #include "vm/cha.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/hash_map.h" 9 #include "vm/hash_map.h"
10 #include "vm/il_printer.h" 10 #include "vm/il_printer.h"
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 if (current_iterator()->Current() == bind) { 915 if (current_iterator()->Current() == bind) {
916 // Current bind was not removed. 916 // Current bind was not removed.
917 // Cache propagated computation type. 917 // Cache propagated computation type.
918 AbstractType& computation_type = 918 AbstractType& computation_type =
919 AbstractType::Handle(bind->computation()->CompileType()); 919 AbstractType::Handle(bind->computation()->CompileType());
920 bool changed = bind->SetPropagatedType(computation_type); 920 bool changed = bind->SetPropagatedType(computation_type);
921 if (changed) { 921 if (changed) {
922 still_changing_ = true; 922 still_changing_ = true;
923 } 923 }
924 // Propagate class ids. 924 // Propagate class ids.
925 intptr_t cid = bind->computation()->ResultCid(); 925 const intptr_t cid = bind->computation()->ResultCid();
926 changed = bind->SetPropagatedCid(cid); 926 changed = bind->SetPropagatedCid(cid);
927 if (changed) { 927 if (changed) {
928 still_changing_ = true; 928 still_changing_ = true;
929 } 929 }
930 } 930 }
931 } 931 }
932 932
933 933
934 void FlowGraphTypePropagator::VisitPhi(PhiInstr* phi) { 934 void FlowGraphTypePropagator::VisitPhi(PhiInstr* phi) {
935 // We could set the propagated type of the phi to the least upper bound of its 935 // We could set the propagated type of the phi to the least upper bound of its
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 DirectChainedHashMap<BindInstr*> child_map(*map); // Copy map. 1063 DirectChainedHashMap<BindInstr*> child_map(*map); // Copy map.
1064 OptimizeRecursive(child, &child_map); 1064 OptimizeRecursive(child, &child_map);
1065 } else { 1065 } else {
1066 OptimizeRecursive(child, map); // Reuse map for the last child. 1066 OptimizeRecursive(child, map); // Reuse map for the last child.
1067 } 1067 }
1068 } 1068 }
1069 } 1069 }
1070 1070
1071 1071
1072 } // namespace dart 1072 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698