diff options
author | chriseth <c@ethdev.com> | 2015-06-01 18:32:59 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-06-05 23:34:26 +0800 |
commit | 9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32 (patch) | |
tree | 090d80e157083121e5df163acc4dd8ba44635255 /CompilerContext.h | |
parent | 4987eec3d1e87868e091850d31af58e054ab5ee5 (diff) | |
download | dexon-solidity-9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32.tar.gz dexon-solidity-9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32.tar.zst dexon-solidity-9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32.zip |
Compute constants
Diffstat (limited to 'CompilerContext.h')
-rw-r--r-- | CompilerContext.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CompilerContext.h b/CompilerContext.h index 573e0b57..998b0a2f 100644 --- a/CompilerContext.h +++ b/CompilerContext.h @@ -126,6 +126,8 @@ public: CompilerContext& operator<<(u256 const& _value) { m_asm.append(_value); return *this; } CompilerContext& operator<<(bytes const& _data) { m_asm.append(_data); return *this; } + void optimise(unsigned _runs = 200) { m_asm.optimise(true, true, _runs); } + eth::Assembly const& getAssembly() const { return m_asm; } /// @arg _sourceCodes is the map of input files to source code strings /// @arg _inJsonFormat shows whether the out should be in Json format @@ -134,7 +136,8 @@ public: return m_asm.stream(_stream, "", _sourceCodes, _inJsonFormat); } - bytes getAssembledBytecode(bool _optimize = false) { return m_asm.optimise(_optimize).assemble(); } + bytes getAssembledBytecode() { return m_asm.assemble(); } + bytes getAssembledRuntimeBytecode(size_t _subIndex) { m_asm.assemble(); return m_asm.data(u256(_subIndex)); } /** * Helper class to pop the visited nodes stack when a scope closes |