mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
If statement for Iulia / inline assembly.
This commit is contained in:
@@ -217,6 +217,19 @@ void CodeTransform::operator()(assembly::Instruction const& _instruction)
|
||||
checkStackHeight(&_instruction);
|
||||
}
|
||||
|
||||
void CodeTransform::operator()(If const& _if)
|
||||
{
|
||||
visitExpression(*_if.condition);
|
||||
m_assembly.setSourceLocation(_if.location);
|
||||
m_assembly.appendInstruction(solidity::Instruction::ISZERO);
|
||||
AbstractAssembly::LabelID end = m_assembly.newLabelId();
|
||||
m_assembly.appendJumpToIf(end);
|
||||
(*this)(_if.body);
|
||||
m_assembly.setSourceLocation(_if.location);
|
||||
m_assembly.appendLabel(end);
|
||||
checkStackHeight(&_if);
|
||||
}
|
||||
|
||||
void CodeTransform::operator()(Switch const& _switch)
|
||||
{
|
||||
//@TODO use JUMPV in EVM1.5?
|
||||
|
||||
@@ -104,6 +104,7 @@ public:
|
||||
void operator()(solidity::assembly::StackAssignment const& _assignment);
|
||||
void operator()(solidity::assembly::Assignment const& _assignment);
|
||||
void operator()(solidity::assembly::VariableDeclaration const& _varDecl);
|
||||
void operator()(solidity::assembly::If const& _if);
|
||||
void operator()(solidity::assembly::Switch const& _switch);
|
||||
void operator()(solidity::assembly::FunctionDefinition const&);
|
||||
void operator()(solidity::assembly::ForLoop const&);
|
||||
|
||||
Reference in New Issue
Block a user