aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-10 22:23:35 +0800
committerchriseth <chris@ethereum.org>2018-10-10 22:23:35 +0800
commitf950973eb2b0dea16d7fd8d0f70309ff38b23337 (patch)
tree7775d3bf93768e2721e68245d1a22e6a4044d603 /libjulia
parent62fb0e29c9177996b75cd49cbd4237256dc8111e (diff)
downloaddexon-solidity-f950973eb2b0dea16d7fd8d0f70309ff38b23337.tar.gz
dexon-solidity-f950973eb2b0dea16d7fd8d0f70309ff38b23337.tar.zst
dexon-solidity-f950973eb2b0dea16d7fd8d0f70309ff38b23337.zip
Rename ExpressionBreaker to ExpressionSplitter.
Diffstat (limited to 'libjulia')
-rw-r--r--libjulia/optimiser/ExpressionSplitter.cpp (renamed from libjulia/optimiser/ExpressionBreaker.cpp)16
-rw-r--r--libjulia/optimiser/ExpressionSplitter.h (renamed from libjulia/optimiser/ExpressionBreaker.h)4
2 files changed, 10 insertions, 10 deletions
diff --git a/libjulia/optimiser/ExpressionBreaker.cpp b/libjulia/optimiser/ExpressionSplitter.cpp
index 2273fa98..4448a15b 100644
--- a/libjulia/optimiser/ExpressionBreaker.cpp
+++ b/libjulia/optimiser/ExpressionSplitter.cpp
@@ -19,7 +19,7 @@
* declarations.
*/
-#include <libjulia/optimiser/ExpressionBreaker.h>
+#include <libjulia/optimiser/ExpressionSplitter.h>
#include <libjulia/optimiser/ASTWalker.h>
@@ -34,25 +34,25 @@ using namespace dev;
using namespace dev::julia;
using namespace dev::solidity;
-void ExpressionBreaker::operator()(FunctionalInstruction& _instruction)
+void ExpressionSplitter::operator()(FunctionalInstruction& _instruction)
{
for (auto& arg: _instruction.arguments | boost::adaptors::reversed)
outlineExpression(arg);
}
-void ExpressionBreaker::operator()(FunctionCall& _funCall)
+void ExpressionSplitter::operator()(FunctionCall& _funCall)
{
for (auto& arg: _funCall.arguments | boost::adaptors::reversed)
outlineExpression(arg);
}
-void ExpressionBreaker::operator()(If& _if)
+void ExpressionSplitter::operator()(If& _if)
{
outlineExpression(*_if.condition);
(*this)(_if.body);
}
-void ExpressionBreaker::operator()(Switch& _switch)
+void ExpressionSplitter::operator()(Switch& _switch)
{
outlineExpression(*_switch.expression);
for (auto& _case: _switch.cases)
@@ -60,7 +60,7 @@ void ExpressionBreaker::operator()(Switch& _switch)
(*this)(_case.body);
}
-void ExpressionBreaker::operator()(ForLoop& _loop)
+void ExpressionSplitter::operator()(ForLoop& _loop)
{
(*this)(_loop.pre);
// Do not visit the condition because we cannot break expressions there.
@@ -68,7 +68,7 @@ void ExpressionBreaker::operator()(ForLoop& _loop)
(*this)(_loop.body);
}
-void ExpressionBreaker::operator()(Block& _block)
+void ExpressionSplitter::operator()(Block& _block)
{
vector<Statement> saved;
swap(saved, m_statementsToPrefix);
@@ -87,7 +87,7 @@ void ExpressionBreaker::operator()(Block& _block)
swap(saved, m_statementsToPrefix);
}
-void ExpressionBreaker::outlineExpression(Expression& _expr)
+void ExpressionSplitter::outlineExpression(Expression& _expr)
{
if (_expr.type() != typeid(FunctionalInstruction) && _expr.type() != typeid(FunctionCall))
return;
diff --git a/libjulia/optimiser/ExpressionBreaker.h b/libjulia/optimiser/ExpressionSplitter.h
index 28cfdbc9..324d2b13 100644
--- a/libjulia/optimiser/ExpressionBreaker.h
+++ b/libjulia/optimiser/ExpressionSplitter.h
@@ -56,10 +56,10 @@ class NameCollector;
* function calls can only appear in the right-hand side of a variable declaration,
* assignments or expression statements and all arguments have to be constants or variables.
*/
-class ExpressionBreaker: public ASTModifier
+class ExpressionSplitter: public ASTModifier
{
public:
- explicit ExpressionBreaker(NameDispenser& _nameDispenser):
+ explicit ExpressionSplitter(NameDispenser& _nameDispenser):
m_nameDispenser(_nameDispenser)
{ }