mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-22 19:29:39 +00:00
vm: drop LoadArgs method, it's a Legacy remnant
This commit is contained in:
parent
cd3670a199
commit
b0a8f54776
2 changed files with 6 additions and 11 deletions
|
@ -42,7 +42,12 @@ func eval(t *testing.T, src string, result interface{}) {
|
|||
|
||||
func evalWithArgs(t *testing.T, src string, op []byte, args []stackitem.Item, result interface{}) {
|
||||
vm := vmAndCompile(t, src)
|
||||
vm.LoadArgs(op, args)
|
||||
if len(args) > 0 {
|
||||
vm.Estack().PushVal(args)
|
||||
}
|
||||
if op != nil {
|
||||
vm.Estack().PushVal(op)
|
||||
}
|
||||
err := vm.Run()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, 1, vm.Estack().Len(), "stack contains unexpected items")
|
||||
|
|
10
pkg/vm/vm.go
10
pkg/vm/vm.go
|
@ -133,16 +133,6 @@ func (v *VM) Istack() *Stack {
|
|||
return &v.istack
|
||||
}
|
||||
|
||||
// LoadArgs loads in the arguments used in the Mian entry point.
|
||||
func (v *VM) LoadArgs(method []byte, args []stackitem.Item) {
|
||||
if len(args) > 0 {
|
||||
v.estack.PushVal(args)
|
||||
}
|
||||
if method != nil {
|
||||
v.estack.PushVal(method)
|
||||
}
|
||||
}
|
||||
|
||||
// PrintOps prints the opcodes of the current loaded program to stdout.
|
||||
func (v *VM) PrintOps(out io.Writer) {
|
||||
if out == nil {
|
||||
|
|
Loading…
Reference in a new issue