Closed chfast closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.08%. Comparing base (
fdc48da
) to head (cf6b23c
). Report is 1 commits behind head on master.
Another idea is having one since
revision + 2 flags legacy
and eof
, assuming when instruction is activated in both, it's always activated in the same revision.
Argument against can be that it can be seen as some old opcodes are activated before Prague, but also have eof
flag, so might be interpreted as "activated in eof before Prague", but I think it shouldn't influnce execution, it's equivalent to the table before this change.
Another idea is having one
since
revision + 2 flagslegacy
andeof
, assuming when instruction is activated in both, it's always activated in the same revision.Argument against can be that it can be seen as some old opcodes are activated before Prague, but also have
eof
flag, so might be interpreted as "activated in eof before Prague", but I think it shouldn't influnce execution, it's equivalent to the table before this change.
I considered this but this is less generic, requires one more field, and the main usage (build cost table) would need to use both revision+flag anyway.
Add
std::optional<evmc_revision> eof_since
to theinstr::traits
with the information in which EVM revision an instruction has become valid in EOF.Using
std::optional
has some inconvenience: thestd::nullopt
is less-than any concrete value (think "Frontier-1") while for undefined instructions we rather want to assign +infinity.