Commit 75d972a6 authored by Tom Tan's avatar Tom Tan Committed by Commit Bot

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/1493293Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59955}
parent b0bcd45d
...@@ -549,6 +549,7 @@ Assembler::~Assembler() { ...@@ -549,6 +549,7 @@ Assembler::~Assembler() {
DCHECK_EQ(veneer_pool_blocked_nesting_, 0); DCHECK_EQ(veneer_pool_blocked_nesting_, 0);
} }
void Assembler::AbortedCodeGeneration() { constpool_.Clear(); }
void Assembler::Reset() { void Assembler::Reset() {
#ifdef DEBUG #ifdef DEBUG
......
...@@ -262,9 +262,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { ...@@ -262,9 +262,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
virtual ~Assembler(); virtual ~Assembler();
virtual void AbortedCodeGeneration() { virtual void AbortedCodeGeneration();
constpool_.Clear();
}
// System functions --------------------------------------------------------- // System functions ---------------------------------------------------------
// Start generating code from the beginning of the buffer, discarding any code // Start generating code from the beginning of the buffer, discarding any code
......
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