diff options
author | Gav Wood <i@gavwood.com> | 2014-05-28 22:28:41 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2014-05-28 22:28:41 +0800 |
commit | f781485d28d85de05904deec393956c58c6fca49 (patch) | |
tree | aee70b39b80b796fa69edf2fdfa8770e6efa685d /main.cpp | |
parent | d48033009a04d09a8066e7a90d42ccd8dac38358 (diff) | |
download | dexon-solidity-f781485d28d85de05904deec393956c58c6fca49.tar dexon-solidity-f781485d28d85de05904deec393956c58c6fca49.tar.gz dexon-solidity-f781485d28d85de05904deec393956c58c6fca49.tar.bz2 dexon-solidity-f781485d28d85de05904deec393956c58c6fca49.tar.lz dexon-solidity-f781485d28d85de05904deec393956c58c6fca49.tar.xz dexon-solidity-f781485d28d85de05904deec393956c58c6fca49.tar.zst dexon-solidity-f781485d28d85de05904deec393956c58c6fca49.zip |
Tests updated.
Fixes to executive logging.
Trie testing made considerably more rigourous.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -25,6 +25,7 @@ #include <liblll/Compiler.h> #include <libethsupport/CommonIO.h> #include <libethsupport/CommonData.h> +#include <libethcore/Instruction.h> #include "BuildInfo.h" using namespace std; using namespace eth; @@ -51,7 +52,7 @@ void version() exit(0); } -enum Mode { Binary, Hex, Assembly, ParseTree }; +enum Mode { Binary, Hex, Assembly, ParseTree, Disassemble }; int main(int argc, char** argv) { @@ -74,6 +75,8 @@ int main(int argc, char** argv) mode = ParseTree; else if ((arg == "-o" || arg == "--optimise") && argc > i + 1) optimise = atoi(argv[++i]); + else if (arg == "-d" || arg == "--disassemble") + mode = Disassemble; else if (arg == "-V" || arg == "--version") version(); else @@ -96,6 +99,10 @@ int main(int argc, char** argv) vector<string> errors; if (src.empty()) cerr << "Empty file." << endl; + else if (mode == Disassemble) + { + cout << disassemble(fromHex(src)) << endl; + } else if (mode == Binary || mode == Hex) { auto bs = compileLLL(src, optimise ? true : false, &errors); |