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
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.
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:
CodeGenerator::PrintCode(code, info());
return code;
}
+ assembler.AbortedCodeGeneration();
return Handle<Code>::null();
}