| Index: src/x64/codegen-x64.cc
|
| diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc
|
| index 28cc205c106f7f5d61cebe2b2acc59bc3c112f72..204fedcd78b0ce013cdc47c2514b09f490b75858 100644
|
| --- a/src/x64/codegen-x64.cc
|
| +++ b/src/x64/codegen-x64.cc
|
| @@ -190,10 +190,8 @@ void CodeGenerator::Generate(CompilationInfo* info) {
|
| }
|
| #endif
|
|
|
| - // New scope to get automatic timing calculation.
|
| - { HistogramTimerScope codegen_timer(&Counters::code_generation);
|
| + {
|
| CodeGenState state(this);
|
| -
|
| // Entry:
|
| // Stack: receiver, arguments, return address.
|
| // rbp: caller's frame pointer
|
| @@ -367,7 +365,6 @@ void CodeGenerator::Generate(CompilationInfo* info) {
|
|
|
| // Process any deferred code using the register allocator.
|
| if (!HasStackOverflow()) {
|
| - HistogramTimerScope deferred_timer(&Counters::deferred_code_generation);
|
| JumpTarget::set_compiling_deferred_code(true);
|
| ProcessDeferred();
|
| JumpTarget::set_compiling_deferred_code(false);
|
| @@ -4276,9 +4273,12 @@ void CodeGenerator::VisitFunctionLiteral(FunctionLiteral* node) {
|
|
|
| // Build the function info and instantiate it.
|
| Handle<SharedFunctionInfo> function_info =
|
| - Compiler::BuildFunctionInfo(node, script(), this);
|
| + Compiler::BuildFunctionInfo(node, script());
|
| // Check for stack-overflow exception.
|
| - if (HasStackOverflow()) return;
|
| + if (function_info.is_null()) {
|
| + SetStackOverflow();
|
| + return;
|
| + }
|
| InstantiateFunction(function_info);
|
| }
|
|
|
|
|