mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Implement subroutines for yul functions.
This commit is contained in:
committed by
Alex Beregszaszi
parent
dca85a286d
commit
cc04085b9e
@@ -132,6 +132,7 @@ void CompilerContext::callLowLevelFunction(
|
||||
|
||||
*this << lowLevelFunctionTag(_name, _inArgs, _outArgs, _generator);
|
||||
|
||||
// TODO could use jumpsub?
|
||||
appendJump(evmasm::AssemblyItem::JumpType::IntoFunction);
|
||||
adjustStackOffset(static_cast<int>(_outArgs) - 1 - static_cast<int>(_inArgs));
|
||||
*this << retTag.tag();
|
||||
|
||||
@@ -505,6 +505,7 @@ void ContractCompiler::appendFunctionSelector(ContractDefinition const& _contrac
|
||||
m_context << Instruction::DUP1 << Instruction::CALLDATASIZE << Instruction::SUB;
|
||||
CompilerUtils(m_context).abiDecode(functionType->parameterTypes());
|
||||
}
|
||||
// TODO could use JUMPSUB?
|
||||
m_context.appendJumpTo(
|
||||
m_context.functionEntryLabel(functionType->declaration()),
|
||||
evmasm::AssemblyItem::JumpType::IntoFunction
|
||||
|
||||
@@ -614,6 +614,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
||||
// Extract the runtime part.
|
||||
m_context << ((u256(1) << 32) - 1) << Instruction::AND;
|
||||
|
||||
// TODO could use jumpsub
|
||||
m_context.appendJump(evmasm::AssemblyItem::JumpType::IntoFunction);
|
||||
m_context << returnLabel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user