aboutsummaryrefslogtreecommitdiffstats
path: root/CompilerContext.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-06-01 18:32:59 +0800
committerchriseth <c@ethdev.com>2015-06-05 23:34:26 +0800
commit9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32 (patch)
tree090d80e157083121e5df163acc4dd8ba44635255 /CompilerContext.h
parent4987eec3d1e87868e091850d31af58e054ab5ee5 (diff)
downloaddexon-solidity-9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32.tar.gz
dexon-solidity-9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32.tar.zst
dexon-solidity-9efd5374ed5d3e2c5abf6d85907e1e3ac5ce5b32.zip
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