aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm
diff options
context:
space:
mode:
authorAlexander Arlt <alexander.arlt@arlt-labs.com>2018-05-02 19:29:16 +0800
committerAlexander Arlt <alexander.arlt@arlt-labs.com>2018-05-02 19:29:16 +0800
commitf94b793472a8427e0507862cd5595cc92e70f53c (patch)
treeb017d487890f286a05e5cfe97215f5e2a3985bb8 /libevmasm
parent5cce2e552baf1f7431c99500da74cb929360c3b8 (diff)
downloaddexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar
dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.gz
dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.bz2
dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.lz
dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.xz
dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.tar.zst
dexon-solidity-f94b793472a8427e0507862cd5595cc92e70f53c.zip
Add virtual destructors on base classes.
Diffstat (limited to 'libevmasm')
-rw-r--r--libevmasm/ConstantOptimiser.h1
-rw-r--r--libevmasm/PeepholeOptimiser.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/libevmasm/ConstantOptimiser.h b/libevmasm/ConstantOptimiser.h
index 9b60b26b..f0deb387 100644
--- a/libevmasm/ConstantOptimiser.h
+++ b/libevmasm/ConstantOptimiser.h
@@ -67,6 +67,7 @@ public:
explicit ConstantOptimisationMethod(Params const& _params, u256 const& _value):
m_params(_params), m_value(_value) {}
+ virtual ~ConstantOptimisationMethod() = default;
virtual bigint gasNeeded() const = 0;
/// Executes the method, potentially appending to the assembly and returns a vector of
/// assembly items the constant should be relpaced with in one sweep.
diff --git a/libevmasm/PeepholeOptimiser.h b/libevmasm/PeepholeOptimiser.h
index a74cc8b3..a651143d 100644
--- a/libevmasm/PeepholeOptimiser.h
+++ b/libevmasm/PeepholeOptimiser.h
@@ -34,6 +34,7 @@ using AssemblyItems = std::vector<AssemblyItem>;
class PeepholeOptimisationMethod
{
public:
+ virtual ~PeepholeOptimisationMethod() = default;
virtual size_t windowSize() const;
virtual bool apply(AssemblyItems::const_iterator _in, std::back_insert_iterator<AssemblyItems> _out);
};
@@ -42,6 +43,7 @@ class PeepholeOptimiser
{
public:
explicit PeepholeOptimiser(AssemblyItems& _items): m_items(_items) {}
+ virtual ~PeepholeOptimiser() = default;
bool optimise();