Reviewers: Mads Ager,

Description:
Make sure to call ForceEagerCompilation when eagerly parsing a function. This
solves a problem with eagerly compiled code getting flushed for extensions.


Please review this at http://codereview.chromium.org/2844011/show

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/flag-definitions.h
  M     src/parser.cc


Index: src/flag-definitions.h
===================================================================
--- src/flag-definitions.h      (revision 4897)
+++ src/flag-definitions.h      (working copy)
@@ -193,7 +193,7 @@
             "print more details following each garbage collection")
 DEFINE_bool(collect_maps, true,
             "garbage collect maps from which no objects can be reached")
-DEFINE_bool(flush_code, false,
+DEFINE_bool(flush_code, true,
             "flush code that we expect not to use again before full gc")

 // v8.cc
Index: src/parser.cc
===================================================================
--- src/parser.cc       (revision 4897)
+++ src/parser.cc       (working copy)
@@ -1275,6 +1275,11 @@
           0,
           source->length(),
           false));
+
+     // If this is eagerly parsed we set the force eager compilation flag.
+     if (mode() == PARSE_EAGERLY) {
+       top_scope_->ForceEagerCompilation();
+     }
     } else if (scanner().stack_overflow()) {
       Top::StackOverflow();
     }


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

Reply via email to