supporting more instructions seen in stdlib

This commit is contained in:
Michael McLoughlin
2018-11-24 17:32:18 -08:00
parent 124587f55c
commit 0edbdb064f
8 changed files with 1186 additions and 17 deletions

View File

@@ -62,6 +62,13 @@ func (l *Loader) Load() ([]inst.Instruction, error) {
}
}
// Apply list of "annoying aliases".
for from, to := range annoyingaliases {
cpy := *im[to]
cpy.Opcode = from
im[from] = &cpy
}
// Convert to a slice, sorted by opcode.
is := make([]inst.Instruction, 0, len(im))
for _, i := range im {