| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 5c18c3e53ebc8d6d3eb2dfc0e36301481621d20d..a754fa06e5494b7ffa895c17ec498a9628151c5d 100755
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -548,7 +548,8 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
|
|
|
| Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
|
| Handle<Context> context,
|
| - bool is_global) {
|
| + bool is_global,
|
| + bool is_strict) {
|
| int source_length = source->length();
|
| Counters::total_eval_size.Increment(source_length);
|
| Counters::total_compile_size.Increment(source_length);
|
| @@ -559,7 +560,7 @@ Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
|
| // Do a lookup in the compilation cache; if the entry is not there, invoke
|
| // the compiler and add the result to the cache.
|
| Handle<SharedFunctionInfo> result;
|
| - result = CompilationCache::LookupEval(source, context, is_global);
|
| + result = CompilationCache::LookupEval(source, context, is_global, is_strict);
|
|
|
| if (result.is_null()) {
|
| // Create a script object describing the script to be compiled.
|
| @@ -567,9 +568,11 @@ Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
|
| CompilationInfo info(script);
|
| info.MarkAsEval();
|
| if (is_global) info.MarkAsGlobal();
|
| + if (is_strict) info.MarkAsStrict();
|
| info.SetCallingContext(context);
|
| result = MakeFunctionInfo(&info);
|
| if (!result.is_null()) {
|
| + ASSERT(is_strict == result->strict_mode());
|
| CompilationCache::PutEval(source, context, is_global, result);
|
| }
|
| }
|
| @@ -762,6 +765,7 @@ void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
|
| *lit->this_property_assignments());
|
| function_info->set_try_full_codegen(lit->try_full_codegen());
|
| function_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation());
|
| + function_info->set_strict_mode(lit->strict_mode());
|
| }
|
|
|
|
|
|
|