[arm64][Liftoff] add AbortCompilation
When a liftoff function bails out after generating some constant pool, this avoids to trigger a check in the Assembler destructor. Bug: v8:6600 Change-Id: I79c595605bc0add1f3f5617ac7feedf162081d8a Reviewed-on: https://chromium-review.googlesource.com/1026647 Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Vincent Belliard <vincent.belliard@arm.com> Cr-Commit-Position: refs/heads/master@{#52815}
This commit is contained in:
parent
b8166b34fd
commit
076ff421e5
@ -1839,6 +1839,12 @@ wasm::WasmCode* LiftoffCompilationUnit::FinishCompilation(
|
||||
return code;
|
||||
}
|
||||
|
||||
void LiftoffCompilationUnit::AbortCompilation() {
|
||||
// The compilation is aborted. Put the assembler in a clean mode before
|
||||
// its deletion.
|
||||
asm_.FinishCode();
|
||||
}
|
||||
|
||||
#undef __
|
||||
#undef TRACE
|
||||
#undef WASM_INSTANCE_OBJECT_OFFSET
|
||||
|
@ -22,6 +22,7 @@ class LiftoffCompilationUnit final {
|
||||
|
||||
bool ExecuteCompilation();
|
||||
wasm::WasmCode* FinishCompilation(wasm::ErrorThrower*);
|
||||
void AbortCompilation();
|
||||
|
||||
private:
|
||||
WasmCompilationUnit* const wasm_unit_;
|
||||
|
@ -117,6 +117,7 @@ void WasmCompilationUnit::SwitchMode(CompilationMode new_mode) {
|
||||
return;
|
||||
case CompilationMode::kTurbofan:
|
||||
DCHECK(!turbofan_unit_);
|
||||
if (liftoff_unit_ != nullptr) liftoff_unit_->AbortCompilation();
|
||||
liftoff_unit_.reset();
|
||||
turbofan_unit_.reset(new compiler::TurbofanWasmCompilationUnit(this));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user