Rename EVMToEWasmTranslator to EVMToEwasmTranslator

This commit is contained in:
Alex Beregszaszi 2019-12-12 12:52:27 +00:00
parent 018960ebb1
commit 7effc94f24
9 changed files with 30 additions and 30 deletions

View File

@ -34,7 +34,7 @@
#include <libyul/backends/evm/EVMMetrics.h>
#include <libyul/backends/wasm/WasmDialect.h>
#include <libyul/backends/wasm/WasmObjectCompiler.h>
#include <libyul/backends/wasm/EVMToEWasmTranslator.h>
#include <libyul/backends/wasm/EVMToEwasmTranslator.h>
#include <libyul/optimiser/Metrics.h>
#include <libyul/ObjectParser.h>
#include <libyul/optimiser/Suite.h>
@ -112,7 +112,7 @@ void AssemblyStack::translate(AssemblyStack::Language _targetLanguage)
"Invalid language combination"
);
*m_parserResult = EVMToEWasmTranslator(
*m_parserResult = EVMToEwasmTranslator(
languageToDialect(m_language, m_evmVersion)
).run(*parserResult());

View File

@ -44,8 +44,8 @@ add_library(yul
backends/evm/EVMMetrics.h
backends/evm/NoOutputAssembly.h
backends/evm/NoOutputAssembly.cpp
backends/wasm/EVMToEWasmTranslator.cpp
backends/wasm/EVMToEWasmTranslator.h
backends/wasm/EVMToEwasmTranslator.cpp
backends/wasm/EVMToEwasmTranslator.h
backends/wasm/BinaryTransform.cpp
backends/wasm/BinaryTransform.h
backends/wasm/TextTransform.cpp

View File

@ -15,10 +15,10 @@
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Translates Yul code from EVM dialect to eWasm dialect.
* Translates Yul code from EVM dialect to Ewasm dialect.
*/
#include <libyul/backends/wasm/EVMToEWasmTranslator.h>
#include <libyul/backends/wasm/EVMToEwasmTranslator.h>
#include <libyul/backends/wasm/WordSizeTransform.h>
#include <libyul/backends/wasm/WasmDialect.h>
@ -701,7 +701,7 @@ function invalid() {
}
Object EVMToEWasmTranslator::run(Object const& _object)
Object EVMToEwasmTranslator::run(Object const& _object)
{
if (!m_polyfill)
parsePolyfill();
@ -749,7 +749,7 @@ Object EVMToEWasmTranslator::run(Object const& _object)
return ret;
}
void EVMToEWasmTranslator::parsePolyfill()
void EVMToEwasmTranslator::parsePolyfill()
{
ErrorList errors;
ErrorReporter errorReporter(errors);

View File

@ -15,7 +15,7 @@
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Translates Yul code from EVM dialect to eWasm dialect.
* Translates Yul code from EVM dialect to Ewasm dialect.
*/
#pragma once
@ -28,10 +28,10 @@ namespace yul
{
struct Object;
class EVMToEWasmTranslator: public ASTModifier
class EVMToEwasmTranslator: public ASTModifier
{
public:
EVMToEWasmTranslator(Dialect const& _evmDialect): m_dialect(_evmDialect) {}
EVMToEwasmTranslator(Dialect const& _evmDialect): m_dialect(_evmDialect) {}
Object run(Object const& _object);
private:

View File

@ -131,8 +131,8 @@ set(libyul_sources
libyul/Common.cpp
libyul/Common.h
libyul/CompilabilityChecker.cpp
libyul/EWasmTranslationTest.cpp
libyul/EWasmTranslationTest.h
libyul/EwasmTranslationTest.cpp
libyul/EwasmTranslationTest.h
libyul/FunctionSideEffects.cpp
libyul/FunctionSideEffects.h
libyul/Inliner.cpp

View File

@ -25,7 +25,7 @@
#include <test/libsolidity/SemanticTest.h>
#include <test/libsolidity/SMTCheckerTest.h>
#include <test/libsolidity/SMTCheckerJSONTest.h>
#include <test/libyul/EWasmTranslationTest.h>
#include <test/libyul/EwasmTranslationTest.h>
#include <test/libyul/YulOptimizerTest.h>
#include <test/libyul/YulInterpreterTest.h>
#include <test/libyul/ObjectCompilerTest.h>
@ -56,7 +56,7 @@ struct Testsuite
Testsuite const g_interactiveTestsuites[] = {
/*
Title Path Subpath SMT NeedsVM Creator function */
{"EWasm Translation", "libyul", "ewasmTranslationTests",false,false, &yul::test::EWasmTranslationTest::create},
{"Ewasm Translation", "libyul", "ewasmTranslationTests",false,false, &yul::test::EwasmTranslationTest::create},
{"Yul Optimizer", "libyul", "yulOptimizerTests", false, false, &yul::test::YulOptimizerTest::create},
{"Yul Interpreter", "libyul", "yulInterpreterTests", false, false, &yul::test::YulInterpreterTest::create},
{"Yul Object Compiler", "libyul", "objectCompiler", false, false, &yul::test::ObjectCompilerTest::create},

View File

@ -15,7 +15,7 @@
along with solidity. If not, see <http://www.gnu.org/licenses/>.
*/
#include <test/libyul/EWasmTranslationTest.h>
#include <test/libyul/EwasmTranslationTest.h>
#include <test/tools/yulInterpreter/Interpreter.h>
@ -23,7 +23,7 @@
#include <libyul/backends/evm/EVMDialect.h>
#include <libyul/backends/wasm/WasmDialect.h>
#include <libyul/backends/wasm/EVMToEWasmTranslator.h>
#include <libyul/backends/wasm/EVMToEwasmTranslator.h>
#include <libyul/AsmParser.h>
#include <libyul/AssemblyStack.h>
#include <libyul/AsmAnalysisInfo.h>
@ -47,7 +47,7 @@ using namespace dev::solidity::test;
using namespace std;
EWasmTranslationTest::EWasmTranslationTest(string const& _filename)
EwasmTranslationTest::EwasmTranslationTest(string const& _filename)
{
boost::filesystem::path path(_filename);
@ -60,12 +60,12 @@ EWasmTranslationTest::EWasmTranslationTest(string const& _filename)
m_expectation = parseSimpleExpectations(file);
}
TestCase::TestResult EWasmTranslationTest::run(ostream& _stream, string const& _linePrefix, bool const _formatted)
TestCase::TestResult EwasmTranslationTest::run(ostream& _stream, string const& _linePrefix, bool const _formatted)
{
if (!parse(_stream, _linePrefix, _formatted))
return TestResult::FatalError;
*m_object = EVMToEWasmTranslator(
*m_object = EVMToEwasmTranslator(
EVMDialect::strictAssemblyForEVMObjects(dev::test::Options::get().evmVersion())
).run(*m_object);
@ -89,17 +89,17 @@ TestCase::TestResult EWasmTranslationTest::run(ostream& _stream, string const& _
return TestResult::Success;
}
void EWasmTranslationTest::printSource(ostream& _stream, string const& _linePrefix, bool const) const
void EwasmTranslationTest::printSource(ostream& _stream, string const& _linePrefix, bool const) const
{
printIndented(_stream, m_source, _linePrefix);
}
void EWasmTranslationTest::printUpdatedExpectations(ostream& _stream, string const& _linePrefix) const
void EwasmTranslationTest::printUpdatedExpectations(ostream& _stream, string const& _linePrefix) const
{
printIndented(_stream, m_obtainedResult, _linePrefix);
}
void EWasmTranslationTest::printIndented(ostream& _stream, string const& _output, string const& _linePrefix) const
void EwasmTranslationTest::printIndented(ostream& _stream, string const& _output, string const& _linePrefix) const
{
stringstream output(_output);
string line;
@ -107,7 +107,7 @@ void EWasmTranslationTest::printIndented(ostream& _stream, string const& _output
_stream << _linePrefix << line << endl;
}
bool EWasmTranslationTest::parse(ostream& _stream, string const& _linePrefix, bool const _formatted)
bool EwasmTranslationTest::parse(ostream& _stream, string const& _linePrefix, bool const _formatted)
{
AssemblyStack stack(
dev::test::Options::get().evmVersion(),
@ -127,7 +127,7 @@ bool EWasmTranslationTest::parse(ostream& _stream, string const& _linePrefix, bo
}
}
string EWasmTranslationTest::interpret()
string EwasmTranslationTest::interpret()
{
InterpreterState state;
state.maxTraceSize = 10000;
@ -147,7 +147,7 @@ string EWasmTranslationTest::interpret()
return result.str();
}
void EWasmTranslationTest::printErrors(ostream& _stream, ErrorList const& _errors)
void EwasmTranslationTest::printErrors(ostream& _stream, ErrorList const& _errors)
{
SourceReferenceFormatter formatter(_stream);

View File

@ -32,15 +32,15 @@ namespace yul
namespace test
{
class EWasmTranslationTest: public dev::solidity::test::EVMVersionRestrictedTestCase
class EwasmTranslationTest: public dev::solidity::test::EVMVersionRestrictedTestCase
{
public:
static std::unique_ptr<TestCase> create(Config const& _config)
{
return std::make_unique<EWasmTranslationTest>(_config.filename);
return std::make_unique<EwasmTranslationTest>(_config.filename);
}
explicit EWasmTranslationTest(std::string const& _filename);
explicit EwasmTranslationTest(std::string const& _filename);
TestResult run(std::ostream& _stream, std::string const& _linePrefix = "", bool const _formatted = false) override;

View File

@ -32,7 +32,7 @@ add_executable(isoltest
../libsolidity/SMTCheckerTest.cpp
../libsolidity/SMTCheckerJSONTest.cpp
../libyul/Common.cpp
../libyul/EWasmTranslationTest.cpp
../libyul/EwasmTranslationTest.cpp
../libyul/FunctionSideEffects.cpp
../libyul/ObjectCompilerTest.cpp
../libyul/YulOptimizerTest.cpp