diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-25 22:43:26 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-25 22:43:26 +0800 |
commit | e6f55fb95e913a5167ebd1f43a0eebb8b6d17daf (patch) | |
tree | f99e7491712c989c78eef3f4c27b4a691ff1a2dd /libsolidity | |
parent | 670df8e874662901fe16b6c1995c5eeadf1283a1 (diff) | |
download | dexon-solidity-e6f55fb95e913a5167ebd1f43a0eebb8b6d17daf.tar dexon-solidity-e6f55fb95e913a5167ebd1f43a0eebb8b6d17daf.tar.gz dexon-solidity-e6f55fb95e913a5167ebd1f43a0eebb8b6d17daf.tar.bz2 dexon-solidity-e6f55fb95e913a5167ebd1f43a0eebb8b6d17daf.tar.lz dexon-solidity-e6f55fb95e913a5167ebd1f43a0eebb8b6d17daf.tar.xz dexon-solidity-e6f55fb95e913a5167ebd1f43a0eebb8b6d17daf.tar.zst dexon-solidity-e6f55fb95e913a5167ebd1f43a0eebb8b6d17daf.zip |
Do not create a new TypeChecker instance for every contract
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 1f6fd12f..7e4518b9 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -200,14 +200,12 @@ bool CompilerStack::analyze() m_contracts[contract->fullyQualifiedName()].contract = contract; } + TypeChecker typeChecker(m_errorReporter); for (Source const* source: m_sourceOrder) for (ASTPointer<ASTNode> const& node: source->ast->nodes()) if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get())) - { - TypeChecker typeChecker(m_errorReporter); if (!typeChecker.checkTypeRequirements(*contract)) noErrors = false; - } if (noErrors) { |