mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/vm: optimize mstore a bit
This commit is contained in:
parent
8d39aed22c
commit
c9ff3e1680
1 changed files with 3 additions and 5 deletions
|
|
@ -602,11 +602,9 @@ func opPop(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory *
|
|||
}
|
||||
|
||||
func opMload(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
|
||||
offset := stack.pop()
|
||||
val := interpreter.intPool.get().SetBytes(memory.Get(offset.Int64(), 32))
|
||||
stack.push(val)
|
||||
|
||||
interpreter.intPool.put(offset)
|
||||
v := stack.peek()
|
||||
offset := v.Int64()
|
||||
v.SetBytes(memory.GetPtr(offset, 32))
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue