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
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 __
-#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 internal
} // namespace v8
// Populate the return address patcher entries.
for (int i = 0; i < patch_count; ++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->SetPatchedAddressPc(i, Smi::FromInt(entry.deoptimization()->pos()));
}
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
} // namespace compiler
void AddTranslationForOperand(Translation* translation, Instruction* instr,
InstructionOperand* op);
void AddNopForSmiCodeInlining();
-#if DEBUG
- static bool IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
- int end_pc);
-#endif // DEBUG
// ===========================================================================
class LazyDeoptimizationEntry V8_FINAL {
#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
#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 compiler
} // namespace v8
'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).
'test-serialize/DeserializeFromSecondSerialization': [PASS, FAIL],
'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [PASS, FAIL],