Removing dep on xenia/types.h from alloy.

This commit is contained in:
Ben Vanik 2014-08-20 22:37:01 -07:00
parent cecf83b7b7
commit 06f5b8cbbf
6 changed files with 29 additions and 10 deletions

View File

@ -16,12 +16,18 @@
#include <third_party/xbyak/xbyak/xbyak.h> #include <third_party/xbyak/xbyak/xbyak.h>
XEDECLARECLASS2(alloy, hir, HIRBuilder); namespace alloy {
XEDECLARECLASS2(alloy, hir, Instr); namespace hir {
XEDECLARECLASS2(alloy, runtime, DebugInfo); class HIRBuilder;
XEDECLARECLASS2(alloy, runtime, FunctionInfo); class Instr;
XEDECLARECLASS2(alloy, runtime, Runtime); } // namespace hir
XEDECLARECLASS2(alloy, runtime, SymbolInfo); namespace runtime {
class DebugInfo;
class FunctionInfo;
class Runtime;
class SymbolInfo;
} // namespace runtime
} // namespace alloy
namespace alloy { namespace alloy {
namespace backend { namespace backend {

View File

@ -12,7 +12,11 @@
#include <alloy/core.h> #include <alloy/core.h>
XEDECLARECLASS2(alloy, hir, Instr); namespace alloy {
namespace hir {
class Instr;
} // namespace hir
} // namespace alloy
namespace alloy { namespace alloy {
namespace backend { namespace backend {

View File

@ -13,7 +13,9 @@
#include <alloy/arena.h> #include <alloy/arena.h>
#include <alloy/core.h> #include <alloy/core.h>
XEDECLARECLASS1(llvm, BitVector); namespace llvm {
class BitVector;
} // namespace llvm
namespace alloy { namespace alloy {
namespace hir { namespace hir {

View File

@ -12,7 +12,9 @@
#include <alloy/core.h> #include <alloy/core.h>
XEDECLARECLASS1(alloy, Memory); namespace alloy {
class Memory;
} // namespace alloy
namespace alloy { namespace alloy {
namespace runtime { namespace runtime {

View File

@ -13,9 +13,10 @@
#include <memory> #include <memory>
#include <poly/string.h> #include <poly/string.h>
#include <xenia/types.h>
#if XE_LIKE_WIN32
#define XE_OPTION_PROFILING 1 #define XE_OPTION_PROFILING 1
#endif // XE_LIKE_WIN32
#if XE_OPTION_PROFILING #if XE_OPTION_PROFILING
// Pollutes the global namespace. Yuck. // Pollutes the global namespace. Yuck.

View File

@ -75,8 +75,10 @@ class ThreadState : public alloy::runtime::ThreadState {
// TODO(benvanik): simple memory? move more into core? // TODO(benvanik): simple memory? move more into core?
int main(std::vector<std::wstring>& args) { int main(std::vector<std::wstring>& args) {
#if XE_OPTION_PROFILING
xe::Profiler::Initialize(); xe::Profiler::Initialize();
xe::Profiler::ThreadEnter("main"); xe::Profiler::ThreadEnter("main");
#endif // XE_OPTION_PROFILING
size_t memory_size = 16 * 1024 * 1024; size_t memory_size = 16 * 1024 * 1024;
auto memory = std::make_unique<SimpleMemory>(memory_size); auto memory = std::make_unique<SimpleMemory>(memory_size);
@ -116,8 +118,10 @@ int main(std::vector<std::wstring>& args) {
runtime.reset(); runtime.reset();
memory.reset(); memory.reset();
#if XE_OPTION_PROFILING
xe::Profiler::Dump(); xe::Profiler::Dump();
xe::Profiler::ThreadExit(); xe::Profiler::ThreadExit();
#endif // XE_OPTION_PROFILING
return 0; return 0;
} }