Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index 9204a840c84fd6520dbd1b8792abdbc7addaa43d..e63ebdc09a6edee005d1e9fb902b44ea14d1dc42 100644 |
--- a/src/ast.cc |
+++ b/src/ast.cc |
@@ -749,117 +749,6 @@ bool CompareOperation::IsCritical() { |
} |
-static inline void MarkIfNotLive(Expression* expr, List<AstNode*>* stack) { |
- if (!expr->is_live()) { |
- expr->mark_as_live(); |
- stack->Add(expr); |
- } |
-} |
- |
- |
-// Overloaded functions for marking children of live code as live. |
-void VariableProxy::ProcessNonLiveChildren( |
- List<AstNode*>* stack, |
- ZoneList<Expression*>* body_definitions, |
- int variable_count) { |
- // A reference to a stack-allocated variable depends on all the |
- // definitions reaching it. |
- BitVector* defs = reaching_definitions(); |
- if (defs != NULL) { |
- ASSERT(var()->IsStackAllocated()); |
- // The first variable_count definitions are the initial parameter and |
- // local declarations. |
- for (int i = variable_count; i < defs->length(); i++) { |
- if (defs->Contains(i)) { |
- MarkIfNotLive(body_definitions->at(i - variable_count), stack); |
- } |
- } |
- } |
-} |
- |
- |
-void Literal::ProcessNonLiveChildren(List<AstNode*>* stack, |
- ZoneList<Expression*>* body_definitions, |
- int variable_count) { |
- // Leaf node, no children. |
-} |
- |
- |
-void Assignment::ProcessNonLiveChildren( |
- List<AstNode*>* stack, |
- ZoneList<Expression*>* body_definitions, |
- int variable_count) { |
- Property* prop = target()->AsProperty(); |
- VariableProxy* proxy = target()->AsVariableProxy(); |
- |
- if (prop != NULL) { |
- if (!prop->key()->IsPropertyName()) MarkIfNotLive(prop->key(), stack); |
- MarkIfNotLive(prop->obj(), stack); |
- } else if (proxy == NULL) { |
- // Must be a reference error. |
- ASSERT(!target()->IsValidLeftHandSide()); |
- MarkIfNotLive(target(), stack); |
- } else if (is_compound()) { |
- // A variable assignment so lhs is an operand to the operation. |
- MarkIfNotLive(target(), stack); |
- } |
- MarkIfNotLive(value(), stack); |
-} |
- |
- |
-void Property::ProcessNonLiveChildren(List<AstNode*>* stack, |
- ZoneList<Expression*>* body_definitions, |
- int variable_count) { |
- if (!key()->IsPropertyName()) MarkIfNotLive(key(), stack); |
- MarkIfNotLive(obj(), stack); |
-} |
- |
- |
-void Call::ProcessNonLiveChildren(List<AstNode*>* stack, |
- ZoneList<Expression*>* body_definitions, |
- int variable_count) { |
- ZoneList<Expression*>* args = arguments(); |
- for (int i = args->length() - 1; i >= 0; i--) { |
- MarkIfNotLive(args->at(i), stack); |
- } |
- MarkIfNotLive(expression(), stack); |
-} |
- |
- |
-void UnaryOperation::ProcessNonLiveChildren( |
- List<AstNode*>* stack, |
- ZoneList<Expression*>* body_definitions, |
- int variable_count) { |
- MarkIfNotLive(expression(), stack); |
-} |
- |
- |
-void CountOperation::ProcessNonLiveChildren( |
- List<AstNode*>* stack, |
- ZoneList<Expression*>* body_definitions, |
- int variable_count) { |
- MarkIfNotLive(expression(), stack); |
-} |
- |
- |
-void BinaryOperation::ProcessNonLiveChildren( |
- List<AstNode*>* stack, |
- ZoneList<Expression*>* body_definitions, |
- int variable_count) { |
- MarkIfNotLive(right(), stack); |
- MarkIfNotLive(left(), stack); |
-} |
- |
- |
-void CompareOperation::ProcessNonLiveChildren( |
- List<AstNode*>* stack, |
- ZoneList<Expression*>* body_definitions, |
- int variable_count) { |
- MarkIfNotLive(right(), stack); |
- MarkIfNotLive(left(), stack); |
-} |
- |
- |
// Implementation of a copy visitor. The visitor create a deep copy |
// of ast nodes. Nodes that do not require a deep copy are copied |
// with the default copy constructor. |