From 6332bff81d806b60131dbf87eddba75c88e9d42a Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 26 May 2015 11:27:59 +0200 Subject: Gas estimation for internal functions. --- CompilerContext.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CompilerContext.cpp') diff --git a/CompilerContext.cpp b/CompilerContext.cpp index f373fdfb..2edff82e 100644 --- a/CompilerContext.cpp +++ b/CompilerContext.cpp @@ -99,6 +99,12 @@ eth::AssemblyItem CompilerContext::getFunctionEntryLabel(Declaration const& _dec return res->second.tag(); } +eth::AssemblyItem CompilerContext::getFunctionEntryLabelIfExists(Declaration const& _declaration) const +{ + auto res = m_functionEntryLabels.find(&_declaration); + return res == m_functionEntryLabels.end() ? eth::AssemblyItem(eth::UndefinedItem) : res->second.tag(); +} + eth::AssemblyItem CompilerContext::getVirtualFunctionEntryLabel(FunctionDefinition const& _function) { solAssert(!m_inheritanceHierarchy.empty(), "No inheritance hierarchy set."); -- cgit v1.2.3