mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
More aggresive gas counting optimization: do not commit cost before SSTORE.
This commit is contained in:
parent
c5ebca65d5
commit
c5de54dbb0
1 changed files with 0 additions and 3 deletions
|
|
@ -87,7 +87,6 @@ bool isCostBlockEnd(Instruction _inst)
|
|||
|
||||
switch (_inst)
|
||||
{
|
||||
case Instruction::SSTORE:
|
||||
case Instruction::GAS:
|
||||
return true;
|
||||
|
||||
|
|
@ -164,8 +163,6 @@ void GasMeter::countExp(llvm::Value* _exponent)
|
|||
|
||||
void GasMeter::countSStore(Ext& _ext, llvm::Value* _index, llvm::Value* _newValue)
|
||||
{
|
||||
assert(!m_checkCall); // Everything should've been commited before
|
||||
|
||||
auto oldValue = _ext.sload(_index);
|
||||
auto oldValueIsZero = m_builder.CreateICmpEQ(oldValue, Constant::get(0), "oldValueIsZero");
|
||||
auto newValueIsZero = m_builder.CreateICmpEQ(_newValue, Constant::get(0), "newValueIsZero");
|
||||
|
|
|
|||
Loading…
Reference in a new issue