From 9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 1 Jun 2015 12:32:59 +0200 Subject: Compute constants --- CompilerContext.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CompilerContext.h') 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 -- cgit v1.2.3