| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index fc92adfb5439ea723dd447612dfcaa1caa5520d5..e9fa3f634f564b8b6c8330779831e9a9c57d98c7 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -311,7 +311,6 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
|
| return true;
|
| }
|
|
|
| -
|
| static bool GenerateCode(CompilationInfo* info) {
|
| return info->IsCompilingForDebugging() || !V8::UseCrankshaft() ?
|
| FullCodeGenerator::MakeCode(info) :
|
| @@ -404,7 +403,7 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
|
| ScopeInfo::Create(info->scope()));
|
|
|
| ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position());
|
| - Compiler::SetFunctionInfo(result, lit, true, script);
|
| + Compiler::SetFunctionInfo(result, lit, info, true, script);
|
|
|
| if (script->name()->IsString()) {
|
| PROFILE(isolate, CodeCreateEvent(
|
| @@ -583,7 +582,6 @@ Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
|
| return result;
|
| }
|
|
|
| -
|
| bool Compiler::CompileLazy(CompilationInfo* info) {
|
| Isolate* isolate = info->isolate();
|
|
|
| @@ -662,6 +660,9 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
|
| // Check the function has compiled code.
|
| ASSERT(shared->is_compiled());
|
| shared->set_code_age(0);
|
| + shared->set_is_inlineable(lit->is_function_inlineable());
|
| + shared->set_is_primitive(lit->is_function_primitive());
|
| + shared->set_ast_node_count(lit->ast_node_count());
|
|
|
| if (info->AllowOptimize() && !shared->optimization_disabled()) {
|
| // If we're asked to always optimize, we compile the optimized
|
| @@ -703,7 +704,6 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
|
| !LiveEditFunctionTracker::IsActive(info.isolate());
|
|
|
| Handle<ScopeInfo> scope_info(ScopeInfo::Empty());
|
| -
|
| // Generate code
|
| if (FLAG_lazy && allow_lazy) {
|
| Handle<Code> code = info.isolate()->builtins()->LazyCompile();
|
| @@ -722,7 +722,7 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
|
| literal->materialized_literal_count(),
|
| info.code(),
|
| scope_info);
|
| - SetFunctionInfo(result, literal, false, script);
|
| + SetFunctionInfo(result, literal, &info, false, script);
|
| RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result);
|
| result->set_allows_lazy_compilation(allow_lazy);
|
|
|
| @@ -741,6 +741,7 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(FunctionLiteral* literal,
|
| // the first character is number 0 (not 1).
|
| void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
|
| FunctionLiteral* lit,
|
| + CompilationInfo* info,
|
| bool is_toplevel,
|
| Handle<Script> script) {
|
| function_info->set_length(lit->parameter_count());
|
| @@ -760,6 +761,9 @@ void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
|
| function_info->set_strict_mode_flag(lit->strict_mode_flag());
|
| function_info->set_uses_arguments(lit->scope()->arguments() != NULL);
|
| function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
|
| + function_info->set_is_inlineable(lit->is_function_inlineable());
|
| + function_info->set_is_primitive(lit->is_function_primitive());
|
| + function_info->set_ast_node_count(lit->ast_node_count());
|
| }
|
|
|
|
|
|
|