upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
authorNotRexed <therealnothingfn@gmail.com>2026-11-27 17:58:38 -0500
committerNotRexed <therealnothingfn@gmail.com>2026-11-27 17:58:38 -0500
commit00131bb85ee294179e5179b00a2c68f4ea3610b5 (patch)
tree11854f35d928e964919b81746360146c3657ce07 /runtime/src/pe_loader.cpp
parenteac96d744c3a899fa6e326e296f387fe11e05eab (diff)
main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code, tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have been built from two generations of its sources. So that the merge cannot break what main builds and tests: - runtime/ is main's, file for file (68 files only this branch had are not carried over); - every file under tools/, tests/ and docs/ that both sides have is main's (80 files); - ten translator tests only this branch has, which test rules main's translator does not have, and their fixtures are left out. What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1, play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia. Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own. Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the branch's), CI. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
-rw-r--r--runtime/src/pe_loader.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp
index 54440459d..fc73f37f5 100644
--- a/runtime/src/pe_loader.cpp
+++ b/runtime/src/pe_loader.cpp
@@ -1341,10 +1341,6 @@ void* bundled_load_w(void* ctx, const std::wstring& basename, uint32_t flags, bo
1341 return static_cast<Loader*>(ctx)->load_runtime_module_w(basename, flags, handled); 1341 return static_cast<Loader*>(ctx)->load_runtime_module_w(basename, flags, handled);
1342} 1342}
1343 1343
1344bool bundled_module_path(void* ctx, void* module, std::wstring& path) {
1345 return static_cast<Loader*>(ctx)->module_path(module, path);
1346}
1347
1348const shims::BundledModuleOps kBundledOps{ 1344const shims::BundledModuleOps kBundledOps{
1349 &bundled_find_loaded, 1345 &bundled_find_loaded,
1350 &bundled_load, 1346 &bundled_load,
@@ -1352,7 +1348,6 @@ const shims::BundledModuleOps kBundledOps{
1352 &bundled_owns_handle, 1348 &bundled_owns_handle,
1353 &bundled_find_loaded_w, 1349 &bundled_find_loaded_w,
1354 &bundled_load_w, 1350 &bundled_load_w,
1355 &bundled_module_path,
1356}; 1351};
1357 1352
1358// Marks what a run-time load maps as a dynamic load for as long as it is in scope (the caller holds the mutex). 1353// Marks what a run-time load maps as a dynamic load for as long as it is in scope (the caller holds the mutex).
@@ -1600,19 +1595,6 @@ bool Loader::find_address(uint64_t address, std::string& module, uint32_t& rva)
1600 return false; 1595 return false;
1601} 1596}
1602 1597
1603bool Loader::module_path(void* module_handle, std::wstring& path) const {
1604 if (!module_handle) return false;
1605 std::lock_guard lock(mutex_);
1606 for (const Module* m : order_)
1607 if (m->base == module_handle) {
1608 std::error_code ec;
1609 const std::filesystem::path absolute = std::filesystem::absolute(m->path, ec);
1610 path = (ec ? m->path : absolute).wstring();
1611 return true;
1612 }
1613 return false;
1614}
1615
1616bool Loader::owns_module_handle(void* module_handle) const { 1598bool Loader::owns_module_handle(void* module_handle) const {
1617 if (!module_handle) return false; 1599 if (!module_handle) return false;
1618 std::lock_guard lock(mutex_); 1600 std::lock_guard lock(mutex_);