Full test (which fails)

This commit is contained in:
Ian Gulliver
2021-11-18 17:53:38 -10:00
parent 8e34c67f11
commit e99387beb4
5 changed files with 27 additions and 22 deletions

View File

@@ -41,12 +41,5 @@ func NewInstructionsFromByteCode(byteCode []byte) ([]*Instruction, error) {
instrs = append(instrs, instr)
}
if len(instrs) == 0 || instrs[len(instrs)-1].OpCode != OpReturn {
// Add implicit return at the end of each function
instrs = append(instrs, &Instruction{
OpCode: OpReturn,
})
}
return instrs, nil
}