mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replaced all instances of lValueRequested to willBeWrittenTo
This commit is contained in:
@@ -348,15 +348,15 @@ bool ExpressionCompiler::visit(TupleExpression const& _tuple)
|
||||
if (component)
|
||||
{
|
||||
component->accept(*this);
|
||||
if (_tuple.annotation().lValueRequested)
|
||||
if (_tuple.annotation().willBeWrittenTo)
|
||||
{
|
||||
solAssert(!!m_currentLValue, "");
|
||||
lvalues.push_back(move(m_currentLValue));
|
||||
}
|
||||
}
|
||||
else if (_tuple.annotation().lValueRequested)
|
||||
else if (_tuple.annotation().willBeWrittenTo)
|
||||
lvalues.push_back(unique_ptr<LValue>());
|
||||
if (_tuple.annotation().lValueRequested)
|
||||
if (_tuple.annotation().willBeWrittenTo)
|
||||
{
|
||||
if (_tuple.components().size() == 1)
|
||||
m_currentLValue = move(lvalues[0]);
|
||||
|
||||
@@ -148,7 +148,7 @@ void ExpressionCompiler::setLValue(Expression const& _expression, Arguments cons
|
||||
{
|
||||
solAssert(!m_currentLValue, "Current LValue not reset before trying to set new one.");
|
||||
std::unique_ptr<LValueType> lvalue = std::make_unique<LValueType>(m_context, _arguments...);
|
||||
if (_expression.annotation().lValueRequested)
|
||||
if (_expression.annotation().willBeWrittenTo)
|
||||
m_currentLValue = move(lvalue);
|
||||
else
|
||||
lvalue->retrieveValue(_expression.location(), true);
|
||||
|
||||
@@ -257,14 +257,14 @@ bool IRGeneratorForStatements::visit(TupleExpression const& _tuple)
|
||||
solUnimplementedAssert(false, "");
|
||||
else
|
||||
{
|
||||
bool lValueRequested = _tuple.annotation().lValueRequested;
|
||||
if (lValueRequested)
|
||||
bool willBeWrittenTo = _tuple.annotation().willBeWrittenTo;
|
||||
if (willBeWrittenTo)
|
||||
solAssert(!m_currentLValue, "");
|
||||
if (_tuple.components().size() == 1)
|
||||
{
|
||||
solAssert(_tuple.components().front(), "");
|
||||
_tuple.components().front()->accept(*this);
|
||||
if (lValueRequested)
|
||||
if (willBeWrittenTo)
|
||||
solAssert(!!m_currentLValue, "");
|
||||
else
|
||||
define(_tuple, *_tuple.components().front());
|
||||
@@ -276,7 +276,7 @@ bool IRGeneratorForStatements::visit(TupleExpression const& _tuple)
|
||||
if (auto const& component = _tuple.components()[i])
|
||||
{
|
||||
component->accept(*this);
|
||||
if (lValueRequested)
|
||||
if (willBeWrittenTo)
|
||||
{
|
||||
solAssert(!!m_currentLValue, "");
|
||||
lvalues.emplace_back(std::move(m_currentLValue));
|
||||
@@ -285,10 +285,10 @@ bool IRGeneratorForStatements::visit(TupleExpression const& _tuple)
|
||||
else
|
||||
define(IRVariable(_tuple).tupleComponent(i), *component);
|
||||
}
|
||||
else if (lValueRequested)
|
||||
else if (willBeWrittenTo)
|
||||
lvalues.emplace_back();
|
||||
|
||||
if (_tuple.annotation().lValueRequested)
|
||||
if (_tuple.annotation().willBeWrittenTo)
|
||||
m_currentLValue.emplace(IRLValue{
|
||||
*_tuple.annotation().type,
|
||||
IRLValue::Tuple{std::move(lvalues)}
|
||||
@@ -1694,7 +1694,7 @@ void IRGeneratorForStatements::setLValue(Expression const& _expression, IRLValue
|
||||
{
|
||||
solAssert(!m_currentLValue, "");
|
||||
|
||||
if (_expression.annotation().lValueRequested)
|
||||
if (_expression.annotation().willBeWrittenTo)
|
||||
{
|
||||
m_currentLValue.emplace(std::move(_lvalue));
|
||||
solAssert(!_lvalue.type.dataStoredIn(DataLocation::CallData), "");
|
||||
|
||||
@@ -139,7 +139,7 @@ private:
|
||||
/// @returns a fresh IR variable containing the value of the lvalue @a _lvalue.
|
||||
IRVariable readFromLValue(IRLValue const& _lvalue);
|
||||
|
||||
/// Stores the given @a _lvalue in m_currentLValue, if it will be written to (lValueRequested). Otherwise
|
||||
/// Stores the given @a _lvalue in m_currentLValue, if it will be written to (willBeWrittenTo). Otherwise
|
||||
/// defines the expression @a _expression by reading the value from @a _lvalue.
|
||||
void setLValue(Expression const& _expression, IRLValue _lvalue);
|
||||
void generateLoop(
|
||||
|
||||
Reference in New Issue
Block a user