diff options
author | Christian Parpart <christian@ethereum.org> | 2019-01-09 21:05:03 +0800 |
---|---|---|
committer | Christian Parpart <christian@ethereum.org> | 2019-01-16 21:58:59 +0800 |
commit | 065c3c87af0cd4f620d929a01b2902edf6c5892d (patch) | |
tree | cb33b216ddec2415c6cde661fe9cc90326123c48 /libyul/optimiser/DataFlowAnalyzer.cpp | |
parent | 778b14de260a7eeaea88867e39cfc226f1494e63 (diff) | |
download | dexon-solidity-065c3c87af0cd4f620d929a01b2902edf6c5892d.tar dexon-solidity-065c3c87af0cd4f620d929a01b2902edf6c5892d.tar.gz dexon-solidity-065c3c87af0cd4f620d929a01b2902edf6c5892d.tar.bz2 dexon-solidity-065c3c87af0cd4f620d929a01b2902edf6c5892d.tar.lz dexon-solidity-065c3c87af0cd4f620d929a01b2902edf6c5892d.tar.xz dexon-solidity-065c3c87af0cd4f620d929a01b2902edf6c5892d.tar.zst dexon-solidity-065c3c87af0cd4f620d929a01b2902edf6c5892d.zip |
libyul: changing some AST members from shared_ptr<> to unique_ptr<>
* Some spaces look a little more verbose now, but that shouln't be a problem as it also should raise readability, too.
* This makes some use of return-value-optimizations also.
Diffstat (limited to 'libyul/optimiser/DataFlowAnalyzer.cpp')
-rw-r--r-- | libyul/optimiser/DataFlowAnalyzer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libyul/optimiser/DataFlowAnalyzer.cpp b/libyul/optimiser/DataFlowAnalyzer.cpp index e97bcdc4..b4f2d1f9 100644 --- a/libyul/optimiser/DataFlowAnalyzer.cpp +++ b/libyul/optimiser/DataFlowAnalyzer.cpp @@ -51,8 +51,10 @@ void DataFlowAnalyzer::operator()(VariableDeclaration& _varDecl) for (auto const& var: _varDecl.variables) names.emplace(var.name); m_variableScopes.back().variables += names; + if (_varDecl.value) visit(*_varDecl.value); + handleAssignment(names, _varDecl.value.get()); } |