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.h | |
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.h')
-rw-r--r-- | libjulia/backends/evm/EVMAssembly.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libjulia/backends/evm/EVMAssembly.h b/libjulia/backends/evm/EVMAssembly.h index 69585822..593cee6a 100644 --- a/libjulia/backends/evm/EVMAssembly.h +++ b/libjulia/backends/evm/EVMAssembly.h @@ -52,6 +52,8 @@ public: virtual void appendLabelReference(LabelID _labelId) override; /// Generate a new unique label. virtual LabelID newLabelId() override; + /// Returns a label identified by the given name. Creates it if it does not yet exist. + virtual LabelID namedLabel(std::string const& _name) override; /// Append a reference to a to-be-linked symobl. /// Currently, we assume that the value is always a 20 byte number. virtual void appendLinkerSymbol(std::string const& _name) override; @@ -85,6 +87,7 @@ private: LabelID m_nextLabelId = 0; int m_stackHeight = 0; bytes m_bytecode; + std::map<std::string, LabelID> m_namedLabels; std::map<LabelID, size_t> m_labelPositions; std::map<size_t, LabelID> m_labelReferences; std::vector<size_t> m_assemblySizePositions; |