Commit f7dc76af authored by ulan@chromium.org's avatar ulan@chromium.org

A64: clean up pending reloc info if code generation was aborted.

This fixes assertion failure in destructor of Assembler.

BUG=352659
LOG=N
R=jochen@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 238f12e6
......@@ -743,6 +743,10 @@ class Assembler : public AssemblerBase {
virtual ~Assembler();
virtual void AbortedCodeGeneration() {
num_pending_reloc_info_ = 0;
}
// System functions ---------------------------------------------------------
// Start generating code from the beginning of the buffer, discarding any code
// and data that has already been emitted into the buffer.
......
......@@ -82,6 +82,10 @@ class AssemblerBase: public Malloced {
int pc_offset() const { return static_cast<int>(pc_ - buffer_); }
// This function is called when code generation is aborted, so that
// the assembler could clean up internal data structures.
virtual void AbortedCodeGeneration() { }
static const int kMinimalBufferSize = 4*KB;
protected:
......
......@@ -446,6 +446,7 @@ Handle<Code> LChunk::Codegen() {
CodeGenerator::PrintCode(code, info());
return code;
}
assembler.AbortedCodeGeneration();
return Handle<Code>::null();
}
......
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