aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/LValue.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/codegen/LValue.h')
-rw-r--r--libsolidity/codegen/LValue.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/libsolidity/codegen/LValue.h b/libsolidity/codegen/LValue.h
index c576f9de..d854857b 100644
--- a/libsolidity/codegen/LValue.h
+++ b/libsolidity/codegen/LValue.h
@@ -24,7 +24,7 @@
#include <memory>
#include <vector>
-#include <libevmasm/SourceLocation.h>
+#include <liblangutil/SourceLocation.h>
#include <libsolidity/codegen/ArrayUtils.h>
namespace dev
@@ -55,17 +55,17 @@ public:
/// Copies the value of the current lvalue to the top of the stack and, if @a _remove is true,
/// also removes the reference from the stack.
/// @a _location source location of the current expression, used for error reporting.
- virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const = 0;
+ virtual void retrieveValue(langutil::SourceLocation const& _location, bool _remove = false) const = 0;
/// Moves a value from the stack to the lvalue. Removes the value if @a _move is true.
/// @a _location is the source location of the expression that caused this operation.
/// Stack pre: value [lvalue_ref]
/// Stack post: if !_move: value_of(lvalue_ref)
virtual void storeValue(Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(), bool _move = false) const = 0;
+ langutil::SourceLocation const& _location = {}, bool _move = false) const = 0;
/// 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(),
+ langutil::SourceLocation const& _location = {},
bool _removeReference = true
) const = 0;
@@ -82,15 +82,15 @@ class StackVariable: public LValue
public:
StackVariable(CompilerContext& _compilerContext, VariableDeclaration const& _declaration);
- virtual unsigned sizeOnStack() const override { return 0; }
- virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
+ unsigned sizeOnStack() const override { return 0; }
+ void retrieveValue(langutil::SourceLocation const& _location, bool _remove = false) const override;
virtual void storeValue(
Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _move = false
) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _removeReference = true
) const override;
@@ -108,15 +108,15 @@ class MemoryItem: public LValue
{
public:
MemoryItem(CompilerContext& _compilerContext, Type const& _type, bool _padded = true);
- virtual unsigned sizeOnStack() const override { return 1; }
- virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
+ unsigned sizeOnStack() const override { return 1; }
+ void retrieveValue(langutil::SourceLocation const& _location, bool _remove = false) const override;
virtual void storeValue(
Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _move = false
) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _removeReference = true
) const override;
private:
@@ -136,15 +136,15 @@ public:
StorageItem(CompilerContext& _compilerContext, VariableDeclaration const& _declaration);
/// Constructs the LValue and assumes that the storage reference is already on the stack.
StorageItem(CompilerContext& _compilerContext, Type const& _type);
- virtual unsigned sizeOnStack() const override { return 2; }
- virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
+ unsigned sizeOnStack() const override { return 2; }
+ void retrieveValue(langutil::SourceLocation const& _location, bool _remove = false) const override;
virtual void storeValue(
Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _move = false
) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _removeReference = true
) const override;
};
@@ -158,15 +158,15 @@ class StorageByteArrayElement: public LValue
public:
/// Constructs the LValue and assumes that the storage reference is already on the stack.
StorageByteArrayElement(CompilerContext& _compilerContext);
- virtual unsigned sizeOnStack() const override { return 2; }
- virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
+ unsigned sizeOnStack() const override { return 2; }
+ void retrieveValue(langutil::SourceLocation const& _location, bool _remove = false) const override;
virtual void storeValue(
Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _move = false
) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _removeReference = true
) const override;
};
@@ -181,14 +181,14 @@ class StorageArrayLength: public LValue
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;
+ void retrieveValue(langutil::SourceLocation const& _location, bool _remove = false) const override;
virtual void storeValue(
Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _move = false
) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _removeReference = true
) const override;
@@ -205,15 +205,15 @@ public:
/// Constructs the LValue assuming that the other LValues are present on the stack.
/// Empty unique_ptrs are possible if e.g. some values should be ignored during assignment.
TupleObject(CompilerContext& _compilerContext, std::vector<std::unique_ptr<LValue>>&& _lvalues);
- virtual unsigned sizeOnStack() const override;
- virtual void retrieveValue(SourceLocation const& _location, bool _remove = false) const override;
+ unsigned sizeOnStack() const override;
+ void retrieveValue(langutil::SourceLocation const& _location, bool _remove = false) const override;
virtual void storeValue(
Type const& _sourceType,
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _move = false
) const override;
virtual void setToZero(
- SourceLocation const& _location = SourceLocation(),
+ langutil::SourceLocation const& _location = {},
bool _removeReference = true
) const override;