mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Mark a lot of functions static (where possible)
This commit is contained in:
@@ -159,7 +159,7 @@ AssemblyItems CodeCopyMethod::execute(Assembly& _assembly) const
|
||||
return actualCopyRoutine;
|
||||
}
|
||||
|
||||
AssemblyItems const& CodeCopyMethod::copyRoutine() const
|
||||
AssemblyItems const& CodeCopyMethod::copyRoutine()
|
||||
{
|
||||
AssemblyItems static copyRoutine{
|
||||
u256(0),
|
||||
@@ -234,7 +234,7 @@ AssemblyItems ComputeMethod::findRepresentation(u256 const& _value)
|
||||
}
|
||||
}
|
||||
|
||||
bool ComputeMethod::checkRepresentation(u256 const& _value, AssemblyItems const& _routine) const
|
||||
bool ComputeMethod::checkRepresentation(u256 const& _value, AssemblyItems const& _routine)
|
||||
{
|
||||
// This is a tiny EVM that can only evaluate some instructions.
|
||||
vector<u256> stack;
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
virtual AssemblyItems execute(Assembly& _assembly) const override;
|
||||
|
||||
protected:
|
||||
AssemblyItems const& copyRoutine() const;
|
||||
static AssemblyItems const& copyRoutine();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -151,7 +151,7 @@ protected:
|
||||
/// Tries to recursively find a way to compute @a _value.
|
||||
AssemblyItems findRepresentation(u256 const& _value);
|
||||
/// Recomputes the value from the calculated representation and checks for correctness.
|
||||
bool checkRepresentation(u256 const& _value, AssemblyItems const& _routine) const;
|
||||
static bool checkRepresentation(u256 const& _value, AssemblyItems const& _routine);
|
||||
bigint gasNeeded(AssemblyItems const& _routine) const;
|
||||
|
||||
/// Counter for the complexity of optimization, will stop when it reaches zero.
|
||||
|
||||
Reference in New Issue
Block a user