aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-10-31 01:15:25 +0800
committerChristian <c@ethdev.com>2014-10-31 04:21:25 +0800
commit9eb7fd274c9af259ea1718af8ab0180841f535f3 (patch)
treeabe1c7de6d6775649e8007b3d1d4d7bede447f86
parent877aa91c57bb9cda410a7b521ed3b7630b5ae2dc (diff)
downloaddexon-solidity-9eb7fd274c9af259ea1718af8ab0180841f535f3.tar
dexon-solidity-9eb7fd274c9af259ea1718af8ab0180841f535f3.tar.gz
dexon-solidity-9eb7fd274c9af259ea1718af8ab0180841f535f3.tar.bz2
dexon-solidity-9eb7fd274c9af259ea1718af8ab0180841f535f3.tar.lz
dexon-solidity-9eb7fd274c9af259ea1718af8ab0180841f535f3.tar.xz
dexon-solidity-9eb7fd274c9af259ea1718af8ab0180841f535f3.tar.zst
dexon-solidity-9eb7fd274c9af259ea1718af8ab0180841f535f3.zip
Function selector and variable (un)packing.
-rw-r--r--main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 945b53db..1cf466c7 100644
--- a/main.cpp
+++ b/main.cpp
@@ -115,9 +115,11 @@ int main(int argc, char** argv)
printer.print(cout);
bytes instructions;
+ Compiler compiler;
try
{
- instructions = Compiler::compile(*ast);
+ compiler.compileContract(*ast);
+ instructions = compiler.getAssembledBytecode();
}
catch (CompilerError const& exception)
{
@@ -125,7 +127,9 @@ int main(int argc, char** argv)
return -1;
}
- cout << "EVM assembly: " << endl;
+ cout << "EVM assembly:" << endl;
+ compiler.streamAssembly(cout);
+ cout << "Opcodes:" << endl;
cout << eth::disassemble(instructions) << endl;
cout << "Binary: " << toHex(instructions) << endl;