diff options
author | Gav Wood <i@gavwood.com> | 2015-02-21 04:59:21 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-02-21 04:59:21 +0800 |
commit | 9b3886ec19aa8a77974e820d2f02f2b6078fc577 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /DeclarationContainer.cpp | |
parent | 89d84edb16812ff9e4b1049ee0257d65c75f5a3c (diff) | |
download | dexon-solidity-9b3886ec19aa8a77974e820d2f02f2b6078fc577.tar dexon-solidity-9b3886ec19aa8a77974e820d2f02f2b6078fc577.tar.gz dexon-solidity-9b3886ec19aa8a77974e820d2f02f2b6078fc577.tar.bz2 dexon-solidity-9b3886ec19aa8a77974e820d2f02f2b6078fc577.tar.lz dexon-solidity-9b3886ec19aa8a77974e820d2f02f2b6078fc577.tar.xz dexon-solidity-9b3886ec19aa8a77974e820d2f02f2b6078fc577.tar.zst dexon-solidity-9b3886ec19aa8a77974e820d2f02f2b6078fc577.zip |
Add EVMJIT.
Diffstat (limited to 'DeclarationContainer.cpp')
-rw-r--r-- | DeclarationContainer.cpp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/DeclarationContainer.cpp b/DeclarationContainer.cpp deleted file mode 100644 index 2594d428..00000000 --- a/DeclarationContainer.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - This file is part of cpp-ethereum. - - cpp-ethereum is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - cpp-ethereum is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>. -*/ -/** - * @author Christian <c@ethdev.com> - * @date 2014 - * Scope - object that holds declaration of names. - */ - -#include <libsolidity/DeclarationContainer.h> -#include <libsolidity/AST.h> - -namespace dev -{ -namespace solidity -{ - -bool DeclarationContainer::registerDeclaration(Declaration const& _declaration, bool _invisible, bool _update) -{ - ASTString const& name(_declaration.getName()); - if (name.empty()) - return true; - - if (!_update && (m_declarations.count(name) || m_invisibleDeclarations.count(name))) - return false; - - if (_invisible) - m_invisibleDeclarations.insert(name); - else - m_declarations[name] = &_declaration; - return true; -} - -Declaration const* DeclarationContainer::resolveName(ASTString const& _name, bool _recursive) const -{ - solAssert(!_name.empty(), "Attempt to resolve empty name."); - auto result = m_declarations.find(_name); - if (result != m_declarations.end()) - return result->second; - if (_recursive && m_enclosingContainer) - return m_enclosingContainer->resolveName(_name, true); - return nullptr; -} - -} -} |