Revision: 11049
Author:   [email protected]
Date:     Wed Mar 14 10:25:01 2012
Log:      Fix --use-strict flag in combination with --harmony[-scoping].

[email protected]
BUG=
TEST=

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

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

=======================================
--- /branches/bleeding_edge/src/compiler.cc     Wed Mar 14 02:45:17 2012
+++ /branches/bleeding_edge/src/compiler.cc     Wed Mar 14 10:25:01 2012
@@ -521,7 +521,9 @@
     info.MarkAsGlobal();
     info.SetExtension(extension);
     info.SetPreParseData(pre_data);
-    if (FLAG_use_strict) info.SetLanguageMode(STRICT_MODE);
+    if (FLAG_use_strict) {
+ info.SetLanguageMode(FLAG_harmony_scoping ? EXTENDED_MODE : STRICT_MODE);
+    }
     result = MakeFunctionInfo(&info);
     if (extension == NULL && !result.is_null()) {
       compilation_cache->PutScript(source, result);

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

Reply via email to