Compatibility with StackCompressor and StackLimitEvader.

This commit is contained in:
Daniel Kirchner
2021-11-03 12:39:55 +01:00
parent b2c9b69de2
commit 4229369180
5 changed files with 193 additions and 41 deletions
+20
View File
@@ -22,6 +22,7 @@
#pragma once
#include <libyul/optimiser/OptimiserStep.h>
#include <libyul/backends/evm/StackLayoutGenerator.h>
namespace solidity::yul
{
@@ -61,6 +62,25 @@ public:
Object& _object,
std::map<YulString, std::set<YulString>> const& _unreachableVariables
);
/// @a _stackTooDeepErrors can be determined by the StackLayoutGenerator.
/// Can only be run on the EVM dialect with objects.
/// Abort and do nothing, if no ``memoryguard`` call or several ``memoryguard`` calls
/// with non-matching arguments are found, or if any of the @a _stackTooDeepErrors
/// are contained in a recursive function.
static void run(
OptimiserStepContext& _context,
Object& _object,
std::map<YulString, std::vector<StackLayoutGenerator::StackTooDeep>> const& _stackTooDeepErrors
);
/// Determines stack too deep errors using the appropriate code generation backend.
/// Can only be run on the EVM dialect with objects.
/// Abort and do nothing, if no ``memoryguard`` call or several ``memoryguard`` calls
/// with non-matching arguments are found, or if any of the unreachable variables
/// are contained in a recursive function.
static void run(
OptimiserStepContext& _context,
Object& _object
);
};
}