mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove unused magic global feature.
This commit is contained in:
parent
38446a9669
commit
ee6f56d641
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user