koa
koa copied to clipboard
[compiler, vm] When function type is void and return
Proposal Detail
When function return something, opcode RETURNING is push to stack size and offset of return value. but when function type is void and return, compiler push to stack size and offset and size is 0. offset is not matter.
ex)
func doSome() int {
return 5
}
when see as bytecode -> Returning 1(size) 1(offset)
func doSome() {
return
}
when see as bytecode -> Returning 0(size) 1(offset)