From f5b2044ed11d5d513b4595287228d5c1fc603dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 20 Apr 2023 19:47:46 +0200 Subject: [PATCH] Remove unused CompilerStack::m_sourceJsons --- libsolidity/interface/CompilerStack.cpp | 5 ++--- libsolidity/interface/CompilerStack.h | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 02aa38c04..ad2618bc0 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -407,15 +407,14 @@ void CompilerStack::importASTs(map const& _sources) { if (m_stackState != Empty) solThrow(CompilerError, "Must call importASTs only before the SourcesSet state."); - m_sourceJsons = _sources; - map> reconstructedSources = ASTJsonImporter(m_evmVersion).jsonToSourceUnit(m_sourceJsons); + map> 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( - util::jsonCompactPrint(m_sourceJsons[src.first]), + util::jsonCompactPrint(_sources.at(src.first)), src.first, true // imported from AST ); diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index 650d8e46f..36e462330 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -514,8 +514,6 @@ private: std::map m_libraries; ImportRemapper m_importRemapper; std::map m_sources; - // if imported, store AST-JSONS for each filename - std::map m_sourceJsons; std::vector m_unhandledSMTLib2Queries; std::map m_smtlib2Responses; std::shared_ptr m_globalContext;