vm: extract shared parts of the Context
Local calls reuse them, cross-contract calls create new ones. This allows to avoid some allocations and use a little less memory.
This commit is contained in:
parent
e5c59f8ddd
commit
13f5fdbe8a
7 changed files with 112 additions and 108 deletions
|
@ -56,7 +56,7 @@ func opParamSlotsPushVM(op opcode.Opcode, param []byte, sslot int, slotloc int,
|
|||
return nil
|
||||
}
|
||||
if sslot != 0 {
|
||||
v.Context().static.init(sslot, &v.refs)
|
||||
v.Context().sc.static.init(sslot, &v.refs)
|
||||
}
|
||||
if slotloc != 0 && slotarg != 0 {
|
||||
v.Context().local.init(slotloc, &v.refs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue