LIR skeleton, renaming some types to prevent conflict.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace alloy {
|
||||
namespace hir {
|
||||
class FunctionBuilder;
|
||||
class HIRBuilder;
|
||||
}
|
||||
namespace runtime {
|
||||
class DebugInfo;
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
virtual void Reset();
|
||||
|
||||
virtual int Assemble(
|
||||
runtime::FunctionInfo* symbol_info, hir::FunctionBuilder* builder,
|
||||
runtime::FunctionInfo* symbol_info, hir::HIRBuilder* builder,
|
||||
runtime::DebugInfo* debug_info, runtime::Function** out_function) = 0;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <alloy/backend/tracing.h>
|
||||
#include <alloy/backend/ivm/ivm_intcode.h>
|
||||
#include <alloy/backend/ivm/ivm_function.h>
|
||||
#include <alloy/hir/function_builder.h>
|
||||
#include <alloy/hir/hir_builder.h>
|
||||
#include <alloy/hir/label.h>
|
||||
#include <alloy/runtime/runtime.h>
|
||||
|
||||
@@ -54,7 +54,7 @@ void IVMAssembler::Reset() {
|
||||
}
|
||||
|
||||
int IVMAssembler::Assemble(
|
||||
FunctionInfo* symbol_info, FunctionBuilder* builder,
|
||||
FunctionInfo* symbol_info, HIRBuilder* builder,
|
||||
DebugInfo* debug_info, Function** out_function) {
|
||||
IVMFunction* fn = new IVMFunction(symbol_info);
|
||||
fn->set_debug_info(debug_info);
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
virtual void Reset();
|
||||
|
||||
virtual int Assemble(
|
||||
runtime::FunctionInfo* symbol_info, hir::FunctionBuilder* builder,
|
||||
runtime::FunctionInfo* symbol_info, hir::HIRBuilder* builder,
|
||||
runtime::DebugInfo* debug_info, runtime::Function** out_function);
|
||||
|
||||
private:
|
||||
|
||||
@@ -31,14 +31,15 @@ namespace backend {
|
||||
namespace ivm {
|
||||
|
||||
|
||||
//#define DPRINT printf
|
||||
//#define DFLUSH() fflush(stdout)
|
||||
#define DPRINT
|
||||
#define DFLUSH()
|
||||
//#define IPRINT printf
|
||||
//#define IFLUSH() fflush(stdout)
|
||||
#define IPRINT
|
||||
#define IFLUSH()
|
||||
#define DPRINT
|
||||
#define DFLUSH()
|
||||
|
||||
//#define IPRINT if (ics.thread_state->thread_id() == 1) printf
|
||||
//#define IFLUSH() fflush(stdout)
|
||||
//#define DPRINT if (ics.thread_state->thread_id() == 1) printf
|
||||
//#define DFLUSH() fflush(stdout)
|
||||
|
||||
|
||||
uint32_t IntCode_INT_LOAD_CONSTANT(IntCodeState& ics, const IntCode* i) {
|
||||
|
||||
0
src/alloy/backend/x64/lir/lir_builder.cc
Normal file
0
src/alloy/backend/x64/lir/lir_builder.cc
Normal file
0
src/alloy/backend/x64/lir/lir_builder.h
Normal file
0
src/alloy/backend/x64/lir/lir_builder.h
Normal file
0
src/alloy/backend/x64/lir/lir_instr.h
Normal file
0
src/alloy/backend/x64/lir/lir_instr.h
Normal file
0
src/alloy/backend/x64/lir/lircodes.cc
Normal file
0
src/alloy/backend/x64/lir/lircodes.cc
Normal file
0
src/alloy/backend/x64/lir/lircodes.h
Normal file
0
src/alloy/backend/x64/lir/lircodes.h
Normal file
0
src/alloy/backend/x64/lir/lircodes.inl
Normal file
0
src/alloy/backend/x64/lir/lircodes.inl
Normal file
12
src/alloy/backend/x64/lir/sources.gypi
Normal file
12
src/alloy/backend/x64/lir/sources.gypi
Normal file
@@ -0,0 +1,12 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'lir_builder.cc',
|
||||
'lir_builder.h',
|
||||
'lir_instr.h',
|
||||
'lircodes.cc',
|
||||
'lircodes.h',
|
||||
'lircodes.inl',
|
||||
'tracing.h',
|
||||
],
|
||||
}
|
||||
0
src/alloy/backend/x64/lir/tracing.h
Normal file
0
src/alloy/backend/x64/lir/tracing.h
Normal file
0
src/alloy/backend/x64/optimizer/optimizer.cc
Normal file
0
src/alloy/backend/x64/optimizer/optimizer.cc
Normal file
0
src/alloy/backend/x64/optimizer/optimizer.h
Normal file
0
src/alloy/backend/x64/optimizer/optimizer.h
Normal file
0
src/alloy/backend/x64/optimizer/optimizer_pass.cc
Normal file
0
src/alloy/backend/x64/optimizer/optimizer_pass.cc
Normal file
0
src/alloy/backend/x64/optimizer/optimizer_pass.h
Normal file
0
src/alloy/backend/x64/optimizer/optimizer_pass.h
Normal file
0
src/alloy/backend/x64/optimizer/optimizer_passes.h
Normal file
0
src/alloy/backend/x64/optimizer/optimizer_passes.h
Normal file
7
src/alloy/backend/x64/optimizer/passes/sources.gypi
Normal file
7
src/alloy/backend/x64/optimizer/passes/sources.gypi
Normal file
@@ -0,0 +1,7 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'redundant_mov_pass.cc',
|
||||
'redundant_mov_pass.h',
|
||||
],
|
||||
}
|
||||
15
src/alloy/backend/x64/optimizer/sources.gypi
Normal file
15
src/alloy/backend/x64/optimizer/sources.gypi
Normal file
@@ -0,0 +1,15 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'optimizer.cc',
|
||||
'optimizer.h',
|
||||
'optimizer_pass.cc',
|
||||
'optimizer_pass.h',
|
||||
'optimizer_passes.h',
|
||||
'tracing.h',
|
||||
],
|
||||
|
||||
'includes': [
|
||||
'passes/sources.gypi',
|
||||
],
|
||||
}
|
||||
0
src/alloy/backend/x64/optimizer/tracing.h
Normal file
0
src/alloy/backend/x64/optimizer/tracing.h
Normal file
@@ -1,5 +1,21 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'tracing.h',
|
||||
'x64_assembler.cc',
|
||||
'x64_assembler.h',
|
||||
'x64_backend.cc',
|
||||
'x64_backend.h',
|
||||
'x64_codegen.cc',
|
||||
'x64_codegen.h',
|
||||
'x64_emitter.cc',
|
||||
'x64_emitter.h',
|
||||
'x64_function.cc',
|
||||
'x64_function.h',
|
||||
],
|
||||
|
||||
'includes': [
|
||||
'lir/sources.gypi',
|
||||
'optimizer/sources.gypi',
|
||||
],
|
||||
}
|
||||
|
||||
0
src/alloy/backend/x64/tracing.h
Normal file
0
src/alloy/backend/x64/tracing.h
Normal file
0
src/alloy/backend/x64/x64_assembler.cc
Normal file
0
src/alloy/backend/x64/x64_assembler.cc
Normal file
0
src/alloy/backend/x64/x64_assembler.h
Normal file
0
src/alloy/backend/x64/x64_assembler.h
Normal file
0
src/alloy/backend/x64/x64_backend.cc
Normal file
0
src/alloy/backend/x64/x64_backend.cc
Normal file
0
src/alloy/backend/x64/x64_backend.h
Normal file
0
src/alloy/backend/x64/x64_backend.h
Normal file
0
src/alloy/backend/x64/x64_codegen.cc
Normal file
0
src/alloy/backend/x64/x64_codegen.cc
Normal file
0
src/alloy/backend/x64/x64_codegen.h
Normal file
0
src/alloy/backend/x64/x64_codegen.h
Normal file
0
src/alloy/backend/x64/x64_emitter.cc
Normal file
0
src/alloy/backend/x64/x64_emitter.cc
Normal file
0
src/alloy/backend/x64/x64_emitter.h
Normal file
0
src/alloy/backend/x64/x64_emitter.h
Normal file
0
src/alloy/backend/x64/x64_function.cc
Normal file
0
src/alloy/backend/x64/x64_function.cc
Normal file
0
src/alloy/backend/x64/x64_function.h
Normal file
0
src/alloy/backend/x64/x64_function.h
Normal file
Reference in New Issue
Block a user