From 68776e5d73ac2545bb6571b7702013bb09a731be Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Sun, 10 Feb 2013 18:55:38 -0700 Subject: [PATCH] move all codegen source in to codegen/ dir --- makefile | 6 +++--- src/{vector.h => alloc-vector.h} | 0 src/{arm.cpp => codegen/arm/assembler.cpp} | 2 +- src/{ => codegen}/assembler.h | 0 src/{ => codegen}/compiler.cpp | 0 src/{ => codegen}/compiler.h | 0 src/{powerpc.cpp => codegen/powerpc/assembler.cpp} | 2 +- src/{x86.cpp => codegen/x86/assembler.cpp} | 5 +++-- src/compile.cpp | 6 +++--- src/processor.h | 3 ++- src/target.h | 1 + 11 files changed, 14 insertions(+), 11 deletions(-) rename src/{vector.h => alloc-vector.h} (100%) rename src/{arm.cpp => codegen/arm/assembler.cpp} (99%) rename src/{ => codegen}/assembler.h (100%) rename src/{ => codegen}/compiler.cpp (100%) rename src/{ => codegen}/compiler.h (100%) rename src/{powerpc.cpp => codegen/powerpc/assembler.cpp} (99%) rename src/{x86.cpp => codegen/x86/assembler.cpp} (99%) diff --git a/makefile b/makefile index b3cbd88a57..bdce03c7c3 100755 --- a/makefile +++ b/makefile @@ -629,7 +629,7 @@ generated-code = \ $(build)/type-name-initializations.cpp \ $(build)/type-maps.cpp -vm-depends := $(generated-code) $(wildcard $(src)/*.h) +vm-depends := $(generated-code) $(wildcard $(src)/*.h) $(wildcard $(src)/codegen/*.h) vm-sources = \ $(src)/$(system).cpp \ @@ -658,8 +658,8 @@ embed-objects = $(call cpp-objects,$(embed-sources),$(src),$(build-embed)) ifeq ($(process),compile) vm-sources += \ - $(src)/compiler.cpp \ - $(src)/$(target-asm).cpp + $(src)/codegen/compiler.cpp \ + $(src)/codegen/$(target-asm)/assembler.cpp vm-asm-sources += $(src)/compile-$(asm).S endif diff --git a/src/vector.h b/src/alloc-vector.h similarity index 100% rename from src/vector.h rename to src/alloc-vector.h diff --git a/src/arm.cpp b/src/codegen/arm/assembler.cpp similarity index 99% rename from src/arm.cpp rename to src/codegen/arm/assembler.cpp index 8809cdb479..e0e3751839 100644 --- a/src/arm.cpp +++ b/src/codegen/arm/assembler.cpp @@ -9,7 +9,7 @@ details. */ #include "assembler.h" -#include "vector.h" +#include "alloc-vector.h" #define CAST1(x) reinterpret_cast(x) #define CAST2(x) reinterpret_cast(x) diff --git a/src/assembler.h b/src/codegen/assembler.h similarity index 100% rename from src/assembler.h rename to src/codegen/assembler.h diff --git a/src/compiler.cpp b/src/codegen/compiler.cpp similarity index 100% rename from src/compiler.cpp rename to src/codegen/compiler.cpp diff --git a/src/compiler.h b/src/codegen/compiler.h similarity index 100% rename from src/compiler.h rename to src/codegen/compiler.h diff --git a/src/powerpc.cpp b/src/codegen/powerpc/assembler.cpp similarity index 99% rename from src/powerpc.cpp rename to src/codegen/powerpc/assembler.cpp index 1c34c85291..d70cb36bef 100644 --- a/src/powerpc.cpp +++ b/src/codegen/powerpc/assembler.cpp @@ -9,7 +9,7 @@ details. */ #include "assembler.h" -#include "vector.h" +#include "alloc-vector.h" #define CAST1(x) reinterpret_cast(x) #define CAST2(x) reinterpret_cast(x) diff --git a/src/x86.cpp b/src/codegen/x86/assembler.cpp similarity index 99% rename from src/x86.cpp rename to src/codegen/x86/assembler.cpp index 3a3942dca7..4270207eea 100644 --- a/src/x86.cpp +++ b/src/codegen/x86/assembler.cpp @@ -9,9 +9,10 @@ details. */ #include "environment.h" -#include "assembler.h" #include "target.h" -#include "vector.h" +#include "alloc-vector.h" + +#include "codegen/assembler.h" #include "util/runtime-array.h" diff --git a/src/compile.cpp b/src/compile.cpp index 51d141e990..1a17e62e1b 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -10,11 +10,11 @@ #include "machine.h" #include "util.h" -#include "vector.h" +#include "alloc-vector.h" #include "process.h" -#include "assembler.h" #include "target.h" -#include "compiler.h" +#include "codegen/assembler.h" +#include "codegen/compiler.h" #include "arch.h" #include "util/runtime-array.h" diff --git a/src/processor.h b/src/processor.h index 6da91dddce..ab9d68e1aa 100644 --- a/src/processor.h +++ b/src/processor.h @@ -17,10 +17,11 @@ #include "bootimage.h" #include "heapwalk.h" #include "zone.h" -#include "assembler.h" namespace vm { +class DelayedPromise; + class Processor { public: class StackWalker; diff --git a/src/target.h b/src/target.h index 996d76348f..f75e575eef 100644 --- a/src/target.h +++ b/src/target.h @@ -12,6 +12,7 @@ #define TARGET_H #include "target-fields.h" +#include "common.h" namespace vm {