Merging Runtime into Processor.

This commit is contained in:
Ben Vanik
2015-05-03 22:28:25 -07:00
parent 4c8f3501ad
commit 78921c1a7e
56 changed files with 441 additions and 543 deletions

View File

@@ -104,7 +104,6 @@ X_STATUS XUserModule::LoadFromFile(const char* path) {
X_STATUS XUserModule::LoadFromMemory(const void* addr, const size_t length) {
Processor* processor = kernel_state()->processor();
Runtime* runtime = processor->runtime();
// Load the XEX into memory and decrypt.
xe_xex2_options_t xex_options = {0};
@@ -130,11 +129,11 @@ X_STATUS XUserModule::LoadFromMemory(const void* addr, const size_t length) {
// Prepare the module for execution.
// Runtime takes ownership.
auto xex_module = std::make_unique<XexModule>(runtime);
auto xex_module = std::make_unique<XexModule>(processor);
if (xex_module->Load(name_, path_, xex_)) {
return X_STATUS_UNSUCCESSFUL;
}
if (runtime->AddModule(std::move(xex_module))) {
if (processor->AddModule(std::move(xex_module))) {
return X_STATUS_UNSUCCESSFUL;
}