diff options
author | chriseth <chris@ethereum.org> | 2017-08-25 23:04:31 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-16 03:44:49 +0800 |
commit | 73771f5bb2d8aee1b71dfcc909a60aa47c591dec (patch) | |
tree | 25e580641cc09f52c11447e2045dea747f3980b3 /libjulia/backends/evm/EVMAssembly.cpp | |
parent | 7dd372ce5c9ea1cacf2c70a16f0285bb74314db8 (diff) | |
download | dexon-solidity-73771f5bb2d8aee1b71dfcc909a60aa47c591dec.tar.gz dexon-solidity-73771f5bb2d8aee1b71dfcc909a60aa47c591dec.tar.zst dexon-solidity-73771f5bb2d8aee1b71dfcc909a60aa47c591dec.zip |
Named assembly labels.
Diffstat (limited to 'libjulia/backends/evm/EVMAssembly.cpp')
-rw-r--r-- | libjulia/backends/evm/EVMAssembly.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libjulia/backends/evm/EVMAssembly.cpp b/libjulia/backends/evm/EVMAssembly.cpp index 173d5e93..1d499b20 100644 --- a/libjulia/backends/evm/EVMAssembly.cpp +++ b/libjulia/backends/evm/EVMAssembly.cpp @@ -77,6 +77,14 @@ EVMAssembly::LabelID EVMAssembly::newLabelId() return m_nextLabelId++; } +AbstractAssembly::LabelID EVMAssembly::namedLabel(string const& _name) +{ + solAssert(!_name.empty(), ""); + if (!m_namedLabels.count(_name)) + m_namedLabels[_name] = newLabelId(); + return m_namedLabels[_name]; +} + void EVMAssembly::appendLinkerSymbol(string const&) { solAssert(false, "Linker symbols not yet implemented."); |