aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarkpar <arkady.paronyan@gmail.com>2015-03-02 08:13:10 +0800
committerarkpar <arkady.paronyan@gmail.com>2015-03-02 08:13:10 +0800
commit8d11b6e74ad6286c00378d3fea0238d13b4c37d9 (patch)
tree0f8e0ff55299826719693dbb644ca9737bb12afe
parenta5b4f18dd7291e403237061d5f9660db0299601d (diff)
downloaddexon-solidity-8d11b6e74ad6286c00378d3fea0238d13b4c37d9.tar
dexon-solidity-8d11b6e74ad6286c00378d3fea0238d13b4c37d9.tar.gz
dexon-solidity-8d11b6e74ad6286c00378d3fea0238d13b4c37d9.tar.bz2
dexon-solidity-8d11b6e74ad6286c00378d3fea0238d13b4c37d9.tar.lz
dexon-solidity-8d11b6e74ad6286c00378d3fea0238d13b4c37d9.tar.xz
dexon-solidity-8d11b6e74ad6286c00378d3fea0238d13b4c37d9.tar.zst
dexon-solidity-8d11b6e74ad6286c00378d3fea0238d13b4c37d9.zip
basic source level debugging
-rw-r--r--CompilerStack.cpp10
-rw-r--r--CompilerStack.h11
2 files changed, 21 insertions, 0 deletions
diff --git a/CompilerStack.cpp b/CompilerStack.cpp
index 69dbced0..10504a24 100644
--- a/CompilerStack.cpp
+++ b/CompilerStack.cpp
@@ -155,6 +155,16 @@ bytes const& CompilerStack::compile(string const& _sourceCode, bool _optimize)
return getBytecode();
}
+eth::AssemblyItems const& CompilerStack::getAssemblyItems(string const& _contractName) const
+{
+ return getContract(_contractName).compiler->getAssemblyItems();
+}
+
+eth::AssemblyItems const& CompilerStack::getRuntimeAssemblyItems(string const& _contractName) const
+{
+ return getContract(_contractName).compiler->getRuntimeAssemblyItems();
+}
+
bytes const& CompilerStack::getBytecode(string const& _contractName) const
{
return getContract(_contractName).bytecode;
diff --git a/CompilerStack.h b/CompilerStack.h
index 812f4186..74617836 100644
--- a/CompilerStack.h
+++ b/CompilerStack.h
@@ -26,11 +26,18 @@
#include <ostream>
#include <string>
#include <memory>
+#include <vector>
#include <boost/noncopyable.hpp>
#include <libdevcore/Common.h>
#include <libdevcore/FixedHash.h>
namespace dev {
+
+namespace eth {
+ class AssemblyItem;
+ using AssemblyItems = std::vector<AssemblyItem>;
+}
+
namespace solidity {
// forward declarations
@@ -85,6 +92,10 @@ public:
bytes const& getBytecode(std::string const& _contractName = "") const;
/// @returns the runtime bytecode for the contract, i.e. the code that is returned by the constructor.
bytes const& getRuntimeBytecode(std::string const& _contractName = "") const;
+ /// @returns normal contract assembly items
+ eth::AssemblyItems const& getAssemblyItems(std::string const& _contractName = "") const;
+ /// @returns runtime contract assembly items
+ eth::AssemblyItems const& getRuntimeAssemblyItems(std::string const& _contractName = "") const;
/// @returns hash of the runtime bytecode for the contract, i.e. the code that is returned by the constructor.
dev::h256 getContractCodeHash(std::string const& _contractName = "") const;