Move Assembler::AbortedCodeGeneration() from .h to .cc for arm64

Assembler::AbortedCodeGeneration() is defined in assembler-arm64.h, but it calls
into Constant::Clear() which is defined in assembler-arm64.cc. This introduces
dependency to v8_base component when including assembler-arm64.h which is not
always possible like for V8 unittests target. To fix this, we could define both
in the same file, like Assembler::IsConstPoolEmpty() calls Constant::Clear() and
both are defined in assembler-arm64.h, so it works fine.

Bug: chromium:893460
Change-Id: I895cf0147950fca20142ea5ed18bcd020c1ab866
Reviewed-on: https://chromium-review.googlesource.com/c/1493293
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59955}
This commit is contained in:
Tom Tan 2019-02-27 17:34:54 -08:00 committed by Commit Bot
parent b0bcd45d83
commit 75d972a6fd
2 changed files with 2 additions and 3 deletions

View File

@ -549,6 +549,7 @@ Assembler::~Assembler() {
DCHECK_EQ(veneer_pool_blocked_nesting_, 0);
}
void Assembler::AbortedCodeGeneration() { constpool_.Clear(); }
void Assembler::Reset() {
#ifdef DEBUG

View File

@ -262,9 +262,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
virtual ~Assembler();
virtual void AbortedCodeGeneration() {
constpool_.Clear();
}
virtual void AbortedCodeGeneration();
// System functions ---------------------------------------------------------
// Start generating code from the beginning of the buffer, discarding any code