Commit b80e7684 authored by jarin@chromium.org's avatar jarin@chromium.org

Remove a brittle assertion from Turbofan lazy deoptimization handling.

As discussed in person with Benedikt, it is better to remove the assertion because it is too brittle. The assertion says that the continuation block should immediately follow the call. However, there are exceptions - such as nop or constant pool in-between being fine - that make the assertion brittle.

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1b17f59b
...@@ -832,16 +832,6 @@ void CodeGenerator::AddNopForSmiCodeInlining() { ...@@ -832,16 +832,6 @@ void CodeGenerator::AddNopForSmiCodeInlining() {
UNREACHABLE(); UNREACHABLE();
} }
#ifdef DEBUG
// Checks whether the code between start_pc and end_pc is a no-op.
bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
int end_pc) {
return false;
}
#endif // DEBUG
#undef __ #undef __
} }
} }
......
...@@ -832,23 +832,6 @@ void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); } ...@@ -832,23 +832,6 @@ void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); }
#undef __ #undef __
#if DEBUG
// Checks whether the code between start_pc and end_pc is a no-op.
bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
int end_pc) {
if (start_pc + 4 != end_pc) {
return false;
}
Address instr_address = code->instruction_start() + start_pc;
v8::internal::Instruction* instr =
reinterpret_cast<v8::internal::Instruction*>(instr_address);
return instr->IsMovz() && instr->Rd() == xzr.code() && instr->SixtyFourBits();
}
#endif // DEBUG
} // namespace compiler } // namespace compiler
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -225,9 +225,6 @@ void CodeGenerator::PopulateDeoptimizationData(Handle<Code> code_object) { ...@@ -225,9 +225,6 @@ void CodeGenerator::PopulateDeoptimizationData(Handle<Code> code_object) {
// Populate the return address patcher entries. // Populate the return address patcher entries.
for (int i = 0; i < patch_count; ++i) { for (int i = 0; i < patch_count; ++i) {
LazyDeoptimizationEntry entry = lazy_deoptimization_entries_[i]; LazyDeoptimizationEntry entry = lazy_deoptimization_entries_[i];
DCHECK(entry.position_after_call() == entry.continuation()->pos() ||
IsNopForSmiCodeInlining(code_object, entry.position_after_call(),
entry.continuation()->pos()));
data->SetReturnAddressPc(i, Smi::FromInt(entry.position_after_call())); data->SetReturnAddressPc(i, Smi::FromInt(entry.position_after_call()));
data->SetPatchedAddressPc(i, Smi::FromInt(entry.deoptimization()->pos())); data->SetPatchedAddressPc(i, Smi::FromInt(entry.deoptimization()->pos()));
} }
...@@ -365,15 +362,6 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source, ...@@ -365,15 +362,6 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source,
void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); } void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); }
#ifdef DEBUG
bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
int end_pc) {
UNIMPLEMENTED();
return false;
}
#endif
#endif // !V8_TURBOFAN_BACKEND #endif // !V8_TURBOFAN_BACKEND
} // namespace compiler } // namespace compiler
......
...@@ -88,10 +88,6 @@ class CodeGenerator V8_FINAL : public GapResolver::Assembler { ...@@ -88,10 +88,6 @@ class CodeGenerator V8_FINAL : public GapResolver::Assembler {
void AddTranslationForOperand(Translation* translation, Instruction* instr, void AddTranslationForOperand(Translation* translation, Instruction* instr,
InstructionOperand* op); InstructionOperand* op);
void AddNopForSmiCodeInlining(); void AddNopForSmiCodeInlining();
#if DEBUG
static bool IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
int end_pc);
#endif // DEBUG
// =========================================================================== // ===========================================================================
class LazyDeoptimizationEntry V8_FINAL { class LazyDeoptimizationEntry V8_FINAL {
......
...@@ -938,19 +938,6 @@ void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } ...@@ -938,19 +938,6 @@ void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); }
#undef __ #undef __
#ifdef DEBUG
// Checks whether the code between start_pc and end_pc is a no-op.
bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
int end_pc) {
if (start_pc + 1 != end_pc) {
return false;
}
return *(code->instruction_start() + start_pc) ==
v8::internal::Assembler::kNopByte;
}
#endif // DEBUG
} }
} }
} // namespace v8::internal::compiler } // namespace v8::internal::compiler
...@@ -982,20 +982,6 @@ void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } ...@@ -982,20 +982,6 @@ void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); }
#undef __ #undef __
#ifdef DEBUG
// Checks whether the code between start_pc and end_pc is a no-op.
bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
int end_pc) {
if (start_pc + 1 != end_pc) {
return false;
}
return *(code->instruction_start() + start_pc) ==
v8::internal::Assembler::kNopByte;
}
#endif
} // namespace internal } // namespace internal
} // namespace compiler } // namespace compiler
} // namespace v8 } // namespace v8
...@@ -179,11 +179,6 @@ ...@@ -179,11 +179,6 @@
'test-api/Bug618': [PASS], 'test-api/Bug618': [PASS],
# TODO(turbofan): Deoptimization support buggy with snapshot=off.
'test-run-deopt/*': [PASS, ['no_snap == True', NO_VARIANTS]],
'test-deoptimization/*': [PASS, ['no_snap == True', NO_VARIANTS]],
'test-scheduler/BuildScheduleTrivialLazyDeoptCall': [PASS, ['no_snap == True', NO_VARIANTS]],
# BUG(v8:3385). # BUG(v8:3385).
'test-serialize/DeserializeFromSecondSerialization': [PASS, FAIL], 'test-serialize/DeserializeFromSecondSerialization': [PASS, FAIL],
'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [PASS, FAIL], 'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [PASS, FAIL],
......
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