mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[yul] Functions: Remove dependency on AST ID.
This commit is contained in:
@@ -152,6 +152,14 @@ public:
|
||||
bool inlineAssemblySeen() const { return m_inlineAssemblySeen; }
|
||||
void setInlineAssemblySeen() { m_inlineAssemblySeen = true; }
|
||||
|
||||
/// @returns the runtime ID to be used for the function in the dispatch routine
|
||||
/// and for internal function pointers.
|
||||
/// @param _requirePresent if false, generates a new ID if not yet done.
|
||||
uint64_t internalFunctionID(FunctionDefinition const& _function, bool _requirePresent);
|
||||
/// Copies the internal function IDs from the @a _other. For use in transferring
|
||||
/// function IDs from constructor code to deployed code.
|
||||
void copyFunctionIDsFrom(IRGenerationContext const& _other);
|
||||
|
||||
std::map<std::string, unsigned> const& sourceIndices() const { return m_sourceIndices; }
|
||||
|
||||
private:
|
||||
@@ -191,6 +199,8 @@ private:
|
||||
/// the code contains a call via a pointer even though a specific function is never assigned to it.
|
||||
/// It will fail at runtime but the code must still compile.
|
||||
InternalDispatchMap m_internalDispatchMap;
|
||||
/// Map used by @a internalFunctionID.
|
||||
std::map<int64_t, uint64_t> m_functionIDs;
|
||||
|
||||
std::set<ContractDefinition const*, ASTNode::CompareByID> m_subObjects;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user