Index: src/compiler/graph-builder.cc |
diff --git a/src/compiler/graph-builder.cc b/src/compiler/graph-builder.cc |
index 2ca068835ff598c32bf251259228e04062d49961..65ce345023a64851f98f9d8998ecdcb4ecee4772 100644 |
--- a/src/compiler/graph-builder.cc |
+++ b/src/compiler/graph-builder.cc |
@@ -125,7 +125,11 @@ StructuredGraphBuilder::Environment::Environment(const Environment& copy) |
: builder_(copy.builder()), |
control_dependency_(copy.control_dependency_), |
effect_dependency_(copy.effect_dependency_), |
- values_(copy.values_) {} |
+ values_(copy.zone()) { |
+ const size_t kStackEstimate = 7; // optimum from experimentation! |
+ values_.reserve(copy.values_.size() + kStackEstimate); |
+ values_.insert(values_.begin(), copy.values_.begin(), copy.values_.end()); |
+} |
void StructuredGraphBuilder::Environment::Merge(Environment* other) { |