compiler: don't use (*VM).Istack when it's not needed

This commit is contained in:
Roman Khimov 2022-11-17 20:46:06 +03:00
parent 5d7b37a6ff
commit 2bcb7bd06f
5 changed files with 10 additions and 11 deletions

View file

@ -84,7 +84,7 @@ func evalWithArgs(t *testing.T, src string, op []byte, args []stackitem.Item, re
func assertResult(t *testing.T, vm *vm.VM, result interface{}) {
assert.Equal(t, result, vm.PopResult())
assert.Equal(t, 0, vm.Istack().Len())
assert.Nil(t, vm.Context())
}
func vmAndCompile(t *testing.T, src string) *vm.VM {