mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove defaults in constructor arguments.
This commit is contained in:
parent
5ddbc434d6
commit
851dd635eb
@ -122,7 +122,7 @@ public:
|
||||
/// @a _runs specifes an estimate on how often each opcode in this assembly will be executed,
|
||||
/// i.e. use a small value to optimise for size and a large value to optimise for runtime.
|
||||
/// If @a _enable is not set, will perform some simple peephole optimizations.
|
||||
Assembly& optimise(bool _enable, langutil::EVMVersion _evmVersion, bool _isCreation = true, size_t _runs = 200);
|
||||
Assembly& optimise(bool _enable, langutil::EVMVersion _evmVersion, bool _isCreation, size_t _runs);
|
||||
|
||||
/// Create a text representation of the assembly.
|
||||
std::string assemblyString(
|
||||
|
@ -36,7 +36,7 @@ bytes dev::lll::compileLLL(string const& _src, langutil::EVMVersion _evmVersion,
|
||||
cs.populateStandard();
|
||||
auto assembly = CodeFragment::compile(_src, cs, _readFile).assembly(cs);
|
||||
if (_opt)
|
||||
assembly = assembly.optimise(true, _evmVersion);
|
||||
assembly = assembly.optimise(true, _evmVersion, true, 200);
|
||||
bytes ret = assembly.assemble().bytecode;
|
||||
for (auto i: cs.treesToKill)
|
||||
killBigints(i);
|
||||
@ -74,7 +74,7 @@ std::string dev::lll::compileLLLToAsm(std::string const& _src, langutil::EVMVers
|
||||
cs.populateStandard();
|
||||
auto assembly = CodeFragment::compile(_src, cs, _readFile).assembly(cs);
|
||||
if (_opt)
|
||||
assembly = assembly.optimise(true, _evmVersion);
|
||||
assembly = assembly.optimise(true, _evmVersion, true, 200);
|
||||
string ret = assembly.assemblyString();
|
||||
for (auto i: cs.treesToKill)
|
||||
killBigints(i);
|
||||
|
@ -52,7 +52,7 @@ class Compiler;
|
||||
class CompilerContext
|
||||
{
|
||||
public:
|
||||
explicit CompilerContext(langutil::EVMVersion _evmVersion = langutil::EVMVersion{}, CompilerContext* _runtimeContext = nullptr):
|
||||
explicit CompilerContext(langutil::EVMVersion _evmVersion, CompilerContext* _runtimeContext = nullptr):
|
||||
m_asm(std::make_shared<eth::Assembly>()),
|
||||
m_evmVersion(_evmVersion),
|
||||
m_runtimeContext(_runtimeContext),
|
||||
|
@ -40,7 +40,11 @@ namespace solidity
|
||||
class ContractCompiler: private ASTConstVisitor
|
||||
{
|
||||
public:
|
||||
explicit ContractCompiler(ContractCompiler* _runtimeCompiler, CompilerContext& _context, OptimiserSettings _optimiserSettings):
|
||||
explicit ContractCompiler(
|
||||
ContractCompiler* _runtimeCompiler,
|
||||
CompilerContext& _context,
|
||||
OptimiserSettings _optimiserSettings
|
||||
):
|
||||
m_optimiserSettings(std::move(_optimiserSettings)),
|
||||
m_runtimeCompiler(_runtimeCompiler),
|
||||
m_context(_context)
|
||||
|
@ -55,7 +55,7 @@ class ArrayType;
|
||||
class ExpressionCompiler: private ASTConstVisitor
|
||||
{
|
||||
public:
|
||||
explicit ExpressionCompiler(CompilerContext& _compilerContext, bool _optimiseOrderLiterals = false):
|
||||
explicit ExpressionCompiler(CompilerContext& _compilerContext, bool _optimiseOrderLiterals):
|
||||
m_optimiseOrderLiterals(_optimiseOrderLiterals), m_context(_compilerContext) {}
|
||||
|
||||
/// Compile the given @a _expression and leave its value on the stack.
|
||||
|
@ -1053,7 +1053,7 @@ BOOST_AUTO_TEST_CASE(jumpdest_removal_subassemblies)
|
||||
main.append(t1.toSubAssemblyTag(subId));
|
||||
main.append(u256(8));
|
||||
|
||||
main.optimise(true, dev::test::Options::get().evmVersion());
|
||||
main.optimise(true, dev::test::Options::get().evmVersion(), false, 200);
|
||||
|
||||
AssemblyItems expectationMain{
|
||||
AssemblyItem(PushSubSize, 0),
|
||||
|
@ -153,7 +153,7 @@ bytes compileFirstExpression(
|
||||
parametersSize--
|
||||
);
|
||||
|
||||
ExpressionCompiler(context).compile(*extractor.expression());
|
||||
ExpressionCompiler(context, dev::test::Options::get().optimize).compile(*extractor.expression());
|
||||
|
||||
for (vector<string> const& function: _functions)
|
||||
context << context.functionEntryLabel(dynamic_cast<FunctionDefinition const&>(
|
||||
|
Loading…
Reference in New Issue
Block a user