mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-05 00:36:45 +00:00
remove computedGoto pragma
This commit is contained in:
parent
fb97d8d0ce
commit
d37d7fa6a5
@ -211,7 +211,6 @@ proc opTableToCaseStmt(opTable: array[Op, NimNode], computation: NimNode): NimNo
|
|||||||
`opImpl`(`computation`)
|
`opImpl`(`computation`)
|
||||||
if `computation`.tracingEnabled:
|
if `computation`.tracingEnabled:
|
||||||
`computation`.traceOpCodeEnded(`asOp`, `computation`.opIndex)
|
`computation`.traceOpCodeEnded(`asOp`, `computation`.opIndex)
|
||||||
`instr` = `computation`.code.next()
|
|
||||||
else:
|
else:
|
||||||
quote do:
|
quote do:
|
||||||
if `computation`.tracingEnabled:
|
if `computation`.tracingEnabled:
|
||||||
@ -221,8 +220,6 @@ proc opTableToCaseStmt(opTable: array[Op, NimNode], computation: NimNode): NimNo
|
|||||||
`computation`.traceOpCodeEnded(`asOp`, `computation`.opIndex)
|
`computation`.traceOpCodeEnded(`asOp`, `computation`.opIndex)
|
||||||
when `asOp` in {Return, Revert, SelfDestruct}:
|
when `asOp` in {Return, Revert, SelfDestruct}:
|
||||||
break
|
break
|
||||||
else:
|
|
||||||
`instr` = `computation`.code.next()
|
|
||||||
|
|
||||||
result.add nnkOfBranch.newTree(
|
result.add nnkOfBranch.newTree(
|
||||||
newIdentNode($op),
|
newIdentNode($op),
|
||||||
@ -233,9 +230,11 @@ proc opTableToCaseStmt(opTable: array[Op, NimNode], computation: NimNode): NimNo
|
|||||||
result = quote do:
|
result = quote do:
|
||||||
if `computation`.tracingEnabled:
|
if `computation`.tracingEnabled:
|
||||||
`computation`.prepareTracer()
|
`computation`.prepareTracer()
|
||||||
`computation`.instr = `computation`.code.next()
|
|
||||||
while true:
|
while true:
|
||||||
{.computedGoto.}
|
`instr` = `computation`.code.next()
|
||||||
|
#{.computedGoto.}
|
||||||
|
# computed goto causing stack overflow, it consumes a lot of space
|
||||||
|
# we could use manual jump table instead
|
||||||
# TODO lots of macro magic here to unravel, with chronicles...
|
# TODO lots of macro magic here to unravel, with chronicles...
|
||||||
# `computation`.logger.log($`computation`.stack & "\n\n", fgGreen)
|
# `computation`.logger.log($`computation`.stack & "\n\n", fgGreen)
|
||||||
`result`
|
`result`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user