mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-18 01:30:56 +00:00
Made check_address_for_trap inlineable.
This commit is contained in:
parent
7d9b197383
commit
aab637c9e7
@ -28,12 +28,6 @@ uint32_t AllRAMProcessor::get_timestamp() {
|
|||||||
return timestamp_;
|
return timestamp_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AllRAMProcessor::check_address_for_trap(uint16_t address) {
|
|
||||||
if(trap_addresses_.find(address) != trap_addresses_.end()) {
|
|
||||||
trap_handler_->processor_did_trap(*this, address);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AllRAMProcessor::set_trap_handler(TrapHandler *trap_handler) {
|
void AllRAMProcessor::set_trap_handler(TrapHandler *trap_handler) {
|
||||||
trap_handler_ = trap_handler;
|
trap_handler_ = trap_handler;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,11 @@ class AllRAMProcessor {
|
|||||||
std::vector<uint8_t> memory_;
|
std::vector<uint8_t> memory_;
|
||||||
uint32_t timestamp_;
|
uint32_t timestamp_;
|
||||||
|
|
||||||
void check_address_for_trap(uint16_t address);
|
inline void check_address_for_trap(uint16_t address) {
|
||||||
|
if(trap_addresses_.find(address) != trap_addresses_.end()) {
|
||||||
|
trap_handler_->processor_did_trap(*this, address);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::set<uint16_t> trap_addresses_;
|
std::set<uint16_t> trap_addresses_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user