Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 629155e78138f6efc2b7966396f780850f846d43..e94d520640f1b28ffb77cc3c7d13995dc9f38e8b 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -500,13 +500,6 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source, |
// for small sources, odds are that there aren't many functions |
// that would be compiled lazily anyway, so we skip the preparse step |
// in that case too. |
- int flags = kNoParsingFlags; |
- if ((natives == NATIVES_CODE) || FLAG_allow_natives_syntax) { |
- flags |= kAllowNativesSyntax; |
- } |
- if (natives != NATIVES_CODE && FLAG_harmony_scoping) { |
- flags |= EXTENDED_MODE; |
- } |
// Create a script object describing the script to be compiled. |
Handle<Script> script = FACTORY->NewScript(source); |
@@ -527,6 +520,7 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source, |
info.MarkAsGlobal(); |
info.SetExtension(extension); |
info.SetPreParseData(pre_data); |
+ if (FLAG_use_strict) info.SetLanguageMode(STRICT_MODE); |
result = MakeFunctionInfo(&info); |
if (extension == NULL && !result.is_null()) { |
compilation_cache->PutScript(source, result); |