mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-26 08:29:33 +00:00
Keep map small.
This commit is contained in:
parent
b7a27fbc6b
commit
2f5d710441
@ -546,8 +546,17 @@ struct Z80Disassembler {
|
||||
disassembly.disassembly.internal_calls.insert(entry_point);
|
||||
Accessor accessor(memory, address_mapper, entry_point);
|
||||
|
||||
auto &touched = disassembly.touched[entry_point];
|
||||
touched = entry_point;
|
||||
uint16_t *touched = nullptr;
|
||||
auto lower_bound = disassembly.touched.lower_bound(entry_point);
|
||||
if(lower_bound != disassembly.touched.begin()) {
|
||||
--lower_bound;
|
||||
if(lower_bound->second == entry_point) {
|
||||
touched = &lower_bound->second;
|
||||
}
|
||||
} else {
|
||||
touched = &disassembly.touched[entry_point];
|
||||
*touched = entry_point;
|
||||
}
|
||||
|
||||
while(!accessor.at_end()) {
|
||||
Instruction instruction;
|
||||
@ -562,7 +571,7 @@ struct Z80Disassembler {
|
||||
disassembly.disassembly.instructions_by_address[instruction.address] = instruction;
|
||||
|
||||
// Apply all touches.
|
||||
touched = accessor.address();
|
||||
*touched = accessor.address();
|
||||
|
||||
// Update access tables.
|
||||
int access_type =
|
||||
|
@ -115,7 +115,7 @@ static Analyser::Static::TargetList CartridgeTargetsFrom(
|
||||
// be at play; disassemble to try to figure it out.
|
||||
std::vector<uint8_t> first_8k;
|
||||
first_8k.insert(first_8k.begin(), segment.data.begin(), segment.data.begin() + 8192);
|
||||
Analyser::Static::Z80::Disassembly disassembly =
|
||||
const Analyser::Static::Z80::Disassembly disassembly =
|
||||
Analyser::Static::Z80::Disassemble(
|
||||
first_8k,
|
||||
Analyser::Static::Disassembler::OffsetMapper(start_address),
|
||||
|
Loading…
x
Reference in New Issue
Block a user