Reviewers: Mads Ager,

Description:
Don't generate preparse data if lazy-flag is false.

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

Affected files:
  M src/compiler.cc


Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index bf6d41d85402217ba4cadae2228a316788401f2d..6b4a7fbca560c015920ba377b34c0609616498dd 100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -271,7 +271,8 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
   if (result.is_null()) {
     // No cache entry found. Do pre-parsing and compile the script.
     ScriptDataImpl* pre_data = input_pre_data;
-    if (pre_data == NULL && source_length >= FLAG_min_preparse_length) {
+    if (pre_data == NULL && FLAG_lazy &&
+        source_length >= FLAG_min_preparse_length) {
       pre_data = PreParse(source, NULL, extension);
     }



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

Reply via email to