As we have the gas costs of each instruction we can add the gas cost information to each segment.
If the segment does not use memory/storage-size-dependent instructions (e.g. MSTORE, MLOAD, CALLDATACOPY, etc) we get an exact value for the segment. Otherwise we get a lower bound (memory expansion adds cost).
To do
Add computation of lower bound gas cost for segments.
Add it to the info (tooltip) for the segment.
If gas cost can be computed exactly, display something like gas == val and otherwise gas >= val.
As we have the gas costs of each instruction we can add the gas cost information to each segment. If the segment does not use memory/storage-size-dependent instructions (e.g. MSTORE, MLOAD, CALLDATACOPY, etc) we get an exact value for the segment. Otherwise we get a lower bound (memory expansion adds cost).
To do
Add computation of lower bound gas cost for segments. Add it to the info (tooltip) for the segment. If gas cost can be computed exactly, display something like gas == val and otherwise gas >= val.