From 6d7e9b9b82a0cc4bf0dbb03dad03dc002ae1eb84 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Mon, 4 Nov 2024 15:05:59 +0100 Subject: [PATCH] core/vm/runtime: minor cleanup --- core/vm/runtime/runtime_test.go | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/core/vm/runtime/runtime_test.go b/core/vm/runtime/runtime_test.go index f68cc3ea40..dcdcb674d7 100644 --- a/core/vm/runtime/runtime_test.go +++ b/core/vm/runtime/runtime_test.go @@ -442,30 +442,22 @@ func BenchmarkSimpleLoop(b *testing.B) { // Call identity, and pop return value staticCallIdentity := p. StaticCall(nil, 0x4, 0, 0, 0, 0). - Op(vm.POP). // pop return value - Jump(lbl). // jump to label - Bytecode() + Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label p, lbl = program.New().Jumpdest() callIdentity := p. Call(nil, 0x4, 0, 0, 0, 0, 0). - Op(vm.POP). // pop return value - Jump(lbl). // jump to label - Bytecode() + Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label p, lbl = program.New().Jumpdest() callInexistant := p. Call(nil, 0xff, 0, 0, 0, 0, 0). - Op(vm.POP). // pop return value - Jump(lbl). // jump to label - Bytecode() + Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label p, lbl = program.New().Jumpdest() callEOA := p. Call(nil, 0xE0, 0, 0, 0, 0, 0). // call addr of EOA - Op(vm.POP). // pop return value - Jump(lbl). // jump to label - Bytecode() + Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label p, lbl = program.New().Jumpdest() // 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() callRevertingContractWithInput := p. Call(nil, 0xee, 0, 0, 0x20, 0x0, 0x0). - Op(vm.POP). - Jump(lbl). - Bytecode() + Op(vm.POP).Jump(lbl).Bytecode() // pop return value and jump to label //tracer := logger.NewJSONLogger(nil, os.Stdout) //Execute(loopingCode, nil, &Config{