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.
func NewContextWithParams(b []byte, pcount int, rvcount int, pos int) *Context {
return &Context{
prog: b,
breakPoints: []int{},
ParamCount: pcount,
RetCount: rvcount,
nextip: pos,
prog: b,
ParamCount: pcount,
RetCount: rvcount,
nextip: pos,
}
}