nimbus-eth1/nimbus/vm2/interpreter
Jamie Lokier e2689792b0
vm2: Remove `toSymbolName` unnecessary symbol-text-symbol conversion
There's no need for macro `toSymbolName` to convert fork enum values to their
presentation texts (logging etc) then re-parse them back to a fork enum value.
`asFork` is already used in the same function and works without these steps,
so use it consistently.

Same applies to `op.toSymbolName` and `asOp`.

This makes the code simpler, and removes a text pattern-matching requirement.
The patch has been checked to confirm it doesn't change the compiled code.

Motivation: The forks list will be removed from VM because it is used outside
the VM as well.  Doing so highlighted vm2's `toSymbolName`.  It's not needed,
and it's best if the VM doesn't constrain text strings used outside the VM

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-01 16:54:38 +01:00
..
op_handlers disable EIP-2315: Simple Subroutines for the EVM 2021-05-17 01:29:03 +07:00
utils re-named some v2*.nim sources to its original name *.nim (without the v2) 2021-04-28 15:24:14 +03:00
forks_list.md provide identical copy of vm folder => vm2, activated by make flag ENABLE_VM2=1 2021-04-23 14:04:06 +03:00
forks_list.nim vm2: Remove `toSymbolName` unnecessary symbol-text-symbol conversion 2021-06-01 16:54:38 +01:00
forks_list.png provide identical copy of vm folder => vm2, activated by make flag ENABLE_VM2=1 2021-04-23 14:04:06 +03:00
gas_costs.nim eip2718: rename vm2 ChainId op code to ChainIdOp 2021-05-15 18:09:36 +07:00
gas_meter.nim re-named some v2*.nim sources to its original name *.nim (without the v2) 2021-04-28 15:24:14 +03:00
op_codes.nim vm2: Remove `toSymbolName` unnecessary symbol-text-symbol conversion 2021-06-01 16:54:38 +01:00
op_dispatcher.nim vm2: Remove `toSymbolName` unnecessary symbol-text-symbol conversion 2021-06-01 16:54:38 +01:00
op_handlers.nim removed kludge and simplified sources oph_call.nim and oph_create.nim 2021-04-28 15:24:14 +03:00