mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
reduce unnecessary solidity:: namespace
This commit is contained in:
@@ -106,7 +106,7 @@ BlockDeduplicator::BlockIterator& BlockDeduplicator::BlockIterator::operator++()
|
||||
{
|
||||
if (it == end)
|
||||
return *this;
|
||||
if (SemanticInformation::altersControlFlow(*it) && *it != AssemblyItem(solidity::Instruction::JUMPI))
|
||||
if (SemanticInformation::altersControlFlow(*it) && *it != AssemblyItem(Instruction::JUMPI))
|
||||
it = end;
|
||||
else
|
||||
{
|
||||
|
||||
@@ -84,13 +84,13 @@ GasMeter::GasConsumption GasMeter::estimateMax(AssemblyItem const& _item)
|
||||
break;
|
||||
case Instruction::MLOAD:
|
||||
case Instruction::MSTORE:
|
||||
gas += memoryGas(classes.find(solidity::Instruction::ADD, {
|
||||
gas += memoryGas(classes.find(Instruction::ADD, {
|
||||
m_state->relativeStackElement(0),
|
||||
classes.find(AssemblyItem(32))
|
||||
}));
|
||||
break;
|
||||
case Instruction::MSTORE8:
|
||||
gas += memoryGas(classes.find(solidity::Instruction::ADD, {
|
||||
gas += memoryGas(classes.find(Instruction::ADD, {
|
||||
m_state->relativeStackElement(0),
|
||||
classes.find(AssemblyItem(1))
|
||||
}));
|
||||
@@ -198,7 +198,7 @@ GasMeter::GasConsumption GasMeter::memoryGas(int _stackPosOffset, int _stackPosS
|
||||
if (classes.knownZero(m_state->relativeStackElement(_stackPosSize)))
|
||||
return GasConsumption(0);
|
||||
else
|
||||
return memoryGas(classes.find(solidity::Instruction::ADD, {
|
||||
return memoryGas(classes.find(Instruction::ADD, {
|
||||
m_state->relativeStackElement(_stackPosOffset),
|
||||
m_state->relativeStackElement(_stackPosSize)
|
||||
}));
|
||||
|
||||
@@ -76,7 +76,7 @@ GasMeter::GasConsumption PathGasMeter::handleQueueItem()
|
||||
bool branchStops = false;
|
||||
jumpTags.clear();
|
||||
AssemblyItem const& item = m_items.at(index);
|
||||
if (item.type() == Tag || item == AssemblyItem(solidity::Instruction::JUMPDEST))
|
||||
if (item.type() == Tag || item == AssemblyItem(Instruction::JUMPDEST))
|
||||
{
|
||||
// Do not allow any backwards jump. This is quite restrictive but should work for
|
||||
// the simplest things.
|
||||
@@ -84,14 +84,14 @@ GasMeter::GasConsumption PathGasMeter::handleQueueItem()
|
||||
return GasMeter::GasConsumption::infinite();
|
||||
path->visitedJumpdests.insert(index);
|
||||
}
|
||||
else if (item == AssemblyItem(solidity::Instruction::JUMP))
|
||||
else if (item == AssemblyItem(Instruction::JUMP))
|
||||
{
|
||||
branchStops = true;
|
||||
jumpTags = state->tagsInExpression(state->relativeStackElement(0));
|
||||
if (jumpTags.empty()) // unknown jump destination
|
||||
return GasMeter::GasConsumption::infinite();
|
||||
}
|
||||
else if (item == AssemblyItem(solidity::Instruction::JUMPI))
|
||||
else if (item == AssemblyItem(Instruction::JUMPI))
|
||||
{
|
||||
ExpressionClasses::Id condition = state->relativeStackElement(-1);
|
||||
if (classes.knownNonZero(condition) || !classes.knownZero(condition))
|
||||
|
||||
@@ -147,7 +147,7 @@ bool SemanticInformation::isDeterministic(AssemblyItem const& _item)
|
||||
}
|
||||
}
|
||||
|
||||
bool SemanticInformation::invalidatesMemory(solidity::Instruction _instruction)
|
||||
bool SemanticInformation::invalidatesMemory(Instruction _instruction)
|
||||
{
|
||||
switch (_instruction)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user