vm: don't allocate for break points in NewContext

They're rarely used and when they're used they're appended to.
This commit is contained in:
Roman Khimov 2021-08-28 22:27:38 +03:00
parent 7b9558d756
commit e09a0f3969

View file

@ -79,11 +79,10 @@ func NewContext(b []byte) *Context {
// return value count and initial position in script. // return value count and initial position in script.
func NewContextWithParams(b []byte, pcount int, rvcount int, pos int) *Context { func NewContextWithParams(b []byte, pcount int, rvcount int, pos int) *Context {
return &Context{ return &Context{
prog: b, prog: b,
breakPoints: []int{}, ParamCount: pcount,
ParamCount: pcount, RetCount: rvcount,
RetCount: rvcount, nextip: pos,
nextip: pos,
} }
} }