Index: src/ast.h |
diff --git a/src/ast.h b/src/ast.h |
index 39756678dc807fb8a8bdd4bd378aebcf1132f7d7..32d87bd732d07c33318a7c8631a8487bdf9e7ea5 100644 |
--- a/src/ast.h |
+++ b/src/ast.h |
@@ -2091,9 +2091,17 @@ class FunctionLiteral: public Expression { |
bool is_function() { return IsFunction::decode(bitfield_) == kIsFunction; } |
+ // This is used as a heuristic on when to eagerly compile a function |
+ // literal. We consider the following constructs as hints that the |
+ // function will be called immediately: |
+ // - (function() { ... })(); |
+ // - var x = function() { ... }(); |
bool is_parenthesized() { |
return IsParenthesized::decode(bitfield_) == kIsParenthesized; |
} |
+ void set_parenthesized() { |
+ bitfield_ = IsParenthesized::update(bitfield_, kIsParenthesized); |
+ } |
int ast_node_count() { return ast_properties_.node_count(); } |
AstProperties::Flags* flags() { return ast_properties_.flags(); } |