aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-01-19 18:32:11 +0800
committerchriseth <c@ethdev.com>2015-01-19 18:32:11 +0800
commit325b052b164992b6c19cb5c4550680d7f2a8e380 (patch)
tree36fa6cea3f87dd66ea61f7823c2329027e2dcf4b /ExpressionCompiler.h
parent930532165cdc0404120a5f0c76ff6d7673ff2222 (diff)
parentc3d36d1fe197156427cd8adb4edbf955bba0531a (diff)
downloaddexon-solidity-325b052b164992b6c19cb5c4550680d7f2a8e380.tar.gz
dexon-solidity-325b052b164992b6c19cb5c4550680d7f2a8e380.tar.zst
dexon-solidity-325b052b164992b6c19cb5c4550680d7f2a8e380.zip
Merge pull request #805 from LianaHus/deleteStruct
delete for structs -added functionality to set values to 0 when deleting structure(not for ...
Diffstat (limited to 'ExpressionCompiler.h')
-rw-r--r--ExpressionCompiler.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h
index 4a696c39..8f784fde 100644
--- a/ExpressionCompiler.h
+++ b/ExpressionCompiler.h
@@ -111,7 +111,7 @@ private:
/// Set type according to the declaration and retrieve the reference.
/// @a _expression is the current expression
void fromIdentifier(Identifier const& _identifier, Declaration const& _declaration);
- void reset() { m_type = NONE; m_baseStackOffset = 0; }
+ void reset() { m_type = NONE; m_baseStackOffset = 0; m_size = 0; }
bool isValid() const { return m_type != NONE; }
bool isInOnStack() const { return m_type == STACK; }
@@ -130,7 +130,9 @@ private:
/// Also removes the stored value from the stack if @a _move is
/// true. @a _expression is the current expression, used for error reporting.
void storeValue(Expression const& _expression, bool _move = false) const;
-
+ /// Stores zero in the lvalue.
+ /// @a _expression is the current expression, used for error reporting.
+ void setToZero(Expression const& _expression) const;
/// Convenience function to convert the stored reference to a value and reset type to NONE if
/// the reference was not requested by @a _expression.
void retrieveValueIfLValueNotRequested(Expression const& _expression);
@@ -141,8 +143,8 @@ private:
/// If m_type is STACK, this is base stack offset (@see
/// CompilerContext::getBaseStackOffsetOfVariable) of a local variable.
unsigned m_baseStackOffset = 0;
- /// Size of the value of this lvalue on the stack.
- unsigned m_stackSize = 0;
+ /// Size of the value of this lvalue on the stack or the storage.
+ unsigned m_size = 0;
};
bool m_optimize;