From e6c0a9b922a28001fcbdc4e4ee729659c987caef Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 16 Jan 2015 18:52:27 +0100 Subject: Magic variables are only needed durinng name and type resolution, not during compilation. --- Compiler.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Compiler.cpp') diff --git a/Compiler.cpp b/Compiler.cpp index bd6571b9..d86c939c 100644 --- a/Compiler.cpp +++ b/Compiler.cpp @@ -34,11 +34,11 @@ using namespace std; namespace dev { namespace solidity { -void Compiler::compileContract(ContractDefinition const& _contract, vector const& _magicGlobals, +void Compiler::compileContract(ContractDefinition const& _contract, map const& _contracts) { m_context = CompilerContext(); // clear it just in case - initializeContext(_contract, _magicGlobals, _contracts); + initializeContext(_contract, _contracts); for (ASTPointer const& function: _contract.getDefinedFunctions()) if (function->getName() != _contract.getName()) // don't add the constructor here @@ -51,16 +51,14 @@ void Compiler::compileContract(ContractDefinition const& _contract, vector const& _magicGlobals, +void Compiler::initializeContext(ContractDefinition const& _contract, map const& _contracts) { m_context.setCompiledContracts(_contracts); - for (MagicVariableDeclaration const* variable: _magicGlobals) - m_context.addMagicGlobal(*variable); registerStateVariables(_contract); } -- cgit v1.2.3