Chromium Code Reviews| Index: src/ast.h |
| diff --git a/src/ast.h b/src/ast.h |
| index d8bc18e27829907ad37de2c6a50f94e17d547920..a151fcbe5afcd588fa59cc01f50ed48b2727f0ba 100644 |
| --- a/src/ast.h |
| +++ b/src/ast.h |
| @@ -134,6 +134,11 @@ class AstNode: public ZoneObject { |
| #undef DECLARE_TYPE_ENUM |
| static const int kNoNumber = -1; |
| + // The root of every AST, a FunctionLiteral node, has id kRootAstId when |
|
Kevin Millikin (Chromium)
2011/04/07 13:42:51
This comment is unnecessary and I think it confuse
|
| + // used as the root of its AST. |
| + // The same FunctionLiteral AstNode has a different, real, AST id where |
| + // it appears in the AST of the outer function containing it. |
| + static const int kRootAstId = 2; // Using 0 could make disguise errors. |
| AstNode() : id_(GetNextId()) { |
| Isolate* isolate = Isolate::Current(); |
| @@ -1731,8 +1736,7 @@ class FunctionLiteral: public Expression { |
| int num_parameters, |
| int start_position, |
| int end_position, |
| - bool is_expression, |
| - bool contains_loops) |
| + bool is_expression) |
| : name_(name), |
| scope_(scope), |
| body_(body), |
| @@ -1745,7 +1749,6 @@ class FunctionLiteral: public Expression { |
| start_position_(start_position), |
| end_position_(end_position), |
| is_expression_(is_expression), |
| - contains_loops_(contains_loops), |
| function_token_position_(RelocInfo::kNoPosition), |
| inferred_name_(HEAP->empty_string()), |
| pretenure_(false) { } |
| @@ -1760,7 +1763,6 @@ class FunctionLiteral: public Expression { |
| int start_position() const { return start_position_; } |
| int end_position() const { return end_position_; } |
| bool is_expression() const { return is_expression_; } |
| - bool contains_loops() const { return contains_loops_; } |
| bool strict_mode() const; |
| int materialized_literal_count() { return materialized_literal_count_; } |
| @@ -1800,7 +1802,6 @@ class FunctionLiteral: public Expression { |
| int start_position_; |
| int end_position_; |
| bool is_expression_; |
| - bool contains_loops_; |
| bool strict_mode_; |
| int function_token_position_; |
| Handle<String> inferred_name_; |