aboutsummaryrefslogtreecommitdiffstats
path: root/libjulia/backends/evm/EVMCodeTransform.h
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/EVMCodeTransform.h
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/EVMCodeTransform.h')
-rw-r--r--libjulia/backends/evm/EVMCodeTransform.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libjulia/backends/evm/EVMCodeTransform.h b/libjulia/backends/evm/EVMCodeTransform.h
index cd452c5b..2c0fd10c 100644
--- a/libjulia/backends/evm/EVMCodeTransform.h
+++ b/libjulia/backends/evm/EVMCodeTransform.h
@@ -50,13 +50,15 @@ public:
solidity::assembly::AsmAnalysisInfo& _analysisInfo,
bool _julia = false,
bool _evm15 = false,
- ExternalIdentifierAccess const& _identifierAccess = ExternalIdentifierAccess()
+ ExternalIdentifierAccess const& _identifierAccess = ExternalIdentifierAccess(),
+ bool _useNamedLabelsForFunctions = false
): CodeTransform(
_assembly,
_analysisInfo,
_julia,
_evm15,
_identifierAccess,
+ _useNamedLabelsForFunctions,
_assembly.stackHeight(),
std::make_shared<Context>()
)
@@ -78,6 +80,7 @@ protected:
bool _julia,
bool _evm15,
ExternalIdentifierAccess const& _identifierAccess,
+ bool _useNamedLabelsForFunctions,
int _stackAdjustment,
std::shared_ptr<Context> _context
):
@@ -85,6 +88,7 @@ protected:
m_info(_analysisInfo),
m_julia(_julia),
m_evm15(_evm15),
+ m_useNamedLabelsForFunctions(_useNamedLabelsForFunctions),
m_identifierAccess(_identifierAccess),
m_stackAdjustment(_stackAdjustment),
m_context(_context)
@@ -110,7 +114,7 @@ private:
/// @returns the label ID corresponding to the given label, allocating a new one if
/// necessary.
AbstractAssembly::LabelID labelID(solidity::assembly::Scope::Label const& _label);
- AbstractAssembly::LabelID functionEntryID(solidity::assembly::Scope::Function const& _function);
+ AbstractAssembly::LabelID functionEntryID(std::string const& _name, solidity::assembly::Scope::Function const& _function);
/// Generates code for an expression that is supposed to return a single value.
void visitExpression(solidity::assembly::Statement const& _expression);
@@ -136,6 +140,7 @@ private:
solidity::assembly::Scope* m_scope = nullptr;
bool m_julia = false;
bool m_evm15 = false;
+ bool m_useNamedLabelsForFunctions = false;
ExternalIdentifierAccess m_identifierAccess;
/// Adjustment between the stack height as determined during the analysis phase
/// and the stack height in the assembly. This is caused by an initial stack being present