diff options
author | chriseth <chris@ethereum.org> | 2017-05-29 22:14:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-29 22:14:22 +0800 |
commit | 9822deeed9d0be1324d6b6bdbdf83ae7ebca9b69 (patch) | |
tree | 06b2de6eab97c521dcd036423a1deb4da6e95e28 /libsolidity/inlineasm | |
parent | 002df12d13fb423be641878a20b73bd10f90a6df (diff) | |
parent | 9adff68ecc9fe725670c3752429d18d15379644b (diff) | |
download | dexon-solidity-9822deeed9d0be1324d6b6bdbdf83ae7ebca9b69.tar.gz dexon-solidity-9822deeed9d0be1324d6b6bdbdf83ae7ebca9b69.tar.zst dexon-solidity-9822deeed9d0be1324d6b6bdbdf83ae7ebca9b69.zip |
Merge pull request #2321 from ethereum/labelid_typedef
Introduce LabelID typedef.
Diffstat (limited to 'libsolidity/inlineasm')
-rw-r--r-- | libsolidity/inlineasm/AsmCodeGen.cpp | 4 | ||||
-rw-r--r-- | libsolidity/inlineasm/AsmScope.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libsolidity/inlineasm/AsmCodeGen.cpp b/libsolidity/inlineasm/AsmCodeGen.cpp index 6a44faac..af3547fd 100644 --- a/libsolidity/inlineasm/AsmCodeGen.cpp +++ b/libsolidity/inlineasm/AsmCodeGen.cpp @@ -70,12 +70,12 @@ public: m_assembly.append(_constant); } /// Append a label. - virtual void appendLabel(size_t _labelId) override + virtual void appendLabel(LabelID _labelId) override { m_assembly.append(eth::AssemblyItem(eth::Tag, _labelId)); } /// Append a label reference. - virtual void appendLabelReference(size_t _labelId) override + virtual void appendLabelReference(LabelID _labelId) override { m_assembly.append(eth::AssemblyItem(eth::PushTag, _labelId)); } diff --git a/libsolidity/inlineasm/AsmScope.h b/libsolidity/inlineasm/AsmScope.h index 70786dce..498218b4 100644 --- a/libsolidity/inlineasm/AsmScope.h +++ b/libsolidity/inlineasm/AsmScope.h @@ -63,6 +63,7 @@ struct GenericVisitor<>: public boost::static_visitor<> { struct Scope { using JuliaType = std::string; + using LabelID = size_t; struct Variable { @@ -76,7 +77,7 @@ struct Scope struct Label { - boost::optional<size_t> id; + boost::optional<LabelID> id; }; struct Function |