aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/backends/evm/EVMAssembly.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-08-25 23:04:31 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-16 03:44:49 +0800
commit73771f5bb2d8aee1b71dfcc909a60aa47c591dec (patch)
tree25e580641cc09f52c11447e2045dea747f3980b3 /libjulia/backends/evm/EVMAssembly.cpp
parent7dd372ce5c9ea1cacf2c70a16f0285bb74314db8 (diff)
downloaddexon-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.cpp8
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.");