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
This commit is contained in:
parent
d81af53131
commit
3fa964bf53
@ -114,11 +114,9 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
|
|||||||
Handle<Code> code =
|
Handle<Code> code =
|
||||||
isolate->factory()->NewCode(desc, flags, masm->CodeObject(),
|
isolate->factory()->NewCode(desc, flags, masm->CodeObject(),
|
||||||
false, is_crankshafted);
|
false, is_crankshafted);
|
||||||
if (!code.is_null()) {
|
isolate->counters()->total_compiled_code_size()->Increment(
|
||||||
isolate->counters()->total_compiled_code_size()->Increment(
|
code->instruction_size());
|
||||||
code->instruction_size());
|
code->set_prologue_offset(info->prologue_offset());
|
||||||
code->set_prologue_offset(info->prologue_offset());
|
|
||||||
}
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,21 +350,17 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
|
|||||||
code->set_back_edge_table_offset(table_offset);
|
code->set_back_edge_table_offset(table_offset);
|
||||||
code->set_back_edges_patched_for_osr(false);
|
code->set_back_edges_patched_for_osr(false);
|
||||||
CodeGenerator::PrintCode(code, info);
|
CodeGenerator::PrintCode(code, info);
|
||||||
info->SetCode(code); // May be an empty handle.
|
info->SetCode(code);
|
||||||
#ifdef ENABLE_GDB_JIT_INTERFACE
|
#ifdef ENABLE_GDB_JIT_INTERFACE
|
||||||
if (FLAG_gdbjit && !code.is_null()) {
|
if (FLAG_gdbjit) {
|
||||||
GDBJITLineInfo* lineinfo =
|
GDBJITLineInfo* lineinfo =
|
||||||
masm.positions_recorder()->DetachGDBJITLineInfo();
|
masm.positions_recorder()->DetachGDBJITLineInfo();
|
||||||
|
|
||||||
GDBJIT(RegisterDetailedLineInfo(*code, lineinfo));
|
GDBJIT(RegisterDetailedLineInfo(*code, lineinfo));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!code.is_null()) {
|
void* line_info = masm.positions_recorder()->DetachJITHandlerData();
|
||||||
void* line_info =
|
LOG_CODE_EVENT(isolate, CodeEndLinePosInfoRecordEvent(*code, line_info));
|
||||||
masm.positions_recorder()->DetachJITHandlerData();
|
return true;
|
||||||
LOG_CODE_EVENT(isolate, CodeEndLinePosInfoRecordEvent(*code, line_info));
|
|
||||||
}
|
|
||||||
return !code.is_null();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -461,12 +461,10 @@ Handle<Code> LChunk::Codegen() {
|
|||||||
CodeGenerator::MakeCodeEpilogue(&assembler, flags, info());
|
CodeGenerator::MakeCodeEpilogue(&assembler, flags, info());
|
||||||
generator.FinishCode(code);
|
generator.FinishCode(code);
|
||||||
code->set_is_crankshafted(true);
|
code->set_is_crankshafted(true);
|
||||||
if (!code.is_null()) {
|
void* jit_handler_data =
|
||||||
void* jit_handler_data =
|
assembler.positions_recorder()->DetachJITHandlerData();
|
||||||
assembler.positions_recorder()->DetachJITHandlerData();
|
LOG_CODE_EVENT(info()->isolate(),
|
||||||
LOG_CODE_EVENT(info()->isolate(),
|
CodeEndLinePosInfoRecordEvent(*code, jit_handler_data));
|
||||||
CodeEndLinePosInfoRecordEvent(*code, jit_handler_data));
|
|
||||||
}
|
|
||||||
|
|
||||||
CodeGenerator::PrintCode(code, info());
|
CodeGenerator::PrintCode(code, info());
|
||||||
return code;
|
return code;
|
||||||
|
Loading…
Reference in New Issue
Block a user