aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmStack.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/inlineasm/AsmStack.h')
-rw-r--r--libsolidity/inlineasm/AsmStack.h23
1 files changed, 3 insertions, 20 deletions
diff --git a/libsolidity/inlineasm/AsmStack.h b/libsolidity/inlineasm/AsmStack.h
index e223ccc9..23072a88 100644
--- a/libsolidity/inlineasm/AsmStack.h
+++ b/libsolidity/inlineasm/AsmStack.h
@@ -24,7 +24,7 @@
#include <libsolidity/interface/Exceptions.h>
-#include <libjulia/backends/AbstractAssembly.h>
+#include <libjulia/backends/evm/AbstractAssembly.h>
#include <string>
#include <functional>
@@ -43,23 +43,6 @@ namespace assembly
struct Block;
struct Identifier;
-enum class IdentifierContext { LValue, RValue };
-
-/// Object that is used to resolve references and generate code for access to identifiers external
-/// to inline assembly (not used in standalone assembly mode).
-struct ExternalIdentifierAccess
-{
- using Resolver = std::function<size_t(assembly::Identifier const&, IdentifierContext)>;
- /// Resolve a an external reference given by the identifier in the given context.
- /// @returns the size of the value (number of stack slots) or size_t(-1) if not found.
- Resolver resolve;
- using CodeGenerator = std::function<void(assembly::Identifier const&, IdentifierContext, julia::AbstractAssembly&)>;
- /// Generate code for retrieving the value (rvalue context) or storing the value (lvalue context)
- /// of an identifier. The code should be appended to the assembly. In rvalue context, the value is supposed
- /// to be put onto the stack, in lvalue context, the value is assumed to be at the top of the stack.
- CodeGenerator generateCode;
-};
-
class InlineAssemblyStack
{
public:
@@ -67,7 +50,7 @@ public:
/// @return false or error.
bool parse(
std::shared_ptr<Scanner> const& _scanner,
- ExternalIdentifierAccess::Resolver const& _externalIdentifierResolver = ExternalIdentifierAccess::Resolver()
+ julia::ExternalIdentifierAccess::Resolver const& _externalIdentifierResolver = julia::ExternalIdentifierAccess::Resolver()
);
/// Converts the parser result back into a string form (not necessarily the same form
/// as the source form, but it should parse into the same parsed form again).
@@ -79,7 +62,7 @@ public:
bool parseAndAssemble(
std::string const& _input,
eth::Assembly& _assembly,
- ExternalIdentifierAccess const& _identifierAccess = ExternalIdentifierAccess()
+ julia::ExternalIdentifierAccess const& _identifierAccess = julia::ExternalIdentifierAccess()
);
ErrorList const& errors() const { return m_errors; }