nimbus-eth1/nimbus/vm2
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
..
interpreter vm2: Remove `toSymbolName` unnecessary symbol-text-symbol conversion 2021-06-01 16:54:38 +01:00
blake2b_f.nim provide identical copy of vm folder => vm2, activated by make flag ENABLE_VM2=1 2021-04-23 14:04:06 +03:00
blscurve.nim provide identical copy of vm folder => vm2, activated by make flag ENABLE_VM2=1 2021-04-23 14:04:06 +03:00
code_stream.nim eliminated v2opcode_values, v2forks in favour of op_codes, forks_list 2021-04-28 15:24:14 +03:00
computation.nim re-named compu_helper.nim => computation.nim 2021-04-28 15:24:14 +03:00
interpreter_dispatch.nim re-named compu_helper.nim => computation.nim 2021-04-28 15:24:14 +03:00
map_to_curve_g1.nim provide identical copy of vm folder => vm2, activated by make flag ENABLE_VM2=1 2021-04-23 14:04:06 +03:00
memory.nim re-named some v2*.nim sources to its original name *.nim (without the v2) 2021-04-28 15:24:14 +03:00
message.nim re-named some v2*.nim sources to its original name *.nim (without the v2) 2021-04-28 15:24:14 +03:00
nimdoc.cfg update doc generator 2021-04-28 15:24:14 +03:00
precompiles.nim disable EIP-2537: Precompile for BLS12-381 curve operations 2021-05-17 01:29:03 +07:00
stack.nim re-named some v2state_transactions.nim to its original name without the v2 2021-04-28 15:24:14 +03:00
state.nim drop PublicNetwork enum usage and replace it with NetworkId 2021-05-20 14:04:16 +07:00
state_transactions.nim fixes `getRecipient`: using `sender` param instead of calculating sender itself 2021-05-04 15:31:47 +07:00
transaction_tracer.nim re-named some v2*.nim sources to its original name *.nim (without the v2) 2021-04-28 15:24:14 +03:00
types.nim re-named some v2state_transactions.nim to its original name without the v2 2021-04-28 15:24:14 +03:00