mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Renamed AssemblyStack to YulStack
All files, references, variables, comments, etc. were renamed to YulStack.
This commit is contained in:
committed by
Kamil Śliwak
parent
15c2a33eb3
commit
e1a59397c6
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <libsolidity/ast/AST.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
#include <liblangutil/DebugInfoSelection.h>
|
||||
#include <liblangutil/Exceptions.h>
|
||||
@@ -56,11 +56,11 @@ std::optional<Error> parseAndReturnFirstError(
|
||||
string const& _source,
|
||||
bool _assemble = false,
|
||||
bool _allowWarnings = true,
|
||||
AssemblyStack::Language _language = AssemblyStack::Language::Assembly,
|
||||
AssemblyStack::Machine _machine = AssemblyStack::Machine::EVM
|
||||
YulStack::Language _language = YulStack::Language::Assembly,
|
||||
YulStack::Machine _machine = YulStack::Machine::EVM
|
||||
)
|
||||
{
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
solidity::test::CommonOptions::get().evmVersion(),
|
||||
_language,
|
||||
solidity::frontend::OptimiserSettings::none(),
|
||||
@@ -103,24 +103,24 @@ bool successParse(
|
||||
string const& _source,
|
||||
bool _assemble = false,
|
||||
bool _allowWarnings = true,
|
||||
AssemblyStack::Language _language = AssemblyStack::Language::Assembly,
|
||||
AssemblyStack::Machine _machine = AssemblyStack::Machine::EVM
|
||||
YulStack::Language _language = YulStack::Language::Assembly,
|
||||
YulStack::Machine _machine = YulStack::Machine::EVM
|
||||
)
|
||||
{
|
||||
return !parseAndReturnFirstError(_source, _assemble, _allowWarnings, _language, _machine);
|
||||
}
|
||||
|
||||
bool successAssemble(string const& _source, bool _allowWarnings = true, AssemblyStack::Language _language = AssemblyStack::Language::Assembly)
|
||||
bool successAssemble(string const& _source, bool _allowWarnings = true, YulStack::Language _language = YulStack::Language::Assembly)
|
||||
{
|
||||
return
|
||||
successParse(_source, true, _allowWarnings, _language, AssemblyStack::Machine::EVM);
|
||||
successParse(_source, true, _allowWarnings, _language, YulStack::Machine::EVM);
|
||||
}
|
||||
|
||||
Error expectError(
|
||||
std::string const& _source,
|
||||
bool _assemble,
|
||||
bool _allowWarnings = false,
|
||||
AssemblyStack::Language _language = AssemblyStack::Language::Assembly
|
||||
YulStack::Language _language = YulStack::Language::Assembly
|
||||
)
|
||||
{
|
||||
|
||||
@@ -131,9 +131,9 @@ Error expectError(
|
||||
|
||||
void parsePrintCompare(string const& _source, bool _canWarn = false)
|
||||
{
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
solidity::test::CommonOptions::get().evmVersion(),
|
||||
AssemblyStack::Language::Assembly,
|
||||
YulStack::Language::Assembly,
|
||||
OptimiserSettings::none(),
|
||||
DebugInfoSelection::None()
|
||||
);
|
||||
@@ -157,7 +157,7 @@ do \
|
||||
} while(0)
|
||||
|
||||
#define CHECK_ERROR(text, assemble, typ, substring, warnings) \
|
||||
CHECK_ERROR_LANG(text, assemble, typ, substring, warnings, AssemblyStack::Language::Assembly)
|
||||
CHECK_ERROR_LANG(text, assemble, typ, substring, warnings, YulStack::Language::Assembly)
|
||||
|
||||
#define CHECK_PARSE_ERROR(text, type, substring) \
|
||||
CHECK_ERROR(text, false, type, substring, false)
|
||||
@@ -169,13 +169,13 @@ CHECK_ERROR(text, false, type, substring, false)
|
||||
CHECK_ERROR(text, true, type, substring, false)
|
||||
|
||||
#define CHECK_STRICT_ERROR(text, type, substring) \
|
||||
CHECK_ERROR_LANG(text, false, type, substring, false, AssemblyStack::Language::StrictAssembly)
|
||||
CHECK_ERROR_LANG(text, false, type, substring, false, YulStack::Language::StrictAssembly)
|
||||
|
||||
#define CHECK_STRICT_WARNING(text, type, substring) \
|
||||
CHECK_ERROR(text, false, type, substring, false, AssemblyStack::Language::StrictAssembly)
|
||||
CHECK_ERROR(text, false, type, substring, false, YulStack::Language::StrictAssembly)
|
||||
|
||||
#define SUCCESS_STRICT(text) \
|
||||
do { successParse((text), false, false, AssemblyStack::Language::StrictAssembly); } while (false)
|
||||
do { successParse((text), false, false, YulStack::Language::StrictAssembly); } while (false)
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(SolidityInlineAssembly)
|
||||
@@ -221,9 +221,9 @@ BOOST_AUTO_TEST_CASE(print_string_literal_unicode)
|
||||
{
|
||||
string source = "{ let x := \"\\u1bac\" }";
|
||||
string parsed = "object \"object\" {\n code { let x := \"\\xe1\\xae\\xac\" }\n}\n";
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
solidity::test::CommonOptions::get().evmVersion(),
|
||||
AssemblyStack::Language::Assembly,
|
||||
YulStack::Language::Assembly,
|
||||
OptimiserSettings::none(),
|
||||
DebugInfoSelection::None()
|
||||
);
|
||||
|
||||
@@ -97,9 +97,9 @@ bytes SolidityExecutionFramework::multiSourceCompileContract(
|
||||
else if (forceEnableOptimizer)
|
||||
optimiserSettings = OptimiserSettings::full();
|
||||
|
||||
yul::AssemblyStack asmStack(
|
||||
yul::YulStack asmStack(
|
||||
m_evmVersion,
|
||||
yul::AssemblyStack::Language::StrictAssembly,
|
||||
yul::YulStack::Language::StrictAssembly,
|
||||
optimiserSettings,
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
@@ -109,7 +109,7 @@ bytes SolidityExecutionFramework::multiSourceCompileContract(
|
||||
try
|
||||
{
|
||||
asmStack.optimize();
|
||||
obj = move(*asmStack.assemble(yul::AssemblyStack::Machine::EVM).bytecode);
|
||||
obj = move(*asmStack.assemble(yul::YulStack::Machine::EVM).bytecode);
|
||||
obj.link(_libraryAddresses);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <libsolidity/interface/CompilerStack.h>
|
||||
#include <libsolidity/interface/DebugSettings.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
namespace solidity::frontend::test
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <libyul/optimiser/Disambiguator.h>
|
||||
#include <libyul/AsmAnalysis.h>
|
||||
#include <libyul/AsmPrinter.h>
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
#include <libyul/AST.h>
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
#include <libyul/backends/wasm/WasmDialect.h>
|
||||
@@ -55,9 +55,9 @@ Dialect const& defaultDialect(bool _yul)
|
||||
|
||||
pair<shared_ptr<Block>, shared_ptr<yul::AsmAnalysisInfo>> yul::test::parse(string const& _source, bool _yul)
|
||||
{
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
solidity::test::CommonOptions::get().evmVersion(),
|
||||
_yul ? AssemblyStack::Language::Yul : AssemblyStack::Language::StrictAssembly,
|
||||
_yul ? YulStack::Language::Yul : YulStack::Language::StrictAssembly,
|
||||
solidity::test::CommonOptions::get().optimize ?
|
||||
solidity::frontend::OptimiserSettings::standard() :
|
||||
solidity::frontend::OptimiserSettings::minimal(),
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <test/libyul/EVMCodeTransformTest.h>
|
||||
#include <test/libyul/Common.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
#include <libyul/backends/evm/EthAssemblyAdapter.h>
|
||||
#include <libyul/backends/evm/EVMObjectCompiler.h>
|
||||
|
||||
@@ -51,9 +51,9 @@ TestCase::TestResult EVMCodeTransformTest::run(ostream& _stream, string const& _
|
||||
solidity::frontend::OptimiserSettings settings = solidity::frontend::OptimiserSettings::none();
|
||||
settings.runYulOptimiser = false;
|
||||
settings.optimizeStackAllocation = m_stackOpt;
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
EVMVersion{},
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
settings,
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
#include <libyul/backends/wasm/WasmDialect.h>
|
||||
#include <libyul/backends/wasm/EVMToEwasmTranslator.h>
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
#include <libyul/AsmAnalysisInfo.h>
|
||||
#include <libyul/AST.h>
|
||||
#include <libyul/Object.h>
|
||||
@@ -80,9 +80,9 @@ TestCase::TestResult EwasmTranslationTest::run(ostream& _stream, string const& _
|
||||
|
||||
bool EwasmTranslationTest::parse(ostream& _stream, string const& _linePrefix, bool const _formatted)
|
||||
{
|
||||
m_stack = AssemblyStack(
|
||||
m_stack = YulStack(
|
||||
solidity::test::CommonOptions::get().evmVersion(),
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::none(),
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
|
||||
#include <test/TestCase.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
namespace solidity::yul
|
||||
{
|
||||
struct Object;
|
||||
class AssemblyStack;
|
||||
class YulStack;
|
||||
}
|
||||
|
||||
namespace solidity::yul::test
|
||||
@@ -48,7 +48,7 @@ private:
|
||||
std::string interpret();
|
||||
|
||||
std::shared_ptr<Object> m_object;
|
||||
AssemblyStack m_stack;
|
||||
YulStack m_stack;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <libsolutil/AnsiColorized.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
#include <libevmasm/Instruction.h>
|
||||
#include <libevmasm/Disassemble.h>
|
||||
@@ -63,9 +63,9 @@ ObjectCompilerTest::ObjectCompilerTest(string const& _filename):
|
||||
|
||||
TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _linePrefix, bool const _formatted)
|
||||
{
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
EVMVersion(),
|
||||
m_wasm ? AssemblyStack::Language::Ewasm : AssemblyStack::Language::StrictAssembly,
|
||||
m_wasm ? YulStack::Language::Ewasm : YulStack::Language::StrictAssembly,
|
||||
OptimiserSettings::preset(m_optimisationPreset),
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
@@ -80,7 +80,7 @@ TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _li
|
||||
|
||||
if (m_wasm)
|
||||
{
|
||||
MachineAssemblyObject obj = stack.assemble(AssemblyStack::Machine::Ewasm);
|
||||
MachineAssemblyObject obj = stack.assemble(YulStack::Machine::Ewasm);
|
||||
solAssert(obj.bytecode, "");
|
||||
|
||||
m_obtainedResult = "Text:\n" + obj.assembly + "\n";
|
||||
@@ -88,7 +88,7 @@ TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _li
|
||||
}
|
||||
else
|
||||
{
|
||||
MachineAssemblyObject obj = stack.assemble(AssemblyStack::Machine::EVM);
|
||||
MachineAssemblyObject obj = stack.assemble(YulStack::Machine::EVM);
|
||||
solAssert(obj.bytecode, "");
|
||||
solAssert(obj.sourceMappings, "");
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <liblangutil/DebugInfoSelection.h>
|
||||
#include <liblangutil/Scanner.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
|
||||
#include <libsolidity/interface/OptimiserSettings.h>
|
||||
@@ -58,9 +58,9 @@ pair<bool, ErrorList> parse(string const& _source)
|
||||
{
|
||||
try
|
||||
{
|
||||
AssemblyStack asmStack(
|
||||
YulStack asmStack(
|
||||
solidity::test::CommonOptions::get().evmVersion(),
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::none(),
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
@@ -180,9 +180,9 @@ BOOST_AUTO_TEST_CASE(to_string)
|
||||
}
|
||||
)";
|
||||
expectation = boost::replace_all_copy(expectation, "\t", " ");
|
||||
AssemblyStack asmStack(
|
||||
YulStack asmStack(
|
||||
solidity::test::CommonOptions::get().evmVersion(),
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::none(),
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <test/Common.h>
|
||||
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
#include <libyul/AsmAnalysisInfo.h>
|
||||
|
||||
#include <liblangutil/DebugInfoSelection.h>
|
||||
@@ -65,9 +65,9 @@ TestCase::TestResult YulInterpreterTest::run(ostream& _stream, string const& _li
|
||||
|
||||
bool YulInterpreterTest::parse(ostream& _stream, string const& _linePrefix, bool const _formatted)
|
||||
{
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
solidity::test::CommonOptions::get().evmVersion(),
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::none(),
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
|
||||
@@ -233,23 +233,23 @@ BOOST_AUTO_TEST_CASE(via_ir_options)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(assembly_mode_options)
|
||||
{
|
||||
static vector<tuple<vector<string>, AssemblyStack::Machine, AssemblyStack::Language>> const allowedCombinations = {
|
||||
{{"--machine=ewasm", "--yul-dialect=ewasm", "--assemble"}, AssemblyStack::Machine::Ewasm, AssemblyStack::Language::Ewasm},
|
||||
{{"--machine=ewasm", "--yul-dialect=ewasm", "--yul"}, AssemblyStack::Machine::Ewasm, AssemblyStack::Language::Ewasm},
|
||||
{{"--machine=ewasm", "--yul-dialect=ewasm", "--strict-assembly"}, AssemblyStack::Machine::Ewasm, AssemblyStack::Language::Ewasm},
|
||||
{{"--machine=ewasm", "--yul-dialect=evm", "--assemble"}, AssemblyStack::Machine::Ewasm, AssemblyStack::Language::StrictAssembly},
|
||||
{{"--machine=ewasm", "--yul-dialect=evm", "--yul"}, AssemblyStack::Machine::Ewasm, AssemblyStack::Language::StrictAssembly},
|
||||
{{"--machine=ewasm", "--yul-dialect=evm", "--strict-assembly"}, AssemblyStack::Machine::Ewasm, AssemblyStack::Language::StrictAssembly},
|
||||
{{"--machine=ewasm", "--strict-assembly"}, AssemblyStack::Machine::Ewasm, AssemblyStack::Language::Ewasm},
|
||||
{{"--machine=evm", "--yul-dialect=evm", "--assemble"}, AssemblyStack::Machine::EVM, AssemblyStack::Language::StrictAssembly},
|
||||
{{"--machine=evm", "--yul-dialect=evm", "--yul"}, AssemblyStack::Machine::EVM, AssemblyStack::Language::StrictAssembly},
|
||||
{{"--machine=evm", "--yul-dialect=evm", "--strict-assembly"}, AssemblyStack::Machine::EVM, AssemblyStack::Language::StrictAssembly},
|
||||
{{"--machine=evm", "--assemble"}, AssemblyStack::Machine::EVM, AssemblyStack::Language::Assembly},
|
||||
{{"--machine=evm", "--yul"}, AssemblyStack::Machine::EVM, AssemblyStack::Language::Yul},
|
||||
{{"--machine=evm", "--strict-assembly"}, AssemblyStack::Machine::EVM, AssemblyStack::Language::StrictAssembly},
|
||||
{{"--assemble"}, AssemblyStack::Machine::EVM, AssemblyStack::Language::Assembly},
|
||||
{{"--yul"}, AssemblyStack::Machine::EVM, AssemblyStack::Language::Yul},
|
||||
{{"--strict-assembly"}, AssemblyStack::Machine::EVM, AssemblyStack::Language::StrictAssembly},
|
||||
static vector<tuple<vector<string>, YulStack::Machine, YulStack::Language>> const allowedCombinations = {
|
||||
{{"--machine=ewasm", "--yul-dialect=ewasm", "--assemble"}, YulStack::Machine::Ewasm, YulStack::Language::Ewasm},
|
||||
{{"--machine=ewasm", "--yul-dialect=ewasm", "--yul"}, YulStack::Machine::Ewasm, YulStack::Language::Ewasm},
|
||||
{{"--machine=ewasm", "--yul-dialect=ewasm", "--strict-assembly"}, YulStack::Machine::Ewasm, YulStack::Language::Ewasm},
|
||||
{{"--machine=ewasm", "--yul-dialect=evm", "--assemble"}, YulStack::Machine::Ewasm, YulStack::Language::StrictAssembly},
|
||||
{{"--machine=ewasm", "--yul-dialect=evm", "--yul"}, YulStack::Machine::Ewasm, YulStack::Language::StrictAssembly},
|
||||
{{"--machine=ewasm", "--yul-dialect=evm", "--strict-assembly"}, YulStack::Machine::Ewasm, YulStack::Language::StrictAssembly},
|
||||
{{"--machine=ewasm", "--strict-assembly"}, YulStack::Machine::Ewasm, YulStack::Language::Ewasm},
|
||||
{{"--machine=evm", "--yul-dialect=evm", "--assemble"}, YulStack::Machine::EVM, YulStack::Language::StrictAssembly},
|
||||
{{"--machine=evm", "--yul-dialect=evm", "--yul"}, YulStack::Machine::EVM, YulStack::Language::StrictAssembly},
|
||||
{{"--machine=evm", "--yul-dialect=evm", "--strict-assembly"}, YulStack::Machine::EVM, YulStack::Language::StrictAssembly},
|
||||
{{"--machine=evm", "--assemble"}, YulStack::Machine::EVM, YulStack::Language::Assembly},
|
||||
{{"--machine=evm", "--yul"}, YulStack::Machine::EVM, YulStack::Language::Yul},
|
||||
{{"--machine=evm", "--strict-assembly"}, YulStack::Machine::EVM, YulStack::Language::StrictAssembly},
|
||||
{{"--assemble"}, YulStack::Machine::EVM, YulStack::Language::Assembly},
|
||||
{{"--yul"}, YulStack::Machine::EVM, YulStack::Language::Yul},
|
||||
{{"--strict-assembly"}, YulStack::Machine::EVM, YulStack::Language::StrictAssembly},
|
||||
};
|
||||
|
||||
for (auto const& [assemblyOptions, expectedMachine, expectedLanguage]: allowedCombinations)
|
||||
@@ -302,7 +302,7 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options)
|
||||
"--ewasm-ir",
|
||||
};
|
||||
commandLine += assemblyOptions;
|
||||
if (expectedLanguage == AssemblyStack::Language::StrictAssembly || expectedLanguage == AssemblyStack::Language::Ewasm)
|
||||
if (expectedLanguage == YulStack::Language::StrictAssembly || expectedLanguage == YulStack::Language::Ewasm)
|
||||
commandLine += vector<string>{
|
||||
"--optimize",
|
||||
"--optimize-runs=1000",
|
||||
@@ -341,7 +341,7 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options)
|
||||
expectedOptions.compiler.outputs.irOptimized = true;
|
||||
expectedOptions.compiler.outputs.ewasm = true;
|
||||
expectedOptions.compiler.outputs.ewasmIR = true;
|
||||
if (expectedLanguage == AssemblyStack::Language::StrictAssembly || expectedLanguage == AssemblyStack::Language::Ewasm)
|
||||
if (expectedLanguage == YulStack::Language::StrictAssembly || expectedLanguage == YulStack::Language::Ewasm)
|
||||
{
|
||||
expectedOptions.optimizer.enabled = true;
|
||||
expectedOptions.optimizer.yulSteps = "agf";
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <libsolidity/interface/CompilerStack.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
#include <libsolutil/Keccak256.h>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ bytes YulAssembler::assemble()
|
||||
|
||||
if (m_optimiseYul)
|
||||
m_stack.optimize();
|
||||
return m_stack.assemble(AssemblyStack::Machine::EVM).bytecode->bytecode;
|
||||
return m_stack.assemble(YulStack::Machine::EVM).bytecode->bytecode;
|
||||
}
|
||||
|
||||
evmc::result YulEvmoneUtility::deployCode(bytes const& _input, EVMHost& _host)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <test/EVMHost.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
#include <libsolidity/interface/OptimiserSettings.h>
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
):
|
||||
m_stack(
|
||||
_version,
|
||||
solidity::yul::AssemblyStack::Language::StrictAssembly,
|
||||
solidity::yul::YulStack::Language::StrictAssembly,
|
||||
_optSettings,
|
||||
langutil::DebugInfoSelection::All()
|
||||
),
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
{}
|
||||
solidity::bytes assemble();
|
||||
private:
|
||||
solidity::yul::AssemblyStack m_stack;
|
||||
solidity::yul::YulStack m_stack;
|
||||
std::string m_yulProgram;
|
||||
bool m_optimiseYul;
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
#include <libyul/backends/evm/EVMCodeTransform.h>
|
||||
|
||||
#include <liblangutil/DebugInfoSelection.h>
|
||||
@@ -37,9 +37,9 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
|
||||
YulStringRepository::reset();
|
||||
|
||||
string input(reinterpret_cast<char const*>(_data), _size);
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
langutil::EVMVersion(),
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::full(),
|
||||
langutil::DebugInfoSelection::All()
|
||||
);
|
||||
@@ -49,7 +49,7 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
|
||||
|
||||
try
|
||||
{
|
||||
MachineAssemblyObject obj = stack.assemble(AssemblyStack::Machine::EVM);
|
||||
MachineAssemblyObject obj = stack.assemble(YulStack::Machine::EVM);
|
||||
solAssert(obj.bytecode, "");
|
||||
}
|
||||
catch (StackTooDeepError const&)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <libyul/AsmAnalysis.h>
|
||||
#include <libyul/Dialect.h>
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
#include <liblangutil/DebugInfoSelection.h>
|
||||
#include <liblangutil/Exceptions.h>
|
||||
@@ -60,9 +60,9 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
|
||||
|
||||
YulStringRepository::reset();
|
||||
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
langutil::EVMVersion(),
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::full(),
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
#include <liblangutil/DebugInfoSelection.h>
|
||||
#include <liblangutil/EVMVersion.h>
|
||||
@@ -38,9 +38,9 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t const* _data, size_t _size)
|
||||
YulStringRepository::reset();
|
||||
|
||||
string input(reinterpret_cast<char const*>(_data), _size);
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
langutil::EVMVersion(),
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::full(),
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <test/libyul/YulOptimizerTestCommon.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
#include <libyul/Exceptions.h>
|
||||
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
@@ -61,10 +61,10 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
||||
|
||||
YulStringRepository::reset();
|
||||
|
||||
// AssemblyStack entry point
|
||||
AssemblyStack stack(
|
||||
// YulStack entry point
|
||||
YulStack stack(
|
||||
version,
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::full(),
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <src/libfuzzer/libfuzzer_macro.h>
|
||||
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
#include <libyul/Exceptions.h>
|
||||
|
||||
@@ -60,10 +60,10 @@ DEFINE_PROTO_FUZZER(Program const& _input)
|
||||
|
||||
YulStringRepository::reset();
|
||||
|
||||
// AssemblyStack entry point
|
||||
AssemblyStack stack(
|
||||
// YulStack entry point
|
||||
YulStack stack(
|
||||
version,
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::full(),
|
||||
DebugInfoSelection::All()
|
||||
);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <libyul/AsmAnalysis.h>
|
||||
#include <libyul/Dialect.h>
|
||||
#include <libyul/backends/evm/EVMDialect.h>
|
||||
#include <libyul/AssemblyStack.h>
|
||||
#include <libyul/YulStack.h>
|
||||
|
||||
#include <liblangutil/DebugInfoSelection.h>
|
||||
#include <liblangutil/Exceptions.h>
|
||||
@@ -56,9 +56,9 @@ namespace
|
||||
|
||||
pair<shared_ptr<Block>, shared_ptr<AsmAnalysisInfo>> parse(string const& _source)
|
||||
{
|
||||
AssemblyStack stack(
|
||||
YulStack stack(
|
||||
langutil::EVMVersion(),
|
||||
AssemblyStack::Language::StrictAssembly,
|
||||
YulStack::Language::StrictAssembly,
|
||||
solidity::frontend::OptimiserSettings::none(),
|
||||
DebugInfoSelection::Default()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user