aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-06-26 18:24:07 +0800
committerGitHub <noreply@github.com>2018-06-26 18:24:07 +0800
commite6595d880615a4e2b9572b8026e931abe63c04a9 (patch)
tree73bd72013afc828be941806719fb89104bfe9e86
parent5939ef992269e92ce7756a19f161d1f0793b764b (diff)
parent952f14b011f34c1c97b43c4fb28a3637bff15b65 (diff)
downloaddexon-solidity-e6595d880615a4e2b9572b8026e931abe63c04a9.tar.gz
dexon-solidity-e6595d880615a4e2b9572b8026e931abe63c04a9.tar.zst
dexon-solidity-e6595d880615a4e2b9572b8026e931abe63c04a9.zip
Merge pull request #4318 from ethereum/yul-internal
Rename some internal constructs from Julia/Iulia to Yul
-rw-r--r--libjulia/Exceptions.h6
-rw-r--r--libjulia/backends/evm/AbstractAssembly.h2
-rw-r--r--libjulia/backends/evm/EVMCodeTransform.cpp4
-rw-r--r--libjulia/backends/evm/EVMCodeTransform.h12
-rw-r--r--libjulia/optimiser/ASTCopier.h2
-rw-r--r--libjulia/optimiser/Disambiguator.h2
-rw-r--r--libjulia/optimiser/README.md6
-rw-r--r--libjulia/optimiser/UnusedPruner.cpp4
-rw-r--r--test/libjulia/CommonSubexpression.cpp2
-rw-r--r--test/libjulia/Disambiguator.cpp2
-rw-r--r--test/libjulia/FunctionGrouper.cpp4
-rw-r--r--test/libjulia/FunctionHoister.cpp4
-rw-r--r--test/libjulia/Inliner.cpp20
-rw-r--r--test/libjulia/MainFunction.cpp4
-rw-r--r--test/libjulia/Parser.cpp2
-rw-r--r--test/libjulia/Rematerialiser.cpp2
-rw-r--r--test/libjulia/Simplifier.cpp2
-rw-r--r--test/libjulia/UnusedPruner.cpp2
18 files changed, 41 insertions, 41 deletions
diff --git a/libjulia/Exceptions.h b/libjulia/Exceptions.h
index 20ab6520..48624a56 100644
--- a/libjulia/Exceptions.h
+++ b/libjulia/Exceptions.h
@@ -15,7 +15,7 @@
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
/**
- * Exceptions in Julia.
+ * Exceptions in Yul.
*/
#pragma once
@@ -28,8 +28,8 @@ namespace dev
namespace julia
{
-struct IuliaException: virtual Exception {};
-struct OptimizerException: virtual IuliaException {};
+struct YulException: virtual Exception {};
+struct OptimizerException: virtual YulException {};
}
}
diff --git a/libjulia/backends/evm/AbstractAssembly.h b/libjulia/backends/evm/AbstractAssembly.h
index 8e90a912..46fa7796 100644
--- a/libjulia/backends/evm/AbstractAssembly.h
+++ b/libjulia/backends/evm/AbstractAssembly.h
@@ -42,7 +42,7 @@ namespace julia
{
///
-/// Assembly class that abstracts both the libevmasm assembly and the new julia evm assembly.
+/// Assembly class that abstracts both the libevmasm assembly and the new Yul assembly.
///
class AbstractAssembly
{
diff --git a/libjulia/backends/evm/EVMCodeTransform.cpp b/libjulia/backends/evm/EVMCodeTransform.cpp
index 2a97429b..ba2d7f75 100644
--- a/libjulia/backends/evm/EVMCodeTransform.cpp
+++ b/libjulia/backends/evm/EVMCodeTransform.cpp
@@ -15,7 +15,7 @@
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
/**
- * Common code generator for translating Julia / inline assembly to EVM and EVM1.5.
+ * Common code generator for translating Yul / inline assembly to EVM and EVM1.5.
*/
#include <libjulia/backends/evm/EVMCodeTransform.h>
@@ -331,7 +331,7 @@ void CodeTransform::operator()(FunctionDefinition const& _function)
CodeTransform(
m_assembly,
m_info,
- m_julia,
+ m_yul,
m_evm15,
m_identifierAccess,
m_useNamedLabelsForFunctions,
diff --git a/libjulia/backends/evm/EVMCodeTransform.h b/libjulia/backends/evm/EVMCodeTransform.h
index f8eec0b7..ed0785d3 100644
--- a/libjulia/backends/evm/EVMCodeTransform.h
+++ b/libjulia/backends/evm/EVMCodeTransform.h
@@ -15,7 +15,7 @@
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
/**
- * Common code generator for translating Julia / inline assembly to EVM and EVM1.5.
+ * Common code generator for translating Yul / inline assembly to EVM and EVM1.5.
*/
#include <libjulia/backends/evm/EVMAssembly.h>
@@ -49,14 +49,14 @@ public:
CodeTransform(
julia::AbstractAssembly& _assembly,
solidity::assembly::AsmAnalysisInfo& _analysisInfo,
- bool _julia = false,
+ bool _yul = false,
bool _evm15 = false,
ExternalIdentifierAccess const& _identifierAccess = ExternalIdentifierAccess(),
bool _useNamedLabelsForFunctions = false
): CodeTransform(
_assembly,
_analysisInfo,
- _julia,
+ _yul,
_evm15,
_identifierAccess,
_useNamedLabelsForFunctions,
@@ -78,7 +78,7 @@ protected:
CodeTransform(
julia::AbstractAssembly& _assembly,
solidity::assembly::AsmAnalysisInfo& _analysisInfo,
- bool _julia,
+ bool _yul,
bool _evm15,
ExternalIdentifierAccess const& _identifierAccess,
bool _useNamedLabelsForFunctions,
@@ -87,7 +87,7 @@ protected:
):
m_assembly(_assembly),
m_info(_analysisInfo),
- m_julia(_julia),
+ m_yul(_yul),
m_evm15(_evm15),
m_useNamedLabelsForFunctions(_useNamedLabelsForFunctions),
m_identifierAccess(_identifierAccess),
@@ -142,7 +142,7 @@ private:
julia::AbstractAssembly& m_assembly;
solidity::assembly::AsmAnalysisInfo& m_info;
solidity::assembly::Scope* m_scope = nullptr;
- bool m_julia = false;
+ bool m_yul = false;
bool m_evm15 = false;
bool m_useNamedLabelsForFunctions = false;
ExternalIdentifierAccess m_identifierAccess;
diff --git a/libjulia/optimiser/ASTCopier.h b/libjulia/optimiser/ASTCopier.h
index 8681f2e0..cb2925e3 100644
--- a/libjulia/optimiser/ASTCopier.h
+++ b/libjulia/optimiser/ASTCopier.h
@@ -62,7 +62,7 @@ public:
};
/**
- * Creates a copy of a iulia AST potentially replacing identifier names.
+ * Creates a copy of a Yul AST potentially replacing identifier names.
* Base class to be extended.
*/
class ASTCopier: public ExpressionCopier, public StatementCopier
diff --git a/libjulia/optimiser/Disambiguator.h b/libjulia/optimiser/Disambiguator.h
index 6fc8a615..4ef43736 100644
--- a/libjulia/optimiser/Disambiguator.h
+++ b/libjulia/optimiser/Disambiguator.h
@@ -38,7 +38,7 @@ namespace julia
{
/**
- * Creates a copy of a iulia AST replacing all identifiers by unique names.
+ * Creates a copy of a Yul AST replacing all identifiers by unique names.
*/
class Disambiguator: public ASTCopier
{
diff --git a/libjulia/optimiser/README.md b/libjulia/optimiser/README.md
index 1b000294..b1ce8931 100644
--- a/libjulia/optimiser/README.md
+++ b/libjulia/optimiser/README.md
@@ -1,6 +1,6 @@
-## IULIA Optimiser
+## Yul Optimiser
-The iulia optimiser consists of several stages and components that all transform
+The Yul optimiser consists of several stages and components that all transform
the AST in a semantically equivalent way. The goal is to end up either with code
that is shorter or at least only marginally longer but will allow further
optimisation steps.
@@ -81,7 +81,7 @@ a loop or conditional, the first one is not inside), the first assignment is rem
## Expression Simplifier
-This step can only be applied for the EVM-flavoured dialect of iulia. It applies
+This step can only be applied for the EVM-flavoured dialect of Yul. It applies
simple rules like ``x + 0 == x`` to simplify expressions.
## Ineffective Statement Remover
diff --git a/libjulia/optimiser/UnusedPruner.cpp b/libjulia/optimiser/UnusedPruner.cpp
index 54e8fd6e..af503712 100644
--- a/libjulia/optimiser/UnusedPruner.cpp
+++ b/libjulia/optimiser/UnusedPruner.cpp
@@ -59,7 +59,7 @@ void UnusedPruner::operator()(Block& _block)
// Multi-variable declarations are special. We can only remove it
// if all vairables are unused and the right-hand-side is either
// movable or it return a single value. In the latter case, we
- // replace `let a := f()` by `pop(f())` (in pure IULIA, this will be
+ // replace `let a := f()` by `pop(f())` (in pure Yul, this will be
// `drop(f())`).
if (boost::algorithm::none_of(
varDecl.variables,
@@ -74,7 +74,7 @@ void UnusedPruner::operator()(Block& _block)
statement = Block{std::move(varDecl.location), {}};
}
else if (varDecl.variables.size() == 1)
- // In pure IULIA, this should be replaced by a function call to `drop`
+ // In pure Yul, this should be replaced by a function call to `drop`
// instead of `pop`.
statement = ExpressionStatement{varDecl.location, FunctionalInstruction{
varDecl.location,
diff --git a/test/libjulia/CommonSubexpression.cpp b/test/libjulia/CommonSubexpression.cpp
index 8a575c48..6c8edf1f 100644
--- a/test/libjulia/CommonSubexpression.cpp
+++ b/test/libjulia/CommonSubexpression.cpp
@@ -47,7 +47,7 @@ do\
}\
while(false)
-BOOST_AUTO_TEST_SUITE(IuliaCSE)
+BOOST_AUTO_TEST_SUITE(YulCSE)
BOOST_AUTO_TEST_CASE(smoke_test)
{
diff --git a/test/libjulia/Disambiguator.cpp b/test/libjulia/Disambiguator.cpp
index ba1a06b0..48e02c7e 100644
--- a/test/libjulia/Disambiguator.cpp
+++ b/test/libjulia/Disambiguator.cpp
@@ -39,7 +39,7 @@ do\
}\
while(false)
-BOOST_AUTO_TEST_SUITE(IuliaDisambiguator)
+BOOST_AUTO_TEST_SUITE(YulDisambiguator)
BOOST_AUTO_TEST_CASE(smoke_test)
{
diff --git a/test/libjulia/FunctionGrouper.cpp b/test/libjulia/FunctionGrouper.cpp
index 78f382cb..f1e83449 100644
--- a/test/libjulia/FunctionGrouper.cpp
+++ b/test/libjulia/FunctionGrouper.cpp
@@ -16,7 +16,7 @@
*/
/**
* @date 2017
- * Unit tests for the iulia function grouper.
+ * Unit tests for the Yul function grouper.
*/
#include <test/libjulia/Common.h>
@@ -43,7 +43,7 @@ do\
}\
while(false)
-BOOST_AUTO_TEST_SUITE(IuliaFunctionGrouper)
+BOOST_AUTO_TEST_SUITE(YulFunctionGrouper)
BOOST_AUTO_TEST_CASE(smoke_test)
{
diff --git a/test/libjulia/FunctionHoister.cpp b/test/libjulia/FunctionHoister.cpp
index 3d6fff85..348963b4 100644
--- a/test/libjulia/FunctionHoister.cpp
+++ b/test/libjulia/FunctionHoister.cpp
@@ -16,7 +16,7 @@
*/
/**
* @date 2017
- * Unit tests for the iulia function hoister.
+ * Unit tests for the Yul function hoister.
*/
#include <test/libjulia/Common.h>
@@ -43,7 +43,7 @@ do\
}\
while(false)
-BOOST_AUTO_TEST_SUITE(IuliaFunctionHoister)
+BOOST_AUTO_TEST_SUITE(YulFunctionHoister)
BOOST_AUTO_TEST_CASE(smoke_test)
{
diff --git a/test/libjulia/Inliner.cpp b/test/libjulia/Inliner.cpp
index 464dcd93..2f5b7cff 100644
--- a/test/libjulia/Inliner.cpp
+++ b/test/libjulia/Inliner.cpp
@@ -16,7 +16,7 @@
*/
/**
* @date 2017
- * Unit tests for the iulia function inliner.
+ * Unit tests for the Yul function inliner.
*/
#include <test/libjulia/Common.h>
@@ -55,24 +55,24 @@ string inlinableFunctions(string const& _source)
);
}
-string inlineFunctions(string const& _source, bool _julia = true)
+string inlineFunctions(string const& _source, bool _yul = true)
{
- auto ast = disambiguate(_source, _julia);
+ auto ast = disambiguate(_source, _yul);
ExpressionInliner(ast).run();
- return assembly::AsmPrinter(_julia)(ast);
+ return assembly::AsmPrinter(_yul)(ast);
}
-string fullInline(string const& _source, bool _julia = true)
+string fullInline(string const& _source, bool _yul = true)
{
- Block ast = disambiguate(_source, _julia);
+ Block ast = disambiguate(_source, _yul);
(FunctionHoister{})(ast);
(FunctionGrouper{})(ast);\
FullInliner(ast).run();
- return assembly::AsmPrinter(_julia)(ast);
+ return assembly::AsmPrinter(_yul)(ast);
}
}
-BOOST_AUTO_TEST_SUITE(IuliaInlinableFunctionFilter)
+BOOST_AUTO_TEST_SUITE(YulInlinableFunctionFilter)
BOOST_AUTO_TEST_CASE(smoke_test)
{
@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE(negative)
BOOST_AUTO_TEST_SUITE_END()
-BOOST_AUTO_TEST_SUITE(IuliaFunctionInliner)
+BOOST_AUTO_TEST_SUITE(YulFunctionInliner)
BOOST_AUTO_TEST_CASE(simple)
{
@@ -210,7 +210,7 @@ BOOST_AUTO_TEST_CASE(double_recursive_calls)
BOOST_AUTO_TEST_SUITE_END()
-BOOST_AUTO_TEST_SUITE(IuliaFullInliner)
+BOOST_AUTO_TEST_SUITE(YulFullInliner)
BOOST_AUTO_TEST_CASE(simple)
{
diff --git a/test/libjulia/MainFunction.cpp b/test/libjulia/MainFunction.cpp
index c26b002d..e7263d13 100644
--- a/test/libjulia/MainFunction.cpp
+++ b/test/libjulia/MainFunction.cpp
@@ -16,7 +16,7 @@
*/
/**
* @date 2018
- * Unit tests for the Julia MainFunction transformation.
+ * Unit tests for the Yul MainFunction transformation.
*/
#include <test/libjulia/Common.h>
@@ -45,7 +45,7 @@ do\
}\
while(false)
-BOOST_AUTO_TEST_SUITE(JuliaMainFunction)
+BOOST_AUTO_TEST_SUITE(YulMainFunction)
BOOST_AUTO_TEST_CASE(smoke_test)
{
diff --git a/test/libjulia/Parser.cpp b/test/libjulia/Parser.cpp
index c59f91da..07154718 100644
--- a/test/libjulia/Parser.cpp
+++ b/test/libjulia/Parser.cpp
@@ -119,7 +119,7 @@ do \
BOOST_CHECK(searchErrorMessage(err, (substring))); \
} while(0)
-BOOST_AUTO_TEST_SUITE(JuliaParser)
+BOOST_AUTO_TEST_SUITE(YulParser)
BOOST_AUTO_TEST_CASE(smoke_test)
{
diff --git a/test/libjulia/Rematerialiser.cpp b/test/libjulia/Rematerialiser.cpp
index 8f928f8e..63e525d5 100644
--- a/test/libjulia/Rematerialiser.cpp
+++ b/test/libjulia/Rematerialiser.cpp
@@ -48,7 +48,7 @@ do\
}\
while(false)
-BOOST_AUTO_TEST_SUITE(IuliaRematerialiser)
+BOOST_AUTO_TEST_SUITE(YulRematerialiser)
BOOST_AUTO_TEST_CASE(smoke_test)
{
diff --git a/test/libjulia/Simplifier.cpp b/test/libjulia/Simplifier.cpp
index 4d4e8d53..8ed8287a 100644
--- a/test/libjulia/Simplifier.cpp
+++ b/test/libjulia/Simplifier.cpp
@@ -48,7 +48,7 @@ do\
}\
while(false)
-BOOST_AUTO_TEST_SUITE(IuliaSimplifier)
+BOOST_AUTO_TEST_SUITE(YulSimplifier)
BOOST_AUTO_TEST_CASE(smoke_test)
{
diff --git a/test/libjulia/UnusedPruner.cpp b/test/libjulia/UnusedPruner.cpp
index b86a54b3..649ee149 100644
--- a/test/libjulia/UnusedPruner.cpp
+++ b/test/libjulia/UnusedPruner.cpp
@@ -48,7 +48,7 @@ do\
}\
while(false)
-BOOST_AUTO_TEST_SUITE(IuliaUnusedPruner)
+BOOST_AUTO_TEST_SUITE(YulUnusedPruner)
BOOST_AUTO_TEST_CASE(smoke_test)
{