diff options
Diffstat (limited to 'deps/v8/src/compiler.cc')
-rwxr-xr-x | deps/v8/src/compiler.cc | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/deps/v8/src/compiler.cc b/deps/v8/src/compiler.cc index 77111a842..ae7b2b9f9 100755 --- a/deps/v8/src/compiler.cc +++ b/deps/v8/src/compiler.cc @@ -39,7 +39,6 @@ #include "hydrogen.h" #include "lithium.h" #include "liveedit.h" -#include "oprofile-agent.h" #include "parser.h" #include "rewriter.h" #include "runtime-profiler.h" @@ -289,6 +288,11 @@ static bool MakeCrankshaftCode(CompilationInfo* info) { HGraphBuilder builder(&oracle); HPhase phase(HPhase::kTotal); HGraph* graph = builder.CreateGraph(info); + if (Top::has_pending_exception()) { + info->SetCode(Handle<Code>::null()); + return false; + } + if (graph != NULL && FLAG_build_lithium) { Handle<Code> code = graph->Compile(); if (!code.is_null()) { @@ -419,9 +423,6 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) { : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), *info->code(), String::cast(script->name()))); - OPROFILE(CreateNativeCodeRegion(String::cast(script->name()), - info->code()->instruction_start(), - info->code()->instruction_size())); GDBJIT(AddCode(Handle<String>(String::cast(script->name())), script, info->code())); @@ -432,9 +433,6 @@ static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) { : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), *info->code(), "")); - OPROFILE(CreateNativeCodeRegion(info->is_eval() ? "Eval" : "Script", - info->code()->instruction_start(), - info->code()->instruction_size())); GDBJIT(AddCode(Handle<String>(), script, info->code())); } @@ -608,7 +606,9 @@ bool Compiler::CompileLazy(CompilationInfo* info) { // Compile the code. if (!MakeCode(info)) { - Top::StackOverflow(); + if (!Top::has_pending_exception()) { + Top::StackOverflow(); + } } else { ASSERT(!info->code().is_null()); Handle<Code> code = info->code(); @@ -783,7 +783,6 @@ void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag, // script name and line number. Check explicitly whether logging is // enabled as finding the line number is not free. if (Logger::is_logging() || - OProfileAgent::is_enabled() || CpuProfiler::is_profiling()) { Handle<Script> script = info->script(); Handle<Code> code = info->code(); @@ -795,18 +794,10 @@ void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag, *name, String::cast(script->name()), line_num)); - OPROFILE(CreateNativeCodeRegion(*name, - String::cast(script->name()), - line_num, - code->instruction_start(), - code->instruction_size())); } else { PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script), *code, *name)); - OPROFILE(CreateNativeCodeRegion(*name, - code->instruction_start(), - code->instruction_size())); } } |