diff options
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/CompilerContext.cpp | 5 | ||||
-rw-r--r-- | libsolidity/codegen/CompilerContext.h | 7 |
2 files changed, 2 insertions, 10 deletions
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp index bc4de3ee..ed780d0b 100644 --- a/libsolidity/codegen/CompilerContext.cpp +++ b/libsolidity/codegen/CompilerContext.cpp @@ -44,11 +44,6 @@ namespace dev namespace solidity { -void CompilerContext::addMagicGlobal(MagicVariableDeclaration const& _declaration) -{ - m_magicGlobals.insert(&_declaration); -} - void CompilerContext::addStateVariable( VariableDeclaration const& _declaration, u256 const& _storageOffset, diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h index 13821f67..af5230bd 100644 --- a/libsolidity/codegen/CompilerContext.h +++ b/libsolidity/codegen/CompilerContext.h @@ -48,7 +48,7 @@ namespace solidity { class CompilerContext { public: - CompilerContext(CompilerContext* _runtimeContext = nullptr): + explicit CompilerContext(CompilerContext* _runtimeContext = nullptr): m_asm(std::make_shared<eth::Assembly>()), m_runtimeContext(_runtimeContext) { @@ -56,7 +56,7 @@ public: m_runtimeSub = size_t(m_asm->newSub(m_runtimeContext->m_asm).data()); } - void addMagicGlobal(MagicVariableDeclaration const& _declaration); + void addStateVariable(VariableDeclaration const& _declaration, u256 const& _storageOffset, unsigned _byteOffset); void addVariable(VariableDeclaration const& _declaration, unsigned _offsetToCurrent = 0); void removeVariable(VariableDeclaration const& _declaration); @@ -68,7 +68,6 @@ public: void adjustStackOffset(int _adjustment) { m_asm->adjustDeposit(_adjustment); } unsigned stackHeight() const { solAssert(m_asm->deposit() >= 0, ""); return unsigned(m_asm->deposit()); } - bool isMagicGlobal(Declaration const* _declaration) const { return m_magicGlobals.count(_declaration) != 0; } bool isLocalVariable(Declaration const* _declaration) const; bool isStateVariable(Declaration const* _declaration) const { return m_stateVariables.count(_declaration) != 0; } @@ -265,8 +264,6 @@ private: } m_functionCompilationQueue; eth::AssemblyPointer m_asm; - /// Magic global variables like msg, tx or this, distinguished by type. - std::set<Declaration const*> m_magicGlobals; /// Other already compiled contracts to be used in contract creation calls. std::map<ContractDefinition const*, eth::Assembly const*> m_compiledContracts; /// Storage offsets of state variables |