Remove check for empty handle for CodeGenerator::MakeCodeEpilogue.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/22840002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d81af531
......@@ -114,11 +114,9 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
Handle<Code> code =
isolate->factory()->NewCode(desc, flags, masm->CodeObject(),
false, is_crankshafted);
if (!code.is_null()) {
isolate->counters()->total_compiled_code_size()->Increment(
code->instruction_size());
code->set_prologue_offset(info->prologue_offset());
}
return code;
}
......
......@@ -350,21 +350,17 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
code->set_back_edge_table_offset(table_offset);
code->set_back_edges_patched_for_osr(false);
CodeGenerator::PrintCode(code, info);
info->SetCode(code); // May be an empty handle.
info->SetCode(code);
#ifdef ENABLE_GDB_JIT_INTERFACE
if (FLAG_gdbjit && !code.is_null()) {
if (FLAG_gdbjit) {
GDBJITLineInfo* lineinfo =
masm.positions_recorder()->DetachGDBJITLineInfo();
GDBJIT(RegisterDetailedLineInfo(*code, lineinfo));
}
#endif
if (!code.is_null()) {
void* line_info =
masm.positions_recorder()->DetachJITHandlerData();
void* line_info = masm.positions_recorder()->DetachJITHandlerData();
LOG_CODE_EVENT(isolate, CodeEndLinePosInfoRecordEvent(*code, line_info));
}
return !code.is_null();
return true;
}
......
......@@ -461,12 +461,10 @@ Handle<Code> LChunk::Codegen() {
CodeGenerator::MakeCodeEpilogue(&assembler, flags, info());
generator.FinishCode(code);
code->set_is_crankshafted(true);
if (!code.is_null()) {
void* jit_handler_data =
assembler.positions_recorder()->DetachJITHandlerData();
LOG_CODE_EVENT(info()->isolate(),
CodeEndLinePosInfoRecordEvent(*code, jit_handler_data));
}
CodeGenerator::PrintCode(code, info());
return code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment