diff options
author | Christian Parpart <christian@ethereum.org> | 2018-11-15 00:11:55 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-11-22 03:13:44 +0800 |
commit | d67322a1861d60a88151f7c25d6c3478a9a39acf (patch) | |
tree | af485e48c3436cd24e2db09a6a1bcf445605bae1 /libevmasm/AssemblyItem.h | |
parent | 80371e2d25ce3eb868d6f75b99a54af9dc6c1583 (diff) | |
download | dexon-solidity-d67322a1861d60a88151f7c25d6c3478a9a39acf.tar.gz dexon-solidity-d67322a1861d60a88151f7c25d6c3478a9a39acf.tar.zst dexon-solidity-d67322a1861d60a88151f7c25d6c3478a9a39acf.zip |
Introduce namespace `langutil` in liblangutil directory.
Also:
- Use {}-style list initialisation for SourceLocation construction
- Introduce new system includes
- Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
Diffstat (limited to 'libevmasm/AssemblyItem.h')
-rw-r--r-- | libevmasm/AssemblyItem.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libevmasm/AssemblyItem.h b/libevmasm/AssemblyItem.h index 802bde25..a7875171 100644 --- a/libevmasm/AssemblyItem.h +++ b/libevmasm/AssemblyItem.h @@ -57,14 +57,14 @@ class AssemblyItem public: enum class JumpType { Ordinary, IntoFunction, OutOfFunction }; - AssemblyItem(u256 _push, SourceLocation const& _location = SourceLocation()): + AssemblyItem(u256 _push, langutil::SourceLocation const& _location = langutil::SourceLocation()): AssemblyItem(Push, _push, _location) { } - AssemblyItem(solidity::Instruction _i, SourceLocation const& _location = SourceLocation()): + AssemblyItem(solidity::Instruction _i, langutil::SourceLocation const& _location = langutil::SourceLocation()): m_type(Operation), m_instruction(_i), m_location(_location) {} - AssemblyItem(AssemblyItemType _type, u256 _data = 0, SourceLocation const& _location = SourceLocation()): + AssemblyItem(AssemblyItemType _type, u256 _data = 0, langutil::SourceLocation const& _location = langutil::SourceLocation()): m_type(_type), m_location(_location) { @@ -124,8 +124,8 @@ public: /// @returns true if the assembly item can be used in a functional context. bool canBeFunctional() const; - void setLocation(SourceLocation const& _location) { m_location = _location; } - SourceLocation const& location() const { return m_location; } + void setLocation(langutil::SourceLocation const& _location) { m_location = _location; } + langutil::SourceLocation const& location() const { return m_location; } void setJumpType(JumpType _jumpType) { m_jumpType = _jumpType; } JumpType getJumpType() const { return m_jumpType; } @@ -140,7 +140,7 @@ private: AssemblyItemType m_type; Instruction m_instruction; ///< Only valid if m_type == Operation std::shared_ptr<u256> m_data; ///< Only valid if m_type != Operation - SourceLocation m_location; + langutil::SourceLocation m_location; JumpType m_jumpType = JumpType::Ordinary; /// Pushed value for operations with data to be determined during assembly stage, /// e.g. PushSubSize, PushTag, PushSub, etc. |