diff options
author | Jesse Talavera-Greenberg <jesse@jesse.tg> | 2023-11-25 12:32:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-25 18:32:09 +0100 |
commit | 346dd4006ea1283136095d5c43f602324a095092 (patch) | |
tree | edf04631782bbfcdb48eac79b79aebb11b40f479 /src/ARMJIT_Memory.h | |
parent | 651b0f680c4531558990a5beb0e638968009dc51 (diff) |
Move all core types into namespaces (#1886)
* Reorganize namespaces
- Most types are now moved into the `melonDS` namespace
- Only good chance to do this for a while, since a big refactor is next
* Fix the build
Diffstat (limited to 'src/ARMJIT_Memory.h')
-rw-r--r-- | src/ARMJIT_Memory.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/ARMJIT_Memory.h b/src/ARMJIT_Memory.h index 1cf4f81..ed48437 100644 --- a/src/ARMJIT_Memory.h +++ b/src/ARMJIT_Memory.h @@ -42,11 +42,10 @@ #include "NDS.h" #endif -namespace ARMJIT +namespace melonDS { class Compiler; class ARMJIT; -} constexpr u32 RoundUp(u32 size) noexcept { @@ -97,7 +96,7 @@ public: #ifdef JIT_ENABLED public: - explicit ARMJIT_Memory(ARMJIT::ARMJIT& jit) noexcept; + explicit ARMJIT_Memory(ARMJIT& jit) noexcept; ~ARMJIT_Memory() noexcept; ARMJIT_Memory(const ARMJIT_Memory&) = delete; ARMJIT_Memory(ARMJIT_Memory&&) = delete; @@ -138,7 +137,7 @@ public: void* GetFuncForAddr(ARM* cpu, u32 addr, bool store, int size) const noexcept; bool MapAtAddress(u32 addr) noexcept; private: - friend class ARMJIT::Compiler; + friend class Compiler; struct Mapping { u32 Addr; @@ -153,12 +152,12 @@ private: u32 EmulatedFaultAddr; u8* FaultPC; }; - static bool FaultHandler(FaultDescription& faultDesc, ARMJIT::ARMJIT& jit); + static bool FaultHandler(FaultDescription& faultDesc, ARMJIT& jit); bool MapIntoRange(u32 addr, u32 num, u32 offset, u32 size) noexcept; bool UnmapFromRange(u32 addr, u32 num, u32 offset, u32 size) noexcept; void SetCodeProtectionRange(u32 addr, u32 size, u32 num, int protection) noexcept; - ARMJIT::ARMJIT& JIT; + ARMJIT& JIT; void* FastMem9Start; void* FastMem7Start; u8* MemoryBase = nullptr; @@ -178,10 +177,10 @@ private: #endif u8 MappingStatus9[1 << (32-12)] {}; u8 MappingStatus7[1 << (32-12)] {}; - ARMJIT::TinyVector<Mapping> Mappings[memregions_Count] {}; + TinyVector<Mapping> Mappings[memregions_Count] {}; #else public: - explicit ARMJIT_Memory(ARMJIT::ARMJIT&) {}; + explicit ARMJIT_Memory(ARMJIT&) {}; ~ARMJIT_Memory() = default; ARMJIT_Memory(const ARMJIT_Memory&) = delete; ARMJIT_Memory(ARMJIT_Memory&&) = delete; @@ -224,5 +223,5 @@ private: std::array<u8, DSi::NWRAMSize> NWRAM_C {}; #endif }; - +} #endif |