Skip to content

Commit

Permalink
Remove log.h from solidity.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth committed Apr 11, 2016
1 parent 193b1c9 commit 6f54b13
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 19 deletions.
9 changes: 0 additions & 9 deletions libevmasm/Assembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include "Assembly.h"
#include <fstream>
#include <libdevcore/Log.h>
#include <libevmasm/CommonSubexpressionEliminator.h>
#include <libevmasm/ControlFlowGraph.h>
#include <libevmasm/BlockDeduplicator.h>
Expand Down Expand Up @@ -307,9 +306,6 @@ void Assembly::injectStart(AssemblyItem const& _i)
m_items.insert(m_items.begin(), _i);
}

struct OptimiserChannel: public LogChannel { static const char* name() { return "OPT"; } static const int verbosity = 12; };
#define copt dev::LogOutputStream<OptimiserChannel, true>()

Assembly& Assembly::optimise(bool _enable, bool _isCreation, size_t _runs)
{
if (!_enable)
Expand All @@ -318,10 +314,8 @@ Assembly& Assembly::optimise(bool _enable, bool _isCreation, size_t _runs)
unsigned total = 0;
for (unsigned count = 1; count > 0; total += count)
{
copt << toString(*this);
count = 0;

copt << "Performing optimisation...";
// This only modifies PushTags, we have to run again to actually remove code.
BlockDeduplicator dedup(m_items);
if (dedup.deduplicate())
Expand Down Expand Up @@ -360,7 +354,6 @@ Assembly& Assembly::optimise(bool _enable, bool _isCreation, size_t _runs)

if (shouldReplace)
{
copt << "Old size: " << (iter - orig) << ", new size: " << optimisedChunk.size();
count++;
optimisedItems += optimisedChunk;
}
Expand All @@ -384,8 +377,6 @@ Assembly& Assembly::optimise(bool _enable, bool _isCreation, size_t _runs)
m_items
);

copt << total << " optimisations done.";

for (auto& sub: m_subs)
sub.optimise(true, false, _runs);

Expand Down
1 change: 0 additions & 1 deletion libevmasm/Instruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <functional>
#include <libdevcore/Common.h>
#include <libdevcore/CommonIO.h>
#include <libdevcore/Log.h>
using namespace std;
using namespace dev;
using namespace dev::solidity;
Expand Down
1 change: 0 additions & 1 deletion liblll/CodeFragment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <boost/spirit/include/support_utree.hpp>
#pragma warning(pop)
#pragma GCC diagnostic pop
#include <libdevcore/Log.h>
#include <libdevcore/CommonIO.h>
#include <libevmasm/Instruction.h>
#include "CompilerState.h"
Expand Down
1 change: 1 addition & 0 deletions libsolidity/ast/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <map>
#include <boost/noncopyable.hpp>
#include <libdevcore/Common.h>
#include <libdevcore/CommonIO.h>
#include <libsolidity/interface/Exceptions.h>
#include <libsolidity/ast/ASTForward.h>
#include <libsolidity/parsing/Token.h>
Expand Down
1 change: 0 additions & 1 deletion libsolidity/parsing/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include <ctype.h>
#include <vector>
#include <libdevcore/Log.h>
#include <libevmasm/SourceLocation.h>
#include <libsolidity/parsing/Parser.h>
#include <libsolidity/parsing/Scanner.h>
Expand Down
1 change: 0 additions & 1 deletion libsolidity/parsing/Scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
#pragma once

#include <libdevcore/Common.h>
#include <libdevcore/Log.h>
#include <libdevcore/CommonData.h>
#include <libevmasm/SourceLocation.h>
#include <libsolidity/parsing/Token.h>
Expand Down
1 change: 0 additions & 1 deletion libsolidity/parsing/Token.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#pragma once

#include <libdevcore/Common.h>
#include <libdevcore/Log.h>
#include <libsolidity/interface/Utils.h>
#include <libsolidity/interface/Exceptions.h>
#include <libdevcore/UndefMacros.h>
Expand Down
1 change: 0 additions & 1 deletion test/libsolidity/Assembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <string>
#include <iostream>
#include <boost/test/unit_test.hpp>
#include <libdevcore/Log.h>
#include <libevmasm/SourceLocation.h>
#include <libevmasm/Assembly.h>
#include <libsolidity/parsing/Scanner.h>
Expand Down
1 change: 0 additions & 1 deletion test/libsolidity/InlineAssembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include <string>
#include <memory>
#include <libdevcore/Log.h>
#include <libevmasm/Assembly.h>
#include <libsolidity/parsing/Scanner.h>
#include <libsolidity/inlineasm/AsmStack.h>
Expand Down
1 change: 0 additions & 1 deletion test/libsolidity/SolidityExpressionCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include <string>

#include <libdevcore/Log.h>
#include <libsolidity/parsing/Scanner.h>
#include <libsolidity/parsing/Parser.h>
#include <libsolidity/analysis/NameAndTypeResolver.h>
Expand Down
1 change: 0 additions & 1 deletion test/libsolidity/SolidityNameAndTypeResolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include <string>

#include <libdevcore/Log.h>
#include <libdevcore/SHA3.h>
#include <libsolidity/parsing/Scanner.h>
#include <libsolidity/parsing/Parser.h>
Expand Down
1 change: 0 additions & 1 deletion test/libsolidity/SolidityParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include <string>
#include <memory>
#include <libdevcore/Log.h>
#include <libsolidity/parsing/Scanner.h>
#include <libsolidity/parsing/Parser.h>
#include <libsolidity/interface/Exceptions.h>
Expand Down

0 comments on commit 6f54b13

Please sign in to comment.