aboutsummaryrefslogtreecommitdiffgithub
path: root/novice/simulator/simulator.ts
diff options
context:
space:
mode:
authorAustin Adams <git@austinjadams.com>2019-02-05 23:00:58 -0500
committerAustin Adams <git@austinjadams.com>2019-02-05 23:00:58 -0500
commita1cf7626f6971c1f80a8511608ee5c701de2ccb4 (patch)
treef851e61dacff0fe311d0418ec8ffb6f857fdc891 /novice/simulator/simulator.ts
parent699bb01c1d7036bae89423cc4d5b24552cec6fbe (diff)
downloadnovice-a1cf7626f6971c1f80a8511608ee5c701de2ccb4.tar.gz
novice-a1cf7626f6971c1f80a8511608ee5c701de2ccb4.tar.xz
Try to optimize symbol lookups in debuggerHEADmaster
Diffstat (limited to 'novice/simulator/simulator.ts')
-rw-r--r--novice/simulator/simulator.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/novice/simulator/simulator.ts b/novice/simulator/simulator.ts
index 6da9687..4800e4b 100644
--- a/novice/simulator/simulator.ts
+++ b/novice/simulator/simulator.ts
@@ -1,6 +1,7 @@
import { Fields, InstructionSpec, IO, Isa, MachineCodeSection, MachineStateLogEntry,
MachineStateUpdate, Reg, RegIdentifier } from '../isa';
import { forceUnsigned, maskTo, sextTo } from '../util';
+import { Memory } from './mem';
class InstrLut {
private isa: Isa;
@@ -81,7 +82,7 @@ class InstrLut {
}
}
-class Simulator {
+class Simulator implements Memory {
protected pc: number;
protected mem: {[addr: number]: number};
protected regs: {