mirror of
https://github.com/Smallhacker/disbrowser.git
synced 2024-06-09 11:29:33 +00:00
13 lines
389 B
Kotlin
13 lines
389 B
Kotlin
|
package com.smallhacker.disbrowser.asm
|
||
|
|
||
|
class Disassembly(lines: List<Instruction>) : Iterable<Instruction> {
|
||
|
override fun iterator() = lines.values.iterator() as Iterator<Instruction>
|
||
|
|
||
|
private val lines = LinkedHashMap<Address, Instruction>()
|
||
|
|
||
|
init {
|
||
|
lines.forEach { this.lines[it.address] = it }
|
||
|
}
|
||
|
|
||
|
operator fun contains(address: Address) = address in lines
|
||
|
}
|