Adding origin location notation to yul ir.

This commit is contained in:
Djordje Mijovic
2021-06-21 18:48:20 +02:00
committed by chriseth
parent 921e21c7cb
commit 838f59fa5b
32 changed files with 1552 additions and 177 deletions
+10
View File
@@ -29,6 +29,8 @@
namespace solidity::frontend
{
class IRGenerationContext;
/**
* Structure that describes arity and co-arity of a Yul function, i.e. the number of its inputs and outputs.
*/
@@ -66,6 +68,14 @@ struct IRNames
static std::string zeroValue(Type const& _type, std::string const& _variableName);
};
/**
* @returns a source location comment in the form of
* `/// @src <sourceIndex>:<locationStart>:<locationEnd>`.
*/
std::string sourceLocationComment(langutil::SourceLocation const& _location, IRGenerationContext const& _context);
std::string sourceLocationComment(ASTNode const& _node, IRGenerationContext const& _context);
}
// Overloading std::less() makes it possible to use YulArity as a map key. We could define operator<