mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9925 from ethereum/develop
Merge develop into breaking.
This commit is contained in:
+13
-3
@@ -566,7 +566,10 @@ public:
|
||||
ASTPointer<UserDefinedTypeName> _baseName,
|
||||
std::unique_ptr<std::vector<ASTPointer<Expression>>> _arguments
|
||||
):
|
||||
ASTNode(_id, _location), m_baseName(std::move(_baseName)), m_arguments(std::move(_arguments)) {}
|
||||
ASTNode(_id, _location), m_baseName(std::move(_baseName)), m_arguments(std::move(_arguments))
|
||||
{
|
||||
solAssert(m_baseName != nullptr, "Name cannot be null.");
|
||||
}
|
||||
|
||||
void accept(ASTVisitor& _visitor) override;
|
||||
void accept(ASTConstVisitor& _visitor) const override;
|
||||
@@ -596,7 +599,10 @@ public:
|
||||
ASTPointer<UserDefinedTypeName> _libraryName,
|
||||
ASTPointer<TypeName> _typeName
|
||||
):
|
||||
ASTNode(_id, _location), m_libraryName(std::move(_libraryName)), m_typeName(std::move(_typeName)) {}
|
||||
ASTNode(_id, _location), m_libraryName(std::move(_libraryName)), m_typeName(std::move(_typeName))
|
||||
{
|
||||
solAssert(m_libraryName != nullptr, "Name cannot be null.");
|
||||
}
|
||||
|
||||
void accept(ASTVisitor& _visitor) override;
|
||||
void accept(ASTConstVisitor& _visitor) const override;
|
||||
@@ -1052,7 +1058,10 @@ public:
|
||||
ASTPointer<Identifier> _name,
|
||||
std::unique_ptr<std::vector<ASTPointer<Expression>>> _arguments
|
||||
):
|
||||
ASTNode(_id, _location), m_modifierName(std::move(_name)), m_arguments(std::move(_arguments)) {}
|
||||
ASTNode(_id, _location), m_modifierName(std::move(_name)), m_arguments(std::move(_arguments))
|
||||
{
|
||||
solAssert(m_modifierName != nullptr, "Name cannot be null.");
|
||||
}
|
||||
|
||||
void accept(ASTVisitor& _visitor) override;
|
||||
void accept(ASTConstVisitor& _visitor) const override;
|
||||
@@ -1195,6 +1204,7 @@ class UserDefinedTypeName: public TypeName
|
||||
public:
|
||||
UserDefinedTypeName(int64_t _id, SourceLocation const& _location, std::vector<ASTString> _namePath):
|
||||
TypeName(_id, _location), m_namePath(std::move(_namePath)) {}
|
||||
|
||||
void accept(ASTVisitor& _visitor) override;
|
||||
void accept(ASTConstVisitor& _visitor) const override;
|
||||
|
||||
|
||||
@@ -264,6 +264,8 @@ struct IdentifierAnnotation: ExpressionAnnotation
|
||||
{
|
||||
/// Referenced declaration, set at latest during overload resolution stage.
|
||||
Declaration const* referencedDeclaration = nullptr;
|
||||
/// What kind of lookup needs to be done (static, virtual, super) find the declaration.
|
||||
SetOnce<VirtualLookup> requiredLookup;
|
||||
/// List of possible declarations it could refer to (can contain duplicates).
|
||||
std::vector<Declaration const*> candidateDeclarations;
|
||||
/// List of possible declarations it could refer to.
|
||||
@@ -274,6 +276,8 @@ struct MemberAccessAnnotation: ExpressionAnnotation
|
||||
{
|
||||
/// Referenced declaration, set at latest during overload resolution stage.
|
||||
Declaration const* referencedDeclaration = nullptr;
|
||||
/// What kind of lookup needs to be done (static, virtual, super) find the declaration.
|
||||
SetOnce<VirtualLookup> requiredLookup;
|
||||
};
|
||||
|
||||
struct BinaryOperationAnnotation: ExpressionAnnotation
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
namespace solidity::frontend
|
||||
{
|
||||
|
||||
/// Possible lookups for function resolving
|
||||
enum class VirtualLookup { Static, Virtual, Super };
|
||||
|
||||
// How a function can mutate the EVM state.
|
||||
enum class StateMutability { Pure, View, NonPayable, Payable };
|
||||
|
||||
|
||||
@@ -1380,7 +1380,9 @@ private:
|
||||
bool const m_arbitraryParameters = false;
|
||||
bool const m_gasSet = false; ///< true iff the gas value to be used is on the stack
|
||||
bool const m_valueSet = false; ///< true iff the value to be sent is on the stack
|
||||
bool const m_bound = false; ///< true iff the function is called as arg1.fun(arg2, ..., argn)
|
||||
/// true iff the function is called as arg1.fun(arg2, ..., argn).
|
||||
/// This is achieved through the "using for" directive.
|
||||
bool const m_bound = false;
|
||||
Declaration const* m_declaration = nullptr;
|
||||
bool m_saltSet = false; ///< true iff the salt value to be used is on the stack
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user