Reviewers: Michael Starzinger,
Description:
[turbofan] Allocate a small amount of slack space to graph builder
environments.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/709463003/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+5, -1 lines):
M src/compiler/graph-builder.cc
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) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.