aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerContext.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-08-10 23:54:08 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-14 20:11:41 +0800
commitee6f56d6418d1d25690702adf55a00733517062c (patch)
treeef699abd2fb7e2caf4d5d1b662bff93a5305693f /libsolidity/codegen/CompilerContext.h
parent38446a9669b3ddeadb3a088bad98ef948fa5adc6 (diff)
downloaddexon-solidity-ee6f56d6418d1d25690702adf55a00733517062c.tar.gz
dexon-solidity-ee6f56d6418d1d25690702adf55a00733517062c.tar.zst
dexon-solidity-ee6f56d6418d1d25690702adf55a00733517062c.zip
Remove unused magic global feature.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.h')
-rw-r--r--libsolidity/codegen/CompilerContext.h7
1 files changed, 2 insertions, 5 deletions
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