aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/CompilerStack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r--libsolidity/interface/CompilerStack.cpp31
1 files changed, 2 insertions, 29 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp
index 7a87875c..d5a4e554 100644
--- a/libsolidity/interface/CompilerStack.cpp
+++ b/libsolidity/interface/CompilerStack.cpp
@@ -87,6 +87,7 @@ void CompilerStack::reset(bool _keepSources)
m_stackState = Empty;
m_sources.clear();
}
+ m_libraries.clear();
m_optimize = false;
m_optimizeRuns = 200;
m_globalContext.reset();
@@ -106,12 +107,6 @@ bool CompilerStack::addSource(string const& _name, string const& _content, bool
return existed;
}
-void CompilerStack::setSource(string const& _sourceCode)
-{
- reset();
- addSource("", _sourceCode);
-}
-
bool CompilerStack::parse()
{
//reset
@@ -252,23 +247,11 @@ bool CompilerStack::analyze()
return false;
}
-bool CompilerStack::parse(string const& _sourceCode)
-{
- setSource(_sourceCode);
- return parse();
-}
-
bool CompilerStack::parseAndAnalyze()
{
return parse() && analyze();
}
-bool CompilerStack::parseAndAnalyze(std::string const& _sourceCode)
-{
- setSource(_sourceCode);
- return parseAndAnalyze();
-}
-
vector<string> CompilerStack::contractNames() const
{
if (m_stackState < AnalysisSuccessful)
@@ -279,17 +262,12 @@ vector<string> CompilerStack::contractNames() const
return contractNames;
}
-
-bool CompilerStack::compile(bool _optimize, unsigned _runs, map<string, h160> const& _libraries)
+bool CompilerStack::compile()
{
if (m_stackState < AnalysisSuccessful)
if (!parseAndAnalyze())
return false;
- m_optimize = _optimize;
- m_optimizeRuns = _runs;
- m_libraries = _libraries;
-
map<ContractDefinition const*, eth::Assembly const*> compiledContracts;
for (Source const* source: m_sourceOrder)
for (ASTPointer<ASTNode> const& node: source->ast->nodes())
@@ -300,11 +278,6 @@ bool CompilerStack::compile(bool _optimize, unsigned _runs, map<string, h160> co
return true;
}
-bool CompilerStack::compile(string const& _sourceCode, bool _optimize, unsigned _runs)
-{
- return parseAndAnalyze(_sourceCode) && compile(_optimize, _runs);
-}
-
void CompilerStack::link()
{
for (auto& contract: m_contracts)