aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerContext.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-06-06 01:22:30 +0800
committerchriseth <c@ethdev.com>2015-06-06 01:22:30 +0800
commit779e793d60f2076fbd35b34f0c2073e92c058eef (patch)
tree5bde2e4f0270ed40529f9ef5e79d5ecdc14666bf /CompilerContext.h
parent92eb04c6eccba8b6d7c5c02e5ca2084d9e4fecf6 (diff)
parent9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32 (diff)
downloaddexon-solidity-779e793d60f2076fbd35b34f0c2073e92c058eef.tar
dexon-solidity-779e793d60f2076fbd35b34f0c2073e92c058eef.tar.gz
dexon-solidity-779e793d60f2076fbd35b34f0c2073e92c058eef.tar.bz2
dexon-solidity-779e793d60f2076fbd35b34f0c2073e92c058eef.tar.lz
dexon-solidity-779e793d60f2076fbd35b34f0c2073e92c058eef.tar.xz
dexon-solidity-779e793d60f2076fbd35b34f0c2073e92c058eef.tar.zst
dexon-solidity-779e793d60f2076fbd35b34f0c2073e92c058eef.zip
Merge pull request #2084 from chriseth/sol_computeConstants
Compute constants
Diffstat (limited to 'CompilerContext.h')
-rw-r--r--CompilerContext.h5
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