mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
core/vm/runtime: minor cleanup
This commit is contained in:
parent
726db0d3d0
commit
6d7e9b9b82
1 changed files with 5 additions and 15 deletions
|
|
@ -442,30 +442,22 @@ func BenchmarkSimpleLoop(b *testing.B) {
|
||||||
// Call identity, and pop return value
|
// Call identity, and pop return value
|
||||||
staticCallIdentity := p.
|
staticCallIdentity := p.
|
||||||
StaticCall(nil, 0x4, 0, 0, 0, 0).
|
StaticCall(nil, 0x4, 0, 0, 0, 0).
|
||||||
Op(vm.POP). // pop return value
|
Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label
|
||||||
Jump(lbl). // jump to label
|
|
||||||
Bytecode()
|
|
||||||
|
|
||||||
p, lbl = program.New().Jumpdest()
|
p, lbl = program.New().Jumpdest()
|
||||||
callIdentity := p.
|
callIdentity := p.
|
||||||
Call(nil, 0x4, 0, 0, 0, 0, 0).
|
Call(nil, 0x4, 0, 0, 0, 0, 0).
|
||||||
Op(vm.POP). // pop return value
|
Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label
|
||||||
Jump(lbl). // jump to label
|
|
||||||
Bytecode()
|
|
||||||
|
|
||||||
p, lbl = program.New().Jumpdest()
|
p, lbl = program.New().Jumpdest()
|
||||||
callInexistant := p.
|
callInexistant := p.
|
||||||
Call(nil, 0xff, 0, 0, 0, 0, 0).
|
Call(nil, 0xff, 0, 0, 0, 0, 0).
|
||||||
Op(vm.POP). // pop return value
|
Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label
|
||||||
Jump(lbl). // jump to label
|
|
||||||
Bytecode()
|
|
||||||
|
|
||||||
p, lbl = program.New().Jumpdest()
|
p, lbl = program.New().Jumpdest()
|
||||||
callEOA := p.
|
callEOA := p.
|
||||||
Call(nil, 0xE0, 0, 0, 0, 0, 0). // call addr of EOA
|
Call(nil, 0xE0, 0, 0, 0, 0, 0). // call addr of EOA
|
||||||
Op(vm.POP). // pop return value
|
Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label
|
||||||
Jump(lbl). // jump to label
|
|
||||||
Bytecode()
|
|
||||||
|
|
||||||
p, lbl = program.New().Jumpdest()
|
p, lbl = program.New().Jumpdest()
|
||||||
// Push as if we were making call, then pop it off again, and loop
|
// Push as if we were making call, then pop it off again, and loop
|
||||||
|
|
@ -485,9 +477,7 @@ func BenchmarkSimpleLoop(b *testing.B) {
|
||||||
p, lbl = program.New().Jumpdest()
|
p, lbl = program.New().Jumpdest()
|
||||||
callRevertingContractWithInput := p.
|
callRevertingContractWithInput := p.
|
||||||
Call(nil, 0xee, 0, 0, 0x20, 0x0, 0x0).
|
Call(nil, 0xee, 0, 0, 0x20, 0x0, 0x0).
|
||||||
Op(vm.POP).
|
Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label
|
||||||
Jump(lbl).
|
|
||||||
Bytecode()
|
|
||||||
|
|
||||||
//tracer := logger.NewJSONLogger(nil, os.Stdout)
|
//tracer := logger.NewJSONLogger(nil, os.Stdout)
|
||||||
//Execute(loopingCode, nil, &Config{
|
//Execute(loopingCode, nil, &Config{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue