Fix sstore handling in Processor
authorGuido Trotter <ultrotter@google.com>
Mon, 30 Jun 2008 16:11:48 +0000 (16:11 +0000)
committerGuido Trotter <ultrotter@google.com>
Mon, 30 Jun 2008 16:11:48 +0000 (16:11 +0000)
commitc6868e1d7fd7ce6179942b2b909686d0a9ec2b0b
tree0d7a492a734cb6210c04c05b606261754cac672a
parentd2525573743080df1fd1acfcf73c25470d5d5443
Fix sstore handling in Processor

- no need to keep the sstore as an object member, remove it
- don't reinitialize sstore only if self.cfg is None
    This is not an issue, as the Processor is recycled for every opcode,
    but in general we know that (a) we might need a different type of
    sstore for different opcodes and (b) initializating them is cheap
- recreate sstore when chaining opcodes
    Without this fix chaining an opcode which requires a writable sstore
    to one which doesn't would fail. This doesn't happen today, but it's
    better to fix it anyway

These changes are possible because nowadays all opcodes already require
a working cluster/configuration.

Reviewed-by: iustinp
lib/mcpu.py