Sprucing up some of alloy.

This commit is contained in:
Ben Vanik
2014-07-13 21:15:37 -07:00
parent 48425da8ff
commit 9437d0b564
40 changed files with 246 additions and 228 deletions

View File

@@ -23,8 +23,8 @@ using namespace xe::cpu;
XenonRuntime::XenonRuntime(
alloy::Memory* memory, ExportResolver* export_resolver) :
export_resolver_(export_resolver),
Runtime(memory) {
Runtime(memory),
export_resolver_(export_resolver) {
}
XenonRuntime::~XenonRuntime() {
@@ -32,11 +32,11 @@ XenonRuntime::~XenonRuntime() {
}));
}
int XenonRuntime::Initialize(backend::Backend* backend) {
PPCFrontend* frontend = new PPCFrontend(this);
int XenonRuntime::Initialize(std::unique_ptr<backend::Backend> backend) {
std::unique_ptr<PPCFrontend> frontend(new PPCFrontend(this));
// TODO(benvanik): set options/etc.
int result = Runtime::Initialize(frontend, backend);
int result = Runtime::Initialize(std::move(frontend), std::move(backend));
if (result) {
return result;
}