diff options
author | chriseth <c@ethdev.com> | 2015-11-24 06:57:17 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-11-26 22:37:55 +0800 |
commit | b47d5932528357939ee29758a8b8027c90bdb1e5 (patch) | |
tree | a32526db014b5a654e193660e883e97ab437aa95 /libsolidity/codegen | |
parent | 86495dfc57dde9b825ffd8c219ea809446e978f9 (diff) | |
download | dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar.gz dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar.bz2 dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar.lz dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar.xz dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.tar.zst dexon-solidity-b47d5932528357939ee29758a8b8027c90bdb1e5.zip |
Do not store elements of a contract by AST node type.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/Compiler.cpp | 2 | ||||
-rw-r--r-- | libsolidity/codegen/CompilerContext.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/codegen/Compiler.cpp b/libsolidity/codegen/Compiler.cpp index 055e607f..f1d95980 100644 --- a/libsolidity/codegen/Compiler.cpp +++ b/libsolidity/codegen/Compiler.cpp @@ -385,7 +385,7 @@ void Compiler::registerStateVariables(ContractDefinition const& _contract) void Compiler::initializeStateVariables(ContractDefinition const& _contract) { - for (ASTPointer<VariableDeclaration> const& variable: _contract.stateVariables()) + for (VariableDeclaration const* variable: _contract.stateVariables()) if (variable->value() && !variable->isConstant()) ExpressionCompiler(m_context, m_optimize).appendStateVariableInitialization(*variable); } diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp index 00b9d87c..9e2405cc 100644 --- a/libsolidity/codegen/CompilerContext.cpp +++ b/libsolidity/codegen/CompilerContext.cpp @@ -133,9 +133,9 @@ ModifierDefinition const& CompilerContext::functionModifier(string const& _name) { solAssert(!m_inheritanceHierarchy.empty(), "No inheritance hierarchy set."); for (ContractDefinition const* contract: m_inheritanceHierarchy) - for (ASTPointer<ModifierDefinition> const& modifier: contract->functionModifiers()) + for (ModifierDefinition const* modifier: contract->functionModifiers()) if (modifier->name() == _name) - return *modifier.get(); + return *modifier; BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Function modifier " + _name + " not found.")); } @@ -195,7 +195,7 @@ eth::AssemblyItem CompilerContext::virtualFunctionEntryLabel( FunctionType functionType(_function); auto it = _searchStart; for (; it != m_inheritanceHierarchy.end(); ++it) - for (ASTPointer<FunctionDefinition> const& function: (*it)->definedFunctions()) + for (FunctionDefinition const* function: (*it)->definedFunctions()) if ( function->name() == name && !function->isConstructor() && |