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

Unified Diff: src/compiler/graph-builder.cc

Issue 709463003: [turbofan] Allocate a small amount of slack space to graph builder environments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698