mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Rerun SolidityEndToEndTest.cpp tests on stack errors.
This commit is contained in:
parent
bc6d10f11d
commit
b9db435684
@ -35,6 +35,8 @@
|
||||
#include <libsolutil/Keccak256.h>
|
||||
#include <libsolutil/ErrorCodes.h>
|
||||
|
||||
#include <libyul/Exceptions.h>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <range/v3/view/transform.hpp>
|
||||
@ -54,13 +56,29 @@ using namespace solidity::langutil;
|
||||
#define ALSO_VIA_YUL(CODE) \
|
||||
{ \
|
||||
m_compileViaYul = false; \
|
||||
{ CODE } \
|
||||
RUN_AND_RERUN_WITH_OPTIMIZER_ON_STACK_ERROR(CODE) \
|
||||
\
|
||||
m_compileViaYul = true; \
|
||||
reset(); \
|
||||
{ CODE } \
|
||||
RUN_AND_RERUN_WITH_OPTIMIZER_ON_STACK_ERROR(CODE) \
|
||||
}
|
||||
|
||||
#define RUN_AND_RERUN_WITH_OPTIMIZER_ON_STACK_ERROR(CODE) \
|
||||
{ \
|
||||
try \
|
||||
{ CODE } \
|
||||
catch (yul::StackTooDeepError const&) \
|
||||
{ \
|
||||
if (m_optimiserSettings == OptimiserSettings::full()) \
|
||||
throw; \
|
||||
\
|
||||
reset(); \
|
||||
m_optimiserSettings = OptimiserSettings::full(); \
|
||||
{ CODE } \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
namespace solidity::frontend::test
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user