Fix "enforce via yul".

This commit is contained in:
chriseth 2020-07-20 14:52:10 +02:00
parent d808302c62
commit 53bc0ff18e

View File

@ -46,7 +46,7 @@ SemanticTest::SemanticTest(string const& _filename, langutil::EVMVersion _evmVer
m_lineOffset(m_reader.lineNumber()), m_lineOffset(m_reader.lineNumber()),
m_enforceViaYul(enforceViaYul) m_enforceViaYul(enforceViaYul)
{ {
string choice = m_reader.stringSetting("compileViaYul", "false"); string choice = m_reader.stringSetting("compileViaYul", "default");
if (choice == "also") if (choice == "also")
{ {
m_runWithYul = true; m_runWithYul = true;
@ -64,6 +64,11 @@ SemanticTest::SemanticTest(string const& _filename, langutil::EVMVersion _evmVer
// Do not try to run via yul if explicitly denied. // Do not try to run via yul if explicitly denied.
m_enforceViaYul = false; m_enforceViaYul = false;
} }
else if (choice == "default")
{
m_runWithYul = false;
m_runWithoutYul = true;
}
else else
BOOST_THROW_EXCEPTION(runtime_error("Invalid compileViaYul value: " + choice + ".")); BOOST_THROW_EXCEPTION(runtime_error("Invalid compileViaYul value: " + choice + "."));