diff options
author | chriseth <chris@ethereum.org> | 2017-07-27 17:52:42 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-07-27 19:45:39 +0800 |
commit | 7c7c2baa82ec2fa0535381c2ea3418b8623a9062 (patch) | |
tree | 6a5bea3334a5e4c426beea7365312b314ab1f36f /libsolidity/codegen/CompilerContext.h | |
parent | 07e0a7e090111dd49e0bb6af96a4036f1bd186ac (diff) | |
download | dexon-solidity-7c7c2baa82ec2fa0535381c2ea3418b8623a9062.tar dexon-solidity-7c7c2baa82ec2fa0535381c2ea3418b8623a9062.tar.gz dexon-solidity-7c7c2baa82ec2fa0535381c2ea3418b8623a9062.tar.bz2 dexon-solidity-7c7c2baa82ec2fa0535381c2ea3418b8623a9062.tar.lz dexon-solidity-7c7c2baa82ec2fa0535381c2ea3418b8623a9062.tar.xz dexon-solidity-7c7c2baa82ec2fa0535381c2ea3418b8623a9062.tar.zst dexon-solidity-7c7c2baa82ec2fa0535381c2ea3418b8623a9062.zip |
Re-allow multiple modifiers per function.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.h')
-rw-r--r-- | libsolidity/codegen/CompilerContext.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h index 1968c1e1..13821f67 100644 --- a/libsolidity/codegen/CompilerContext.h +++ b/libsolidity/codegen/CompilerContext.h @@ -272,7 +272,10 @@ private: /// Storage offsets of state variables std::map<Declaration const*, std::pair<u256, unsigned>> m_stateVariables; /// Offsets of local variables on the stack (relative to stack base). - std::map<Declaration const*, unsigned> m_localVariables; + /// This needs to be a stack because if a modifier contains a local variable and this + /// modifier is applied twice, the position of the variable needs to be restored + /// after the nested modifier is left. + std::map<Declaration const*, std::vector<unsigned>> m_localVariables; /// List of current inheritance hierarchy from derived to base. std::vector<ContractDefinition const*> m_inheritanceHierarchy; /// Stack of current visited AST nodes, used for location attachment |