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>
XEDECLARECLASS2(alloy, hir, HIRBuilder);
XEDECLARECLASS2(alloy, hir, Instr);
XEDECLARECLASS2(alloy, runtime, DebugInfo);
XEDECLARECLASS2(alloy, runtime, FunctionInfo);
XEDECLARECLASS2(alloy, runtime, Runtime);
XEDECLARECLASS2(alloy, runtime, SymbolInfo);
namespace alloy {
namespace hir {
class HIRBuilder;
class Instr;
} // namespace hir
namespace runtime {
class DebugInfo;
class FunctionInfo;
class Runtime;
class SymbolInfo;
} // namespace runtime
} // namespace alloy
namespace alloy {
namespace backend {

View File

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

View File

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

View File

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

View File

@ -13,9 +13,10 @@
#include <memory>
#include <poly/string.h>
#include <xenia/types.h>
#if XE_LIKE_WIN32
#define XE_OPTION_PROFILING 1
#endif // XE_LIKE_WIN32
#if XE_OPTION_PROFILING
// 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?
int main(std::vector<std::wstring>& args) {
#if XE_OPTION_PROFILING
xe::Profiler::Initialize();
xe::Profiler::ThreadEnter("main");
#endif // XE_OPTION_PROFILING
size_t memory_size = 16 * 1024 * 1024;
auto memory = std::make_unique<SimpleMemory>(memory_size);
@ -116,8 +118,10 @@ int main(std::vector<std::wstring>& args) {
runtime.reset();
memory.reset();
#if XE_OPTION_PROFILING
xe::Profiler::Dump();
xe::Profiler::ThreadExit();
#endif // XE_OPTION_PROFILING
return 0;
}