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) {
|
func opMload(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
|
||||||
offset := stack.pop()
|
v := stack.peek()
|
||||||
val := interpreter.intPool.get().SetBytes(memory.Get(offset.Int64(), 32))
|
offset := v.Int64()
|
||||||
stack.push(val)
|
v.SetBytes(memory.GetPtr(offset, 32))
|
||||||
|
|
||||||
interpreter.intPool.put(offset)
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue