Remove unused CompilerStack::m_sourceJsons

This commit is contained in:
Kamil Śliwak 2023-04-20 19:47:46 +02:00
parent 611e02c038
commit f5b2044ed1
2 changed files with 2 additions and 5 deletions

View File

@ -407,15 +407,14 @@ void CompilerStack::importASTs(map<string, Json::Value> const& _sources)
{
if (m_stackState != Empty)
solThrow(CompilerError, "Must call importASTs only before the SourcesSet state.");
m_sourceJsons = _sources;
map<string, ASTPointer<SourceUnit>> reconstructedSources = ASTJsonImporter(m_evmVersion).jsonToSourceUnit(m_sourceJsons);
map<string, ASTPointer<SourceUnit>> reconstructedSources = ASTJsonImporter(m_evmVersion).jsonToSourceUnit(_sources);
for (auto& src: reconstructedSources)
{
string const& path = src.first;
Source source;
source.ast = src.second;
source.charStream = make_shared<CharStream>(
util::jsonCompactPrint(m_sourceJsons[src.first]),
util::jsonCompactPrint(_sources.at(src.first)),
src.first,
true // imported from AST
);

View File

@ -514,8 +514,6 @@ private:
std::map<std::string, util::h160> m_libraries;
ImportRemapper m_importRemapper;
std::map<std::string const, Source> m_sources;
// if imported, store AST-JSONS for each filename
std::map<std::string, Json::Value> m_sourceJsons;
std::vector<std::string> m_unhandledSMTLib2Queries;
std::map<util::h256, std::string> m_smtlib2Responses;
std::shared_ptr<GlobalContext> m_globalContext;