mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-02-08 19:42:38 +00:00
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:
parent
7b9558d756
commit
e09a0f3969
1 changed files with 4 additions and 5 deletions
|
@ -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,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue