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

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

Issue 1012333002: Keep zone cached in SnapshotReader to allow removing ZoneHandle(Isolate*) interface. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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/dart_api_impl.cc ('k') | runtime/vm/flow_graph_builder.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/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/il_printer.h" 9 #include "vm/il_printer.h"
10 #include "vm/intermediate_language.h" 10 #include "vm/intermediate_language.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ? &optimized_block_order_ 93 ? &optimized_block_order_
94 : &reverse_postorder_; 94 : &reverse_postorder_;
95 } 95 }
96 96
97 97
98 ConstantInstr* FlowGraph::GetConstant(const Object& object) { 98 ConstantInstr* FlowGraph::GetConstant(const Object& object) {
99 ConstantInstr* constant = constant_instr_pool_.Lookup(object); 99 ConstantInstr* constant = constant_instr_pool_.Lookup(object);
100 if (constant == NULL) { 100 if (constant == NULL) {
101 // Otherwise, allocate and add it to the pool. 101 // Otherwise, allocate and add it to the pool.
102 constant = new(zone()) ConstantInstr( 102 constant = new(zone()) ConstantInstr(
103 Object::ZoneHandle(isolate(), object.raw())); 103 Object::ZoneHandle(zone(), object.raw()));
104 constant->set_ssa_temp_index(alloc_ssa_temp_index()); 104 constant->set_ssa_temp_index(alloc_ssa_temp_index());
105 105
106 AddToInitialDefinitions(constant); 106 AddToInitialDefinitions(constant);
107 constant_instr_pool_.Insert(constant); 107 constant_instr_pool_.Insert(constant);
108 } 108 }
109 return constant; 109 return constant;
110 } 110 }
111 111
112 112
113 void FlowGraph::AddToInitialDefinitions(Definition* defn) { 113 void FlowGraph::AddToInitialDefinitions(Definition* defn) {
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 } 1388 }
1389 1389
1390 1390
1391 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from, 1391 bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from,
1392 BlockEntryInstr* to) const { 1392 BlockEntryInstr* to) const {
1393 return available_at_[to->postorder_number()]->Contains( 1393 return available_at_[to->postorder_number()]->Contains(
1394 from->postorder_number()); 1394 from->postorder_number());
1395 } 1395 }
1396 1396
1397 } // namespace dart 1397 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698