Revision: 11790
Author:   [email protected]
Date:     Wed Jun 13 02:10:16 2012
Log:      Adapt pre-parser heuristics for lazy compilation.

[email protected]

Review URL: https://chromiumcodereview.appspot.com/10540120
http://code.google.com/p/v8/source/detail?r=11790

Modified:
 /branches/bleeding_edge/src/parser.cc

=======================================
--- /branches/bleeding_edge/src/parser.cc       Mon Jun 11 05:42:31 2012
+++ /branches/bleeding_edge/src/parser.cc       Wed Jun 13 02:10:16 2012
@@ -4521,7 +4521,6 @@
     // The heuristics are:
// - It must not have been prohibited by the caller to Parse (some callers
     //   need a full AST).
-    // - The outer scope must be trivial (only global variables in scope).
// - The function mustn't be a function expression with an open parenthesis
     //   before; we consider that a hint that the function will be called
     //   immediately, and it would be a waste of time to make it lazily
@@ -4529,8 +4528,6 @@
// These are all things we can know at this point, without looking at the
     // function itself.
     bool is_lazily_compiled = (mode() == PARSE_LAZILY &&
- top_scope_->outer_scope()->is_global_scope() &&
-                               top_scope_->HasTrivialOuterContext() &&
                                !parenthesized_function_);
parenthesized_function_ = false; // The bit was set for this function only.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to