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

Unified Diff: runtime/vm/constant_propagator.cc

Issue 868913002: Add Zone-based handle allocation interface and reduce use of Isolate-based interfaces. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constant_propagator.cc
===================================================================
--- runtime/vm/constant_propagator.cc (revision 43075)
+++ runtime/vm/constant_propagator.cc (working copy)
@@ -19,8 +19,9 @@
DEFINE_FLAG(bool, trace_constant_propagation, false,
"Print constant propagation and useless code elimination.");
-// Quick access to the locally defined isolate() method.
+// Quick access to the current zone and isolate.
#define I (isolate())
+#define Z (graph_->zone())
ConstantPropagator::ConstantPropagator(
@@ -30,10 +31,10 @@
graph_(graph),
unknown_(Object::unknown_constant()),
non_constant_(Object::non_constant()),
- reachable_(new(graph->isolate()) BitVector(
- graph->isolate(), graph->preorder().length())),
- marked_phis_(new(graph->isolate()) BitVector(
- graph->isolate(), graph->max_virtual_register_number())),
+ reachable_(new(Z) BitVector(
+ Z, graph->preorder().length())),
+ marked_phis_(new(Z) BitVector(
+ Z, graph->max_virtual_register_number())),
block_worklist_(),
definition_worklist_(graph, 10) {}
@@ -1430,7 +1431,8 @@
// Canonicalize branches that have no side-effects and where true- and
// false-targets are the same.
bool changed = false;
- BitVector* empty_blocks = new(I) BitVector(I, graph_->preorder().length());
+ BitVector* empty_blocks = new(Z) BitVector(Z,
+ graph_->preorder().length());
for (BlockIterator b = graph_->postorder_iterator();
!b.Done();
b.Advance()) {
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698