Removing dead ExportResolver code.

This commit is contained in:
Ben Vanik 2014-08-21 21:53:06 -07:00
parent 9b76d02f26
commit 52678ed1ef
2 changed files with 0 additions and 36 deletions

View File

@ -29,29 +29,6 @@ void ExportResolver::RegisterTable(const std::string& library_name,
}
}
uint16_t ExportResolver::GetLibraryOrdinal(const std::string& library_name) {
uint16_t n = 0;
for (const auto& table : tables_) {
if (table.name != library_name) {
return n;
}
++n;
}
return -1;
}
KernelExport* ExportResolver::GetExportByOrdinal(const uint16_t library_ordinal,
const uint32_t ordinal) {
const auto& table = tables_[library_ordinal];
// TODO(benvanik): binary search?
for (size_t n = 0; n < table.count; n++) {
if (table.exports[n].ordinal == ordinal) {
return &table.exports[n];
}
}
return nullptr;
}
KernelExport* ExportResolver::GetExportByOrdinal(
const std::string& library_name, const uint32_t ordinal) {
for (const auto& table : tables_) {
@ -68,13 +45,6 @@ KernelExport* ExportResolver::GetExportByOrdinal(
return nullptr;
}
KernelExport* ExportResolver::GetExportByName(const std::string& library_name,
const std::string& name) {
// TODO(benvanik): lookup by name.
assert_always();
return nullptr;
}
void ExportResolver::SetVariableMapping(const std::string& library_name,
const uint32_t ordinal,
uint32_t value) {

View File

@ -61,14 +61,8 @@ class ExportResolver {
void RegisterTable(const std::string& library_name, KernelExport* exports,
const size_t count);
uint16_t GetLibraryOrdinal(const std::string& library_name);
KernelExport* GetExportByOrdinal(const uint16_t library_ordinal,
const uint32_t ordinal);
KernelExport* GetExportByOrdinal(const std::string& library_name,
const uint32_t ordinal);
KernelExport* GetExportByName(const std::string& library_name,
const std::string& name);
void SetVariableMapping(const std::string& library_name,
const uint32_t ordinal, uint32_t value);