Starting to split up alloy/core.h.

This commit is contained in:
Ben Vanik
2014-07-14 19:18:42 -07:00
parent e9284dfaed
commit ce70978ef6
33 changed files with 146 additions and 89 deletions

View File

@@ -31,11 +31,9 @@ using alloy::runtime::Runtime;
using alloy::runtime::FunctionInfo;
PPCHIRBuilder::PPCHIRBuilder(PPCFrontend* frontend)
: HIRBuilder(), frontend_(frontend) {
comment_buffer_ = new StringBuffer(4096);
}
: HIRBuilder(), frontend_(frontend), comment_buffer_(4096) {}
PPCHIRBuilder::~PPCHIRBuilder() { delete comment_buffer_; }
PPCHIRBuilder::~PPCHIRBuilder() = default;
void PPCHIRBuilder::Reset() {
start_address_ = 0;
@@ -100,9 +98,9 @@ int PPCHIRBuilder::Emit(FunctionInfo* symbol_info, bool with_debug_info) {
if (label) {
AnnotateLabel(address, label);
}
comment_buffer_->Reset();
DisasmPPC(i, comment_buffer_);
Comment("%.8X %.8X %s", address, i.code, comment_buffer_->GetString());
comment_buffer_.Reset();
DisasmPPC(i, &comment_buffer_);
Comment("%.8X %.8X %s", address, i.code, comment_buffer_.GetString());
first_instr = last_instr();
}