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

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

Issue 26345002: Last cleanup int -> intptr_t. Also removed a hack. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/bitmap.cc ('k') | runtime/vm/code_descriptors.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) 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/block_scheduler.h" 5 #include "vm/block_scheduler.h"
6 6
7 #include "vm/allocation.h" 7 #include "vm/allocation.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 explicit Chain(BlockEntryInstr* block) 101 explicit Chain(BlockEntryInstr* block)
102 : first(new Link(block, NULL)), last(first), length(1) { } 102 : first(new Link(block, NULL)), last(first), length(1) { }
103 103
104 Link* first; 104 Link* first;
105 Link* last; 105 Link* last;
106 intptr_t length; 106 intptr_t length;
107 }; 107 };
108 108
109 109
110 int Edge::LowestWeightFirst(const Edge* a, const Edge* b) { 110 int Edge::LowestWeightFirst(const Edge* a, const Edge* b) {
111 return (a->weight < b->weight) ? -1 : (a->weight > b->weight); 111 if (a->weight < b->weight) {
112 return -1;
113 }
114 return (a->weight > b->weight) ? 1 : 0;
112 } 115 }
113 116
114 117
115 // Combine two chains by adding the shorter chain's links to the longer 118 // Combine two chains by adding the shorter chain's links to the longer
116 // chain. 119 // chain.
117 static void Union(GrowableArray<Chain*>* chains, 120 static void Union(GrowableArray<Chain*>* chains,
118 Chain* source_chain, 121 Chain* source_chain,
119 Chain* target_chain) { 122 Chain* target_chain) {
120 if (source_chain->length < target_chain->length) { 123 if (source_chain->length < target_chain->length) {
121 for (Link* link = source_chain->first; link != NULL; link = link->next) { 124 for (Link* link = source_chain->first; link != NULL; link = link->next) {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 for (intptr_t i = block_count - 1; i >= 0; --i) { 196 for (intptr_t i = block_count - 1; i >= 0; --i) {
194 if (chains[i]->first->block == flow_graph()->postorder()[i]) { 197 if (chains[i]->first->block == flow_graph()->postorder()[i]) {
195 for (Link* link = chains[i]->first; link != NULL; link = link->next) { 198 for (Link* link = chains[i]->first; link != NULL; link = link->next) {
196 flow_graph()->CodegenBlockOrder(true)->Add(link->block); 199 flow_graph()->CodegenBlockOrder(true)->Add(link->block);
197 } 200 }
198 } 201 }
199 } 202 }
200 } 203 }
201 204
202 } // namespace dart 205 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bitmap.cc ('k') | runtime/vm/code_descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698