Skip to content

Commit

Permalink
simplify EVM callback (#2282)
Browse files Browse the repository at this point in the history
The EVM callbacks currently don't require closures, so we can use
`nimcall` to reduce overhead slightly.
  • Loading branch information
arnetheduck authored Jun 2, 2024
1 parent 99f2ba7 commit 8b65834
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nimbus/evm/interpreter/op_handlers/oph_defs.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Nimbus
# Copyright (c) 2018-2023 Status Research & Development GmbH
# Copyright (c) 2018-2024 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
# http://www.apache.org/licenses/LICENSE-2.0)
Expand All @@ -20,11 +20,10 @@ import
type
Vm2Ctx* = tuple
cpt: Computation ## computation text
rc: int ## return code from op handler

Vm2OpFn* = ## general op handler, return codes are passed
## back via argument descriptor ``k``
proc(k: var Vm2Ctx) {.gcsafe, raises: [CatchableError].}
proc(k: var Vm2Ctx) {.nimcall, gcsafe, raises: [CatchableError].}


Vm2OpHanders* = tuple ## three step op code execution, typically
Expand Down

0 comments on commit 8b65834

Please sign in to comment.