From 96a6dba4371a2e319a47335b2bf366b695b6c17a Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Fri, 10 Sep 2021 21:16:34 +0300 Subject: refactor: remove the ICPU interface Removing the interface simplifies the code --- benchmark/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'benchmark/index.ts') diff --git a/benchmark/index.ts b/benchmark/index.ts index e290352..a1ee7e7 100644 --- a/benchmark/index.ts +++ b/benchmark/index.ts @@ -1,4 +1,4 @@ -import { CPU, ICPU } from '../src/cpu/cpu'; +import { CPU } from '../src/cpu/cpu'; import { avrInstruction } from '../src/cpu/instruction'; import { createBenchmark } from './benchmark'; import { permutations } from './permutations'; @@ -21,7 +21,7 @@ function avrInstructionUintArray(cpu: CPU) { } /* Approach 2: use instMap */ -const instructionMap: { [key: number]: (cpu: ICPU, opcode: number) => void } = {}; +const instructionMap: { [key: number]: (cpu: CPU, opcode: number) => void } = {}; for (const { pattern, fn } of instructions) { for (const opcode of permutations(pattern.replace(/ /g, '').substr(0, 16))) { if (!instructionMap[opcode]) { -- cgit v1.2.3