aboutsummaryrefslogtreecommitdiffstats
path: root/libyul
diff options
context:
space:
mode:
authormordax <maya@mordax.io>2018-11-16 09:09:04 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-11-21 22:37:32 +0800
commitea8b7d803ebd151401be7479f48afb0ad19f5f74 (patch)
treebe363297661531057296c468c15c5003510540d5 /libyul
parentd3f66ca0fab130e801b012bd192e1e8e97fb3761 (diff)
downloaddexon-solidity-ea8b7d803ebd151401be7479f48afb0ad19f5f74.tar.gz
dexon-solidity-ea8b7d803ebd151401be7479f48afb0ad19f5f74.tar.zst
dexon-solidity-ea8b7d803ebd151401be7479f48afb0ad19f5f74.zip
Removing redundant virtual from override function declaration
Remove trailing whitespace Remove changelog change
Diffstat (limited to 'libyul')
-rw-r--r--libyul/backends/evm/EVMAssembly.h32
-rw-r--r--libyul/optimiser/ASTCopier.h30
-rw-r--r--libyul/optimiser/CommonSubexpressionEliminator.h2
-rw-r--r--libyul/optimiser/DataFlowAnalyzer.h14
-rw-r--r--libyul/optimiser/Disambiguator.h10
-rw-r--r--libyul/optimiser/ExpressionInliner.h4
-rw-r--r--libyul/optimiser/ExpressionSplitter.h12
-rw-r--r--libyul/optimiser/FullInliner.h8
-rw-r--r--libyul/optimiser/InlinableExpressionFunctionFinder.h6
-rw-r--r--libyul/optimiser/Metrics.h4
-rw-r--r--libyul/optimiser/NameCollector.h6
-rw-r--r--libyul/optimiser/Rematerialiser.h2
-rw-r--r--libyul/optimiser/SSAValueTracker.h4
-rw-r--r--libyul/optimiser/Semantics.h8
-rw-r--r--libyul/optimiser/Substitution.h2
-rw-r--r--libyul/optimiser/UnusedPruner.h2
16 files changed, 73 insertions, 73 deletions
diff --git a/libyul/backends/evm/EVMAssembly.h b/libyul/backends/evm/EVMAssembly.h
index 556ed5a5..8f92b6e7 100644
--- a/libyul/backends/evm/EVMAssembly.h
+++ b/libyul/backends/evm/EVMAssembly.h
@@ -38,42 +38,42 @@ public:
virtual ~EVMAssembly() {}
/// Set a new source location valid starting from the next instruction.
- virtual void setSourceLocation(SourceLocation const& _location) override;
+ void setSourceLocation(SourceLocation const& _location) override;
/// Retrieve the current height of the stack. This does not have to be zero
/// at the beginning.
- virtual int stackHeight() const override { return m_stackHeight; }
+ int stackHeight() const override { return m_stackHeight; }
/// Append an EVM instruction.
- virtual void appendInstruction(solidity::Instruction _instruction) override;
+ void appendInstruction(solidity::Instruction _instruction) override;
/// Append a constant.
- virtual void appendConstant(u256 const& _constant) override;
+ void appendConstant(u256 const& _constant) override;
/// Append a label.
- virtual void appendLabel(LabelID _labelId) override;
+ void appendLabel(LabelID _labelId) override;
/// Append a label reference.
- virtual void appendLabelReference(LabelID _labelId) override;
+ void appendLabelReference(LabelID _labelId) override;
/// Generate a new unique label.
- virtual LabelID newLabelId() override;
+ LabelID newLabelId() override;
/// Returns a label identified by the given name. Creates it if it does not yet exist.
- virtual LabelID namedLabel(std::string const& _name) override;
+ LabelID namedLabel(std::string const& _name) override;
/// Append a reference to a to-be-linked symbol.
/// Currently, we assume that the value is always a 20 byte number.
- virtual void appendLinkerSymbol(std::string const& _name) override;
+ void appendLinkerSymbol(std::string const& _name) override;
/// Append a jump instruction.
/// @param _stackDiffAfter the stack adjustment after this instruction.
- virtual void appendJump(int _stackDiffAfter) override;
+ void appendJump(int _stackDiffAfter) override;
/// Append a jump-to-immediate operation.
- virtual void appendJumpTo(LabelID _labelId, int _stackDiffAfter) override;
+ void appendJumpTo(LabelID _labelId, int _stackDiffAfter) override;
/// Append a jump-to-if-immediate operation.
- virtual void appendJumpToIf(LabelID _labelId) override;
+ void appendJumpToIf(LabelID _labelId) override;
/// Start a subroutine.
- virtual void appendBeginsub(LabelID _labelId, int _arguments) override;
+ void appendBeginsub(LabelID _labelId, int _arguments) override;
/// Call a subroutine.
- virtual void appendJumpsub(LabelID _labelId, int _arguments, int _returns) override;
+ void appendJumpsub(LabelID _labelId, int _arguments, int _returns) override;
/// Return from a subroutine.
- virtual void appendReturnsub(int _returns, int _stackDiffAfter) override;
+ void appendReturnsub(int _returns, int _stackDiffAfter) override;
/// Append the assembled size as a constant.
- virtual void appendAssemblySize() override;
+ void appendAssemblySize() override;
/// Resolves references inside the bytecode and returns the linker object.
eth::LinkerObject finalize();
diff --git a/libyul/optimiser/ASTCopier.h b/libyul/optimiser/ASTCopier.h
index b6aceee3..95e58a56 100644
--- a/libyul/optimiser/ASTCopier.h
+++ b/libyul/optimiser/ASTCopier.h
@@ -71,21 +71,21 @@ class ASTCopier: public ExpressionCopier, public StatementCopier
{
public:
virtual ~ASTCopier() = default;
- virtual Expression operator()(Literal const& _literal) override;
- virtual Statement operator()(Instruction const& _instruction) override;
- virtual Expression operator()(Identifier const& _identifier) override;
- virtual Expression operator()(FunctionalInstruction const& _instr) override;
- virtual Expression operator()(FunctionCall const&) override;
- virtual Statement operator()(ExpressionStatement const& _statement) override;
- virtual Statement operator()(Label const& _label) override;
- virtual Statement operator()(StackAssignment const& _assignment) override;
- virtual Statement operator()(Assignment const& _assignment) override;
- virtual Statement operator()(VariableDeclaration const& _varDecl) override;
- virtual Statement operator()(If const& _if) override;
- virtual Statement operator()(Switch const& _switch) override;
- virtual Statement operator()(FunctionDefinition const&) override;
- virtual Statement operator()(ForLoop const&) override;
- virtual Statement operator()(Block const& _block) override;
+ Expression operator()(Literal const& _literal) override;
+ Statement operator()(Instruction const& _instruction) override;
+ Expression operator()(Identifier const& _identifier) override;
+ Expression operator()(FunctionalInstruction const& _instr) override;
+ Expression operator()(FunctionCall const&) override;
+ Statement operator()(ExpressionStatement const& _statement) override;
+ Statement operator()(Label const& _label) override;
+ Statement operator()(StackAssignment const& _assignment) override;
+ Statement operator()(Assignment const& _assignment) override;
+ Statement operator()(VariableDeclaration const& _varDecl) override;
+ Statement operator()(If const& _if) override;
+ Statement operator()(Switch const& _switch) override;
+ Statement operator()(FunctionDefinition const&) override;
+ Statement operator()(ForLoop const&) override;
+ Statement operator()(Block const& _block) override;
virtual Expression translate(Expression const& _expression);
virtual Statement translate(Statement const& _statement);
diff --git a/libyul/optimiser/CommonSubexpressionEliminator.h b/libyul/optimiser/CommonSubexpressionEliminator.h
index f8aa0ee1..16b39f5b 100644
--- a/libyul/optimiser/CommonSubexpressionEliminator.h
+++ b/libyul/optimiser/CommonSubexpressionEliminator.h
@@ -38,7 +38,7 @@ class CommonSubexpressionEliminator: public DataFlowAnalyzer
{
protected:
using ASTModifier::visit;
- virtual void visit(Expression& _e) override;
+ void visit(Expression& _e) override;
};
}
diff --git a/libyul/optimiser/DataFlowAnalyzer.h b/libyul/optimiser/DataFlowAnalyzer.h
index a0c21eee..a946529a 100644
--- a/libyul/optimiser/DataFlowAnalyzer.h
+++ b/libyul/optimiser/DataFlowAnalyzer.h
@@ -45,13 +45,13 @@ class DataFlowAnalyzer: public ASTModifier
{
public:
using ASTModifier::operator();
- virtual void operator()(Assignment& _assignment) override;
- virtual void operator()(VariableDeclaration& _varDecl) override;
- virtual void operator()(If& _if) override;
- virtual void operator()(Switch& _switch) override;
- virtual void operator()(FunctionDefinition&) override;
- virtual void operator()(ForLoop&) override;
- virtual void operator()(Block& _block) override;
+ void operator()(Assignment& _assignment) override;
+ void operator()(VariableDeclaration& _varDecl) override;
+ void operator()(If& _if) override;
+ void operator()(Switch& _switch) override;
+ void operator()(FunctionDefinition&) override;
+ void operator()(ForLoop&) override;
+ void operator()(Block& _block) override;
protected:
/// Registers the assignment.
diff --git a/libyul/optimiser/Disambiguator.h b/libyul/optimiser/Disambiguator.h
index bfb65682..0fcd41d9 100644
--- a/libyul/optimiser/Disambiguator.h
+++ b/libyul/optimiser/Disambiguator.h
@@ -52,11 +52,11 @@ public:
}
protected:
- virtual void enterScope(Block const& _block) override;
- virtual void leaveScope(Block const& _block) override;
- virtual void enterFunction(FunctionDefinition const& _function) override;
- virtual void leaveFunction(FunctionDefinition const& _function) override;
- virtual YulString translateIdentifier(YulString _name) override;
+ void enterScope(Block const& _block) override;
+ void leaveScope(Block const& _block) override;
+ void enterFunction(FunctionDefinition const& _function) override;
+ void leaveFunction(FunctionDefinition const& _function) override;
+ YulString translateIdentifier(YulString _name) override;
void enterScopeInternal(solidity::assembly::Scope& _scope);
void leaveScopeInternal(solidity::assembly::Scope& _scope);
diff --git a/libyul/optimiser/ExpressionInliner.h b/libyul/optimiser/ExpressionInliner.h
index d903664f..ee98da8f 100644
--- a/libyul/optimiser/ExpressionInliner.h
+++ b/libyul/optimiser/ExpressionInliner.h
@@ -54,9 +54,9 @@ public:
void run();
using ASTModifier::operator();
- virtual void operator()(FunctionDefinition& _fun) override;
+ void operator()(FunctionDefinition& _fun) override;
- virtual void visit(Expression& _expression) override;
+ void visit(Expression& _expression) override;
private:
std::map<YulString, FunctionDefinition const*> m_inlinableFunctions;
diff --git a/libyul/optimiser/ExpressionSplitter.h b/libyul/optimiser/ExpressionSplitter.h
index 339acbf0..82274203 100644
--- a/libyul/optimiser/ExpressionSplitter.h
+++ b/libyul/optimiser/ExpressionSplitter.h
@@ -63,12 +63,12 @@ public:
m_nameDispenser(_nameDispenser)
{ }
- virtual void operator()(FunctionalInstruction&) override;
- virtual void operator()(FunctionCall&) override;
- virtual void operator()(If&) override;
- virtual void operator()(Switch&) override;
- virtual void operator()(ForLoop&) override;
- virtual void operator()(Block& _block) override;
+ void operator()(FunctionalInstruction&) override;
+ void operator()(FunctionCall&) override;
+ void operator()(If&) override;
+ void operator()(Switch&) override;
+ void operator()(ForLoop&) override;
+ void operator()(Block& _block) override;
private:
/// Replaces the expression by a variable if it is a function call or functional
diff --git a/libyul/optimiser/FullInliner.h b/libyul/optimiser/FullInliner.h
index 66ce8e2f..8243160d 100644
--- a/libyul/optimiser/FullInliner.h
+++ b/libyul/optimiser/FullInliner.h
@@ -110,7 +110,7 @@ public:
m_nameDispenser(_nameDispenser)
{ }
- virtual void operator()(Block& _block) override;
+ void operator()(Block& _block) override;
private:
boost::optional<std::vector<Statement>> tryInlineStatement(Statement& _statement);
@@ -141,10 +141,10 @@ public:
using ASTCopier::operator ();
- virtual Statement operator()(VariableDeclaration const& _varDecl) override;
- virtual Statement operator()(FunctionDefinition const& _funDef) override;
+ Statement operator()(VariableDeclaration const& _varDecl) override;
+ Statement operator()(FunctionDefinition const& _funDef) override;
- virtual YulString translateIdentifier(YulString _name) override;
+ YulString translateIdentifier(YulString _name) override;
NameDispenser& m_nameDispenser;
YulString m_varNamePrefix;
diff --git a/libyul/optimiser/InlinableExpressionFunctionFinder.h b/libyul/optimiser/InlinableExpressionFunctionFinder.h
index baf4bbfc..a96f042f 100644
--- a/libyul/optimiser/InlinableExpressionFunctionFinder.h
+++ b/libyul/optimiser/InlinableExpressionFunctionFinder.h
@@ -49,9 +49,9 @@ public:
}
using ASTWalker::operator();
- virtual void operator()(Identifier const& _identifier) override;
- virtual void operator()(FunctionCall const& _funCall) override;
- virtual void operator()(FunctionDefinition const& _function) override;
+ void operator()(Identifier const& _identifier) override;
+ void operator()(FunctionCall const& _funCall) override;
+ void operator()(FunctionDefinition const& _function) override;
private:
void checkAllowed(YulString _name)
diff --git a/libyul/optimiser/Metrics.h b/libyul/optimiser/Metrics.h
index 47c7ec79..e65110a8 100644
--- a/libyul/optimiser/Metrics.h
+++ b/libyul/optimiser/Metrics.h
@@ -41,8 +41,8 @@ public:
static size_t codeSize(Block const& _block);
private:
- virtual void visit(Statement const& _statement) override;
- virtual void visit(Expression const& _expression) override;
+ void visit(Statement const& _statement) override;
+ void visit(Expression const& _expression) override;
private:
size_t m_size = 0;
diff --git a/libyul/optimiser/NameCollector.h b/libyul/optimiser/NameCollector.h
index b76eec30..8ef0178d 100644
--- a/libyul/optimiser/NameCollector.h
+++ b/libyul/optimiser/NameCollector.h
@@ -42,8 +42,8 @@ public:
}
using ASTWalker::operator ();
- virtual void operator()(VariableDeclaration const& _varDecl) override;
- virtual void operator()(FunctionDefinition const& _funDef) override;
+ void operator()(VariableDeclaration const& _varDecl) override;
+ void operator()(FunctionDefinition const& _funDef) override;
std::set<YulString> names() const { return m_names; }
private:
@@ -75,7 +75,7 @@ class Assignments: public ASTWalker
{
public:
using ASTWalker::operator ();
- virtual void operator()(Assignment const& _assignment) override;
+ void operator()(Assignment const& _assignment) override;
std::set<YulString> const& names() const { return m_names; }
private:
diff --git a/libyul/optimiser/Rematerialiser.h b/libyul/optimiser/Rematerialiser.h
index f82465eb..f0e7cb01 100644
--- a/libyul/optimiser/Rematerialiser.h
+++ b/libyul/optimiser/Rematerialiser.h
@@ -36,7 +36,7 @@ class Rematerialiser: public DataFlowAnalyzer
{
protected:
using ASTModifier::visit;
- virtual void visit(Expression& _e) override;
+ void visit(Expression& _e) override;
};
diff --git a/libyul/optimiser/SSAValueTracker.h b/libyul/optimiser/SSAValueTracker.h
index d1539c86..acd5229c 100644
--- a/libyul/optimiser/SSAValueTracker.h
+++ b/libyul/optimiser/SSAValueTracker.h
@@ -41,8 +41,8 @@ class SSAValueTracker: public ASTWalker
{
public:
using ASTWalker::operator();
- virtual void operator()(VariableDeclaration const& _varDecl) override;
- virtual void operator()(Assignment const& _assignment) override;
+ void operator()(VariableDeclaration const& _varDecl) override;
+ void operator()(Assignment const& _assignment) override;
std::map<YulString, Expression const*> const& values() const { return m_values; }
Expression const* value(YulString _name) const { return m_values.at(_name); }
diff --git a/libyul/optimiser/Semantics.h b/libyul/optimiser/Semantics.h
index 620a91cb..a7e8706b 100644
--- a/libyul/optimiser/Semantics.h
+++ b/libyul/optimiser/Semantics.h
@@ -38,12 +38,12 @@ public:
MovableChecker() = default;
explicit MovableChecker(Expression const& _expression);
- virtual void operator()(Identifier const& _identifier) override;
- virtual void operator()(FunctionalInstruction const& _functionalInstruction) override;
- virtual void operator()(FunctionCall const& _functionCall) override;
+ void operator()(Identifier const& _identifier) override;
+ void operator()(FunctionalInstruction const& _functionalInstruction) override;
+ void operator()(FunctionCall const& _functionCall) override;
/// Disallow visiting anything apart from Expressions (this throws).
- virtual void visit(Statement const&) override;
+ void visit(Statement const&) override;
using ASTWalker::visit;
bool movable() const { return m_movable; }
diff --git a/libyul/optimiser/Substitution.h b/libyul/optimiser/Substitution.h
index 59ee4620..3cc4b45e 100644
--- a/libyul/optimiser/Substitution.h
+++ b/libyul/optimiser/Substitution.h
@@ -40,7 +40,7 @@ public:
Substitution(std::map<YulString, Expression const*> const& _substitutions):
m_substitutions(_substitutions)
{}
- virtual Expression translate(Expression const& _expression) override;
+ Expression translate(Expression const& _expression) override;
private:
std::map<YulString, Expression const*> const& m_substitutions;
diff --git a/libyul/optimiser/UnusedPruner.h b/libyul/optimiser/UnusedPruner.h
index b5aea3dd..b5b46443 100644
--- a/libyul/optimiser/UnusedPruner.h
+++ b/libyul/optimiser/UnusedPruner.h
@@ -45,7 +45,7 @@ public:
explicit UnusedPruner(Block& _ast, std::set<YulString> const& _externallyUsedFunctions = {});
using ASTModifier::operator();
- virtual void operator()(Block& _block) override;
+ void operator()(Block& _block) override;
// @returns true iff the code changed in the previous run.
bool shouldRunAgain() const { return m_shouldRunAgain; }