Running clang-format on alloy.

All except x64_sequences, which needs work.
This commit is contained in:
Ben Vanik
2014-07-10 20:20:00 -07:00
parent 0158380cfc
commit 7daa85179c
139 changed files with 6925 additions and 6998 deletions

View File

@@ -17,21 +17,19 @@
#include <alloy/hir/label.h>
#include <alloy/runtime/runtime.h>
using namespace alloy;
using namespace alloy::backend;
using namespace alloy::backend::ivm;
using namespace alloy::hir;
using namespace alloy::runtime;
namespace alloy {
namespace backend {
namespace ivm {
using alloy::hir::HIRBuilder;
using alloy::runtime::Function;
using alloy::runtime::FunctionInfo;
IVMAssembler::IVMAssembler(Backend* backend) :
source_map_arena_(128 * 1024),
Assembler(backend) {
}
IVMAssembler::IVMAssembler(Backend* backend)
: source_map_arena_(128 * 1024), Assembler(backend) {}
IVMAssembler::~IVMAssembler() {
alloy::tracing::WriteEvent(EventType::AssemblerDeinit({
}));
alloy::tracing::WriteEvent(EventType::AssemblerDeinit({}));
}
int IVMAssembler::Initialize() {
@@ -40,8 +38,7 @@ int IVMAssembler::Initialize() {
return result;
}
alloy::tracing::WriteEvent(EventType::AssemblerInit({
}));
alloy::tracing::WriteEvent(EventType::AssemblerInit({}));
return result;
}
@@ -53,10 +50,10 @@ void IVMAssembler::Reset() {
Assembler::Reset();
}
int IVMAssembler::Assemble(
FunctionInfo* symbol_info, HIRBuilder* builder,
uint32_t debug_info_flags, runtime::DebugInfo* debug_info,
Function** out_function) {
int IVMAssembler::Assemble(FunctionInfo* symbol_info, HIRBuilder* builder,
uint32_t debug_info_flags,
runtime::DebugInfo* debug_info,
Function** out_function) {
IVMFunction* fn = new IVMFunction(symbol_info);
fn->set_debug_info(debug_info);
@@ -89,13 +86,13 @@ int IVMAssembler::Assemble(
auto block = builder->first_block();
while (block) {
Label* label = block->label_head;
auto label = block->label_head;
while (label) {
label->tag = (void*)(0x80000000 | ctx.intcode_count);
label = label->next;
}
Instr* i = block->instr_head;
auto i = block->instr_head;
while (i) {
int result = TranslateIntCodes(ctx, i);
i = i->next;
@@ -108,7 +105,8 @@ int IVMAssembler::Assemble(
// Fixup label references.
LabelRef* label_ref = ctx.label_ref_head;
while (label_ref) {
label_ref->instr->src1_reg = (uint32_t)(intptr_t)label_ref->label->tag & ~0x80000000;
label_ref->instr->src1_reg =
(uint32_t)(intptr_t)label_ref->label->tag & ~0x80000000;
label_ref = label_ref->next;
}
@@ -117,3 +115,7 @@ int IVMAssembler::Assemble(
*out_function = fn;
return 0;
}
} // namespace ivm
} // namespace backend
} // namespace alloy