Inline assembly without memory effects is implicitly memory safe.

This commit is contained in:
Daniel Kirchner
2022-03-02 16:42:28 +01:00
parent e6848caac1
commit 9bcfcc61a7
6 changed files with 18 additions and 5 deletions
+3 -1
View File
@@ -221,7 +221,9 @@ struct InlineAssemblyAnnotation: StatementAnnotation
/// Information generated during analysis phase.
std::shared_ptr<yul::AsmAnalysisInfo> analysisInfo;
/// True, if the assembly block was annotated to be memory-safe.
bool memorySafe = false;
bool markedMemorySafe = false;
/// True, if the assembly block involves any memory opcode or assigns to variables in memory.
SetOnce<bool> hasMemoryEffects;
};
struct BlockAnnotation: StatementAnnotation, ScopableAnnotation