mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Enable yul optimizer by default.
This commit is contained in:
@@ -1 +1 @@
|
||||
Warning: Yul and its optimizer are still experimental. Please use the output with care.
|
||||
Warning: Yul is still experimental. Please use the output with care.
|
||||
|
||||
@@ -60,5 +60,4 @@
|
||||
)
|
||||
|
||||
)
|
||||
"}}}},"errors":[{"component":"general","formattedMessage":"Warning: The Yul optimiser is still experimental. Do not use it in production unless correctness of generated code is verified with extensive tests.
|
||||
","message":"The Yul optimiser is still experimental. Do not use it in production unless correctness of generated code is verified with extensive tests.","severity":"warning","type":"Warning"}],"sources":{"A":{"id":0}}}
|
||||
"}}}},"sources":{"A":{"id":0}}}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources":
|
||||
{
|
||||
"A":
|
||||
{
|
||||
"content": "pragma solidity >=0.0; contract C { function f() public pure {} }"
|
||||
}
|
||||
},
|
||||
"settings":
|
||||
{
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"details": { "yul": false }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"sources":{"A":{"id":0}}}
|
||||
@@ -10,8 +10,7 @@
|
||||
"settings":
|
||||
{
|
||||
"optimizer": {
|
||||
"enabled": true,
|
||||
"details": { "yul": true }
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"Warning: The Yul optimiser is still experimental. Do not use it in production unless correctness of generated code is verified with extensive tests.
|
||||
","message":"The Yul optimiser is still experimental. Do not use it in production unless correctness of generated code is verified with extensive tests.","severity":"warning","type":"Warning"}],"sources":{"A":{"id":0}}}
|
||||
{"sources":{"A":{"id":0}}}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
{"errors":[{"component":"general","formattedMessage":"Warning: The Yul optimiser is still experimental. Do not use it in production unless correctness of generated code is verified with extensive tests.
|
||||
","message":"The Yul optimiser is still experimental. Do not use it in production unless correctness of generated code is verified with extensive tests.","severity":"warning","type":"Warning"}],"sources":{"A":{"id":0}}}
|
||||
{"sources":{"A":{"id":0}}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Warning: Yul and its optimizer are still experimental. Please use the output with care.
|
||||
Warning: Yul is still experimental. Please use the output with care.
|
||||
Error: Function not found.
|
||||
--> strict_asm_jump/input.sol:1:3:
|
||||
|
|
||||
|
||||
@@ -1 +1 @@
|
||||
Warning: Yul and its optimizer are still experimental. Please use the output with care.
|
||||
Warning: Yul is still experimental. Please use the output with care.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Warning: Yul and its optimizer are still experimental. Please use the output with care.
|
||||
Warning: Yul is still experimental. Please use the output with care.
|
||||
Exception while assembling:
|
||||
Dynamic exception type:
|
||||
std::exception::what: Variable a1 is 17 slot(s) too deep inside the stack.
|
||||
|
||||
@@ -1042,12 +1042,6 @@ BOOST_AUTO_TEST_CASE(optimizer_settings_details_different)
|
||||
)";
|
||||
Json::Value result = compile(input);
|
||||
BOOST_CHECK(containsAtMostWarnings(result));
|
||||
BOOST_CHECK(containsError(
|
||||
result,
|
||||
"Warning",
|
||||
"The Yul optimiser is still experimental. "
|
||||
"Do not use it in production unless correctness of generated code is verified with extensive tests."
|
||||
));
|
||||
Json::Value contract = getContractResult(result, "fileA", "A");
|
||||
BOOST_CHECK(contract.isObject());
|
||||
BOOST_CHECK(contract["metadata"].isString());
|
||||
|
||||
@@ -63,9 +63,17 @@ SyntaxTest::SyntaxTest(string const& _filename, langutil::EVMVersion _evmVersion
|
||||
|
||||
if (m_settings.count("optimize-yul"))
|
||||
{
|
||||
m_optimiseYul = true;
|
||||
m_validatedSettings["optimize-yul"] = "true";
|
||||
m_settings.erase("optimize-yul");
|
||||
if (m_settings["optimize-yul"] == "true")
|
||||
{
|
||||
m_validatedSettings["optimize-yul"] = "true";
|
||||
m_settings.erase("optimize-yul");
|
||||
}
|
||||
else if (m_settings["optimize-yul"] == "false")
|
||||
{
|
||||
m_validatedSettings["optimize-yul"] = "false";
|
||||
m_settings.erase("optimize-yul");
|
||||
m_optimiseYul = false;
|
||||
}
|
||||
}
|
||||
m_expectations = parseExpectations(file);
|
||||
m_parserErrorRecovery = _parserErrorRecovery;
|
||||
|
||||
@@ -90,7 +90,7 @@ protected:
|
||||
std::map<std::string, std::string> m_sources;
|
||||
std::vector<SyntaxTestError> m_expectations;
|
||||
std::vector<SyntaxTestError> m_errorList;
|
||||
bool m_optimiseYul = false;
|
||||
bool m_optimiseYul = true;
|
||||
langutil::EVMVersion const m_evmVersion;
|
||||
bool m_parserErrorRecovery = false;
|
||||
};
|
||||
|
||||
@@ -8,5 +8,4 @@ contract C {
|
||||
// ====
|
||||
// optimize-yul: true
|
||||
// ----
|
||||
// Warning: The Yul optimiser is still experimental. Do not use it in production unless correctness of generated code is verified with extensive tests.
|
||||
// SyntaxError: (52-101): The msize instruction cannot be used when the Yul optimizer is activated because it can change its semantics. Either disable the Yul optimizer or do not use the instruction.
|
||||
|
||||
@@ -5,4 +5,6 @@ contract C {
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// optimize-yul: false
|
||||
// ----
|
||||
|
||||
Reference in New Issue
Block a user