aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog.md1
-rw-r--r--libsolidity/inlineasm/AsmCodeGen.cpp6
2 files changed, 6 insertions, 1 deletions
diff --git a/Changelog.md b/Changelog.md
index 4d68fc69..d5f8cea9 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -2,6 +2,7 @@
Features:
* Do-while loops: support for a C-style do{<block>}while(<expr>); control structure
+ * Inline assembly: support ``ErrorTag`` as a jump label.
* Type checker: now more eagerly searches for a common type of an inline array with mixed types
* Code generator: generates a runtime error when an out-of-range value is converted into an enum type.
diff --git a/libsolidity/inlineasm/AsmCodeGen.cpp b/libsolidity/inlineasm/AsmCodeGen.cpp
index 76c71048..1b789c5f 100644
--- a/libsolidity/inlineasm/AsmCodeGen.cpp
+++ b/libsolidity/inlineasm/AsmCodeGen.cpp
@@ -81,7 +81,11 @@ struct GeneratorState
class LabelOrganizer: public boost::static_visitor<>
{
public:
- LabelOrganizer(GeneratorState& _state): m_state(_state) {}
+ LabelOrganizer(GeneratorState& _state): m_state(_state)
+ {
+ // Make the Solidity ErrorTag available to inline assembly
+ m_state.labels.insert(make_pair("ErrorTag", m_state.assembly.errorTag()));
+ }
template <class T>
void operator()(T const& /*_item*/) { }