aboutsummaryrefslogtreecommitdiffstats
path: root/LValue.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-05 22:41:39 +0800
committerchriseth <c@ethdev.com>2015-03-05 22:41:39 +0800
commit280df42463c61786dd2dac0106d3f23c1b3c4275 (patch)
tree483dd3f6bf6ca2a9a87504fcf3617b7b746230d9 /LValue.h
parentb84cf62d6bd3a9caa8a9a7f1dcd427418170aed9 (diff)
downloaddexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.tar
dexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.tar.gz
dexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.tar.bz2
dexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.tar.lz
dexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.tar.xz
dexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.tar.zst
dexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.zip
Styling
Diffstat (limited to 'LValue.h')
-rw-r--r--LValue.h48
1 files changed, 35 insertions, 13 deletions
diff --git a/LValue.h b/LValue.h
index 0ada4f88..c57c80e3 100644
--- a/LValue.h
+++ b/LValue.h
@@ -61,7 +61,9 @@ public:
/// Stores zero in the lvalue. Removes the reference from the stack if @a _removeReference is true.
/// @a _location is the source location of the requested operation
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(), bool _removeReference = true) const = 0;
+ SourceLocation const& _location = SourceLocation(),
+ bool _removeReference = true
+ ) const = 0;
protected:
CompilerContext& m_context;
@@ -78,10 +80,15 @@ public:
virtual unsigned sizeOnStack() const override { return 0; }
virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
- virtual void storeValue(Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(), bool _move = false) const override;
+ virtual void storeValue(
+ Type const& _sourceType,
+ SourceLocation const& _location = SourceLocation(),
+ bool _move = false
+ ) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(), bool _removeReference = true) const override;
+ SourceLocation const& _location = SourceLocation(),
+ bool _removeReference = true
+ ) const override;
private:
/// Base stack offset (@see CompilerContext::getBaseStackOffsetOfVariable) of the local variable.
@@ -101,10 +108,15 @@ public:
/// Constructs the LValue and assumes that the storage reference is already on the stack.
StorageItem(CompilerContext& _compilerContext, Type const& _type);
virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
- virtual void storeValue(Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(), bool _move = false) const override;
+ virtual void storeValue(
+ Type const& _sourceType,
+ SourceLocation const& _location = SourceLocation(),
+ bool _move = false
+ ) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(), bool _removeReference = true) const override;
+ SourceLocation const& _location = SourceLocation(),
+ bool _removeReference = true
+ ) const override;
private:
/// Number of stack elements occupied by the value (not the reference).
@@ -123,10 +135,15 @@ public:
StorageByteArrayElement(CompilerContext& _compilerContext);
virtual unsigned sizeOnStack() const override { return 2; }
virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
- virtual void storeValue(Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(), bool _move = false) const override;
+ virtual void storeValue(
+ Type const& _sourceType,
+ SourceLocation const& _location = SourceLocation(),
+ bool _move = false
+ ) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(), bool _removeReference = true) const override;
+ SourceLocation const& _location = SourceLocation(),
+ bool _removeReference = true
+ ) const override;
};
/**
@@ -140,10 +157,15 @@ public:
/// Constructs the LValue, assumes that the reference to the array head is already on the stack.
StorageArrayLength(CompilerContext& _compilerContext, ArrayType const& _arrayType);
virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
- virtual void storeValue(Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(), bool _move = false) const override;
+ virtual void storeValue(
+ Type const& _sourceType,
+ SourceLocation const& _location = SourceLocation(),
+ bool _move = false
+ ) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(), bool _removeReference = true) const override;
+ SourceLocation const& _location = SourceLocation(),
+ bool _removeReference = true
+ ) const override;
private:
ArrayType const& m_arrayType;