diff options
author | chriseth <chris@ethereum.org> | 2017-03-22 02:38:37 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-04-25 22:49:03 +0800 |
commit | c6fa78c73e3a23661014fd03b92d74d2e7df9e81 (patch) | |
tree | 7ad6f3ff22eb5bccd72cd868d153f0370203783a /libsolidity/analysis/ReferencesResolver.cpp | |
parent | e0849f2f3bbb23ebddb37cd770f46266967e789d (diff) | |
download | dexon-solidity-c6fa78c73e3a23661014fd03b92d74d2e7df9e81.tar.gz dexon-solidity-c6fa78c73e3a23661014fd03b92d74d2e7df9e81.tar.zst dexon-solidity-c6fa78c73e3a23661014fd03b92d74d2e7df9e81.zip |
Use actual type checking phase of assembler.
Diffstat (limited to 'libsolidity/analysis/ReferencesResolver.cpp')
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp index 5ff4ee2d..a50fc6a0 100644 --- a/libsolidity/analysis/ReferencesResolver.cpp +++ b/libsolidity/analysis/ReferencesResolver.cpp @@ -25,7 +25,7 @@ #include <libsolidity/analysis/NameAndTypeResolver.h> #include <libsolidity/interface/Exceptions.h> #include <libsolidity/analysis/ConstantEvaluator.h> -#include <libsolidity/inlineasm/AsmCodeGen.h> +#include <libsolidity/inlineasm/AsmAnalysis.h> #include <libsolidity/inlineasm/AsmData.h> using namespace std; @@ -163,9 +163,8 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly) // The only purpose of this step is to fill the inline assembly annotation with // external references. ErrorList errorsIgnored; - assembly::CodeGenerator codeGen(_inlineAssembly.operations(), errorsIgnored); - assembly::ExternalIdentifierAccess identifierAccess; - identifierAccess.resolve = [&](assembly::Identifier const& _identifier, assembly::IdentifierContext) { + assembly::ExternalIdentifierAccess::Resolver resolver = + [&](assembly::Identifier const& _identifier, assembly::IdentifierContext) { auto declarations = m_resolver.nameFromCurrentScope(_identifier.name); if (declarations.size() != 1) return size_t(-1); @@ -173,7 +172,8 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly) // At this stage we do not yet know the stack size of the identifier, so we just return 1. return size_t(1); }; - codeGen.typeCheck(identifierAccess); + assembly::AsmAnalyzer::Scopes scopes; + assembly::AsmAnalyzer(scopes, errorsIgnored, resolver).analyze(_inlineAssembly.operations()); return false; } |