aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerContext.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-08-26 00:58:12 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-16 03:46:32 +0800
commit80ce3ca66f063d8d87c2393e689f92d8608b4e0a (patch)
treeae1376cd7d128573edb235f92191dd30118d07bf /libsolidity/codegen/CompilerContext.h
parent73771f5bb2d8aee1b71dfcc909a60aa47c591dec (diff)
downloaddexon-solidity-80ce3ca66f063d8d87c2393e689f92d8608b4e0a.tar.gz
dexon-solidity-80ce3ca66f063d8d87c2393e689f92d8608b4e0a.tar.zst
dexon-solidity-80ce3ca66f063d8d87c2393e689f92d8608b4e0a.zip
Move ABI encoder into its own function.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.h')
-rw-r--r--libsolidity/codegen/CompilerContext.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h
index dd36bba0..7743fd3f 100644
--- a/libsolidity/codegen/CompilerContext.h
+++ b/libsolidity/codegen/CompilerContext.h
@@ -22,6 +22,8 @@
#pragma once
+#include <libsolidity/codegen/ABIFunctions.h>
+
#include <libsolidity/ast/ASTForward.h>
#include <libsolidity/ast/Types.h>
#include <libsolidity/ast/ASTAnnotations.h>
@@ -121,6 +123,7 @@ public:
);
/// Generates the code for missing low-level functions, i.e. calls the generators passed above.
void appendMissingLowLevelFunctions();
+ ABIFunctions& abiFunctions() { return m_abiFunctions; }
ModifierDefinition const& functionModifier(std::string const& _name) const;
/// Returns the distance of the given local variable from the bottom of the stack (of the current function).
@@ -302,6 +305,8 @@ private:
size_t m_runtimeSub = -1;
/// An index of low-level function labels by name.
std::map<std::string, eth::AssemblyItem> m_lowLevelFunctions;
+ /// Container for ABI functions to be generated.
+ ABIFunctions m_abiFunctions;
/// The queue of low-level functions to generate.
std::queue<std::tuple<std::string, unsigned, unsigned, std::function<void(CompilerContext&)>>> m_lowLevelFunctionGenerationQueue;
};