mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Mappings.
This commit is contained in:
@@ -35,6 +35,7 @@ namespace solidity
|
||||
|
||||
class Type;
|
||||
class ArrayType;
|
||||
class MappingType;
|
||||
|
||||
/**
|
||||
* Component that can generate various useful Yul functions.
|
||||
@@ -98,6 +99,11 @@ public:
|
||||
/// Only works for memory arrays, calldata arrays and storage arrays that store one item per slot.
|
||||
std::string nextArrayElementFunction(ArrayType const& _type);
|
||||
|
||||
/// @returns the name of a function that performs index access for mappings.
|
||||
/// @param _mappingType the type of the mapping
|
||||
/// @param _keyType the type of the value provided
|
||||
std::string mappingIndexAccessFunction(MappingType const& _mappingType, Type const& _keyType);
|
||||
|
||||
/// @returns a function that reads a value type from storage.
|
||||
/// Performs bit mask/sign extend cleanup and appropriate left / right shift, but not validation.
|
||||
/// @param _splitFunctionTypes if false, returns the address and function signature in a
|
||||
|
||||
Reference in New Issue
Block a user