Reviewers: ulan,
Description:
Fix --use-strict flag in combination with --harmony[-scoping].
[email protected]
BUG=
TEST=
Please review this at https://chromiumcodereview.appspot.com/9706025/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/compiler.cc
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index
39a199424b56b406accd3a1cce97a884a53333ca..39a3e042689c6fe28905c9f51f3653a20b134d8a
100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -521,7 +521,9 @@ Handle<SharedFunctionInfo>
Compiler::Compile(Handle<String> source,
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