aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-02-20 18:57:42 +0800
committerLiana Husikyan <liana@ethdev.com>2015-02-21 05:51:16 +0800
commit1ed86b33bcb07f432209953ec4ed1779d0831452 (patch)
treeb156f65bd1253226beecc78420a518134297c3f1 /ExpressionCompiler.cpp
parent52050201e39b823ea9e6133e47c7e9e779dc1f07 (diff)
downloaddexon-solidity-1ed86b33bcb07f432209953ec4ed1779d0831452.tar.gz
dexon-solidity-1ed86b33bcb07f432209953ec4ed1779d0831452.tar.zst
dexon-solidity-1ed86b33bcb07f432209953ec4ed1779d0831452.zip
cosmetic changes
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r--ExpressionCompiler.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index 74dfb2b5..c2a10ab4 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -64,7 +64,7 @@ void ExpressionCompiler::appendStateVariableInitialization(CompilerContext& _con
void ExpressionCompiler::appendStateVariableInitialization(VariableDeclaration const& _varDecl)
{
- m_currentLValue.fromStateVariable(_varDecl);
+ m_currentLValue.fromVariableDeclaration(_varDecl);
m_currentLValue.storeValue(*_varDecl.getType(), _varDecl.getLocation());
m_currentLValue.reset();
}
@@ -1024,22 +1024,17 @@ void ExpressionCompiler::LValue::fromIdentifier(Identifier const& _identifier, D
m_baseStackOffset = m_context->getBaseStackOffsetOfVariable(_declaration);
}
else if (m_context->isStateVariable(&_declaration))
- {
- *m_context << m_context->getStorageLocationOfVariable(_declaration);
- m_type = LValueType::Storage;
- m_dataType = _identifier.getType();
- solAssert(m_dataType->getStorageSize() <= numeric_limits<unsigned>::max(),
- "The storage size of " + m_dataType->toString() + " should fit in an unsigned");
- m_size = unsigned(m_dataType->getStorageSize());
- }
+ //{
+ fromVariableDeclaration(_declaration);
+ //}
else
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_sourceLocation(_identifier.getLocation())
<< errinfo_comment("Identifier type not supported or identifier not found."));
}
-void ExpressionCompiler::LValue::fromStateVariable(VariableDeclaration const& _declaration)
+void ExpressionCompiler::LValue::fromVariableDeclaration(Declaration const& _declaration)
{
- solAssert(m_context->isStateVariable(&_declaration), "Not a state variable.");
+ //solAssert(m_context->isStateVariable(&_declaration), "Not a state variable.");
*m_context << m_context->getStorageLocationOfVariable(_declaration);
m_type = LValueType::Storage;
m_dataType = _declaration.getType();