aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerUtils.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-03-27 21:28:08 +0800
committerGitHub <noreply@github.com>2018-03-27 21:28:08 +0800
commit59538e9a04da1761f3a71f2181c1812fc23a5cb8 (patch)
tree659c3c710f551fbb02085711514332b3923e831f /libsolidity/codegen/CompilerUtils.cpp
parentaf26228159d6fbf3240291d356878505ba42e33a (diff)
parentfab527c4146f08971938c63074c8c92e6ff241bc (diff)
downloaddexon-solidity-59538e9a04da1761f3a71f2181c1812fc23a5cb8.tar
dexon-solidity-59538e9a04da1761f3a71f2181c1812fc23a5cb8.tar.gz
dexon-solidity-59538e9a04da1761f3a71f2181c1812fc23a5cb8.tar.bz2
dexon-solidity-59538e9a04da1761f3a71f2181c1812fc23a5cb8.tar.lz
dexon-solidity-59538e9a04da1761f3a71f2181c1812fc23a5cb8.tar.xz
dexon-solidity-59538e9a04da1761f3a71f2181c1812fc23a5cb8.tar.zst
dexon-solidity-59538e9a04da1761f3a71f2181c1812fc23a5cb8.zip
Merge pull request #3686 from ethereum/doNotIncludeItnernal
Do not include internal functions only used by constructor
Diffstat (limited to 'libsolidity/codegen/CompilerUtils.cpp')
-rw-r--r--libsolidity/codegen/CompilerUtils.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp
index 1bd1103b..68f0b3a1 100644
--- a/libsolidity/codegen/CompilerUtils.cpp
+++ b/libsolidity/codegen/CompilerUtils.cpp
@@ -585,7 +585,7 @@ void CompilerUtils::combineExternalFunctionType(bool _leftAligned)
leftShiftNumberOnStack(64);
}
-void CompilerUtils::pushCombinedFunctionEntryLabel(Declaration const& _function)
+void CompilerUtils::pushCombinedFunctionEntryLabel(Declaration const& _function, bool _runtimeOnly)
{
m_context << m_context.functionEntryLabel(_function).pushTag();
// If there is a runtime context, we have to merge both labels into the same
@@ -593,9 +593,10 @@ void CompilerUtils::pushCombinedFunctionEntryLabel(Declaration const& _function)
if (CompilerContext* rtc = m_context.runtimeContext())
{
leftShiftNumberOnStack(32);
- m_context <<
- rtc->functionEntryLabel(_function).toSubAssemblyTag(m_context.runtimeSub()) <<
- Instruction::OR;
+ if (_runtimeOnly)
+ m_context <<
+ rtc->functionEntryLabel(_function).toSubAssemblyTag(m_context.runtimeSub()) <<
+ Instruction::OR;
}
}