Revision: 22766
Author: [email protected]
Date: Thu Jul 31 15:19:41 2014 UTC
Log: Ensure environment does not contain nil values.
[email protected]
Review URL: https://codereview.chromium.org/436553003
http://code.google.com/p/v8/source/detail?r=22766
Modified:
/branches/bleeding_edge/src/compiler/ast-graph-builder.cc
/branches/bleeding_edge/src/compiler/graph-builder.cc
=======================================
--- /branches/bleeding_edge/src/compiler/ast-graph-builder.cc Wed Jul 30
13:54:45 2014 UTC
+++ /branches/bleeding_edge/src/compiler/ast-graph-builder.cc Thu Jul 31
15:19:41 2014 UTC
@@ -177,18 +177,14 @@
ASSERT_EQ(scope->num_parameters() + 1, parameters_count());
// Bind the receiver variable.
- values()->insert(values()->end(), parameters_count(),
- static_cast<Node*>(NULL));
Node* receiver = builder->graph()->NewNode(common()->Parameter(0));
- Bind(scope->receiver(), receiver);
+ values()->push_back(receiver);
// Bind all parameter variables. The parameter indices are shifted by 1
// (receiver is parameter index -1 but environment index 0).
for (int i = 0; i < scope->num_parameters(); ++i) {
- // Unused parameters are allocated to Variable::UNALLOCATED.
- if (!scope->parameter(i)->IsParameter()) continue;
Node* parameter = builder->graph()->NewNode(common()->Parameter(i +
1));
- Bind(scope->parameter(i), parameter);
+ values()->push_back(parameter);
}
// Bind all local variables to undefined.
=======================================
--- /branches/bleeding_edge/src/compiler/graph-builder.cc Wed Jul 30
13:54:45 2014 UTC
+++ /branches/bleeding_edge/src/compiler/graph-builder.cc Thu Jul 31
15:19:41 2014 UTC
@@ -145,7 +145,6 @@
// Introduce Phi nodes for values that have differing input at merge
points,
// potentially extending an existing Phi node if possible.
for (int i = 0; i < static_cast<int>(values_.size()); ++i) {
- if (values_[i] == NULL) continue;
values_[i] = builder_->MergeValue(values_[i], other->values_[i],
control);
}
}
@@ -154,7 +153,6 @@
void StructuredGraphBuilder::Environment::PrepareForLoop() {
Node* control = GetControlDependency();
for (int i = 0; i < static_cast<int>(values()->size()); ++i) {
- if (values()->at(i) == NULL) continue;
Node* phi = builder_->NewPhi(1, values()->at(i), control);
values()->at(i) = phi;
}
--
--
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.