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

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

Issue 2083103002: Remove some uses of STL map. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « runtime/vm/assembler.cc ('k') | runtime/vm/flow_graph_range_analysis.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) 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.h" 5 #include "vm/flow_graph.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 GrowableArray<BlockEntryInstr*>* FlowGraph::CodegenBlockOrder( 114 GrowableArray<BlockEntryInstr*>* FlowGraph::CodegenBlockOrder(
115 bool is_optimized) { 115 bool is_optimized) {
116 return ShouldReorderBlocks(function(), is_optimized) 116 return ShouldReorderBlocks(function(), is_optimized)
117 ? &optimized_block_order_ 117 ? &optimized_block_order_
118 : &reverse_postorder_; 118 : &reverse_postorder_;
119 } 119 }
120 120
121 121
122 ConstantInstr* FlowGraph::GetConstant(const Object& object) { 122 ConstantInstr* FlowGraph::GetConstant(const Object& object) {
123 ConstantInstr* constant = constant_instr_pool_.Lookup(object); 123 ConstantInstr* constant = constant_instr_pool_.LookupValue(object);
124 if (constant == NULL) { 124 if (constant == NULL) {
125 // Otherwise, allocate and add it to the pool. 125 // Otherwise, allocate and add it to the pool.
126 constant = new(zone()) ConstantInstr( 126 constant = new(zone()) ConstantInstr(
127 Object::ZoneHandle(zone(), object.raw())); 127 Object::ZoneHandle(zone(), object.raw()));
128 constant->set_ssa_temp_index(alloc_ssa_temp_index()); 128 constant->set_ssa_temp_index(alloc_ssa_temp_index());
129 129
130 AddToInitialDefinitions(constant); 130 AddToInitialDefinitions(constant);
131 constant_instr_pool_.Insert(constant); 131 constant_instr_pool_.Insert(constant);
132 } 132 }
133 return constant; 133 return constant;
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after
2048 ReplaceCurrentInstruction(&it, current, replacement); 2048 ReplaceCurrentInstruction(&it, current, replacement);
2049 changed = true; 2049 changed = true;
2050 } 2050 }
2051 } 2051 }
2052 } 2052 }
2053 return changed; 2053 return changed;
2054 } 2054 }
2055 2055
2056 2056
2057 } // namespace dart 2057 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler.cc ('k') | runtime/vm/flow_graph_range_analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698