mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
lll: Adapted to namespace changes.
This commit is contained in:
parent
ed45b000d1
commit
8ac6258d31
@ -40,9 +40,10 @@
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace dev;
|
||||
using namespace dev::eth;
|
||||
using namespace dev::lll;
|
||||
using namespace solidity;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::evmasm;
|
||||
using namespace solidity::lll;
|
||||
|
||||
void CodeFragment::finalise(CompilerState const& _cs)
|
||||
{
|
||||
|
@ -29,9 +29,7 @@
|
||||
namespace boost { namespace spirit { class utree; } }
|
||||
namespace sp = boost::spirit;
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace lll
|
||||
namespace solidity::lll
|
||||
{
|
||||
|
||||
struct CompilerState;
|
||||
@ -55,7 +53,7 @@ private:
|
||||
template <class T> static void error() { BOOST_THROW_EXCEPTION(T() ); }
|
||||
template <class T> static void error(std::string const& reason) {
|
||||
auto err = T();
|
||||
err << errinfo_comment(reason);
|
||||
err << util::errinfo_comment(reason);
|
||||
BOOST_THROW_EXCEPTION(err);
|
||||
}
|
||||
void constructOperation(sp::utree const& _t, CompilerState& _s);
|
||||
@ -68,4 +66,3 @@ private:
|
||||
static CodeFragment const NullCodeFragment;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -25,10 +25,11 @@
|
||||
#include <liblll/CodeFragment.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace dev;
|
||||
using namespace dev::lll;
|
||||
using namespace solidity;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::lll;
|
||||
|
||||
bytes dev::lll::compileLLL(string _src, langutil::EVMVersion _evmVersion, bool _opt, std::vector<std::string>* _errors, ReadCallback const& _readFile)
|
||||
bytes solidity::lll::compileLLL(string _src, langutil::EVMVersion _evmVersion, bool _opt, std::vector<std::string>* _errors, ReadCallback const& _readFile)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -66,7 +67,7 @@ bytes dev::lll::compileLLL(string _src, langutil::EVMVersion _evmVersion, bool _
|
||||
return bytes();
|
||||
}
|
||||
|
||||
std::string dev::lll::compileLLLToAsm(std::string _src, langutil::EVMVersion _evmVersion, bool _opt, std::vector<std::string>* _errors, ReadCallback const& _readFile)
|
||||
std::string solidity::lll::compileLLLToAsm(std::string _src, langutil::EVMVersion _evmVersion, bool _opt, std::vector<std::string>* _errors, ReadCallback const& _readFile)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -104,7 +105,7 @@ std::string dev::lll::compileLLLToAsm(std::string _src, langutil::EVMVersion _ev
|
||||
return string();
|
||||
}
|
||||
|
||||
string dev::lll::parseLLL(string _src)
|
||||
string solidity::lll::parseLLL(string _src)
|
||||
{
|
||||
sp::utree o;
|
||||
|
||||
|
@ -28,9 +28,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace lll
|
||||
namespace solidity::lll
|
||||
{
|
||||
|
||||
using ReadCallback = std::function<std::string(std::string const&)>;
|
||||
@ -40,4 +38,3 @@ std::string compileLLLToAsm(std::string _src, langutil::EVMVersion _evmVersion,
|
||||
bytes compileLLL(std::string _src, langutil::EVMVersion _evmVersion, bool _opt = true, std::vector<std::string>* _errors = nullptr, ReadCallback const& _readFile = ReadCallback());
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,8 @@
|
||||
#include <liblll/CodeFragment.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace dev;
|
||||
using namespace dev::lll;
|
||||
using namespace solidity;
|
||||
using namespace solidity::lll;
|
||||
|
||||
CompilerState::CompilerState()
|
||||
{
|
||||
|
@ -24,9 +24,7 @@
|
||||
#include <liblll/CodeFragment.h>
|
||||
#include <boost/spirit/include/support_utree.hpp>
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace lll
|
||||
namespace solidity::lll
|
||||
{
|
||||
|
||||
struct Macro
|
||||
@ -54,4 +52,3 @@ struct CompilerState
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -23,13 +23,11 @@
|
||||
|
||||
#include <libdevcore/Exceptions.h>
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace lll
|
||||
namespace solidity::lll
|
||||
{
|
||||
|
||||
/// Compile a Low-level Lisp-like Language program into EVM-code.
|
||||
class CompilerException: public dev::Exception {};
|
||||
class CompilerException: public util::Exception {};
|
||||
class InvalidOperation: public CompilerException {};
|
||||
class IntegerOutOfRange: public CompilerException {};
|
||||
class EmptyList: public CompilerException {};
|
||||
@ -42,4 +40,3 @@ class BareSymbol: public CompilerException {};
|
||||
class ParserException: public CompilerException {};
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -32,13 +32,14 @@
|
||||
#include <boost/spirit/include/support_utree.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace dev;
|
||||
using namespace dev::lll;
|
||||
using namespace solidity;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::lll;
|
||||
namespace qi = boost::spirit::qi;
|
||||
namespace px = boost::phoenix;
|
||||
namespace sp = boost::spirit;
|
||||
|
||||
void dev::lll::killBigints(sp::utree const& _this)
|
||||
void solidity::lll::killBigints(sp::utree const& _this)
|
||||
{
|
||||
switch (_this.which())
|
||||
{
|
||||
@ -48,7 +49,7 @@ void dev::lll::killBigints(sp::utree const& _this)
|
||||
}
|
||||
}
|
||||
|
||||
void dev::lll::debugOutAST(ostream& _out, sp::utree const& _this)
|
||||
void solidity::lll::debugOutAST(ostream& _out, sp::utree const& _this)
|
||||
{
|
||||
switch (_this.which())
|
||||
{
|
||||
@ -74,7 +75,7 @@ void dev::lll::debugOutAST(ostream& _out, sp::utree const& _this)
|
||||
}
|
||||
}
|
||||
|
||||
namespace dev {
|
||||
namespace solidity {
|
||||
namespace lll {
|
||||
namespace parseTreeLLL_ {
|
||||
|
||||
@ -89,11 +90,11 @@ struct tagNode
|
||||
|
||||
}}}
|
||||
|
||||
void dev::lll::parseTreeLLL(string const& _s, sp::utree& o_out)
|
||||
void solidity::lll::parseTreeLLL(string const& _s, sp::utree& o_out)
|
||||
{
|
||||
using qi::standard::space;
|
||||
using qi::standard::space_type;
|
||||
using dev::lll::parseTreeLLL_::tagNode;
|
||||
using solidity::lll::parseTreeLLL_::tagNode;
|
||||
using symbol_type = sp::basic_string<std::string, sp::utree_type::symbol_type>;
|
||||
using it = string::const_iterator;
|
||||
|
||||
|
@ -29,9 +29,7 @@
|
||||
namespace boost { namespace spirit { class utree; } }
|
||||
namespace sp = boost::spirit;
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace lll
|
||||
namespace solidity::lll
|
||||
{
|
||||
|
||||
void killBigints(sp::utree const& _this);
|
||||
@ -39,4 +37,3 @@ void parseTreeLLL(std::string const& _s, sp::utree& o_out);
|
||||
void debugOutAST(std::ostream& _out, sp::utree const& _this);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -30,8 +30,9 @@
|
||||
#include <solidity/BuildInfo.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace dev;
|
||||
using namespace dev::lll;
|
||||
using namespace solidity;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::lll;
|
||||
|
||||
static string const VersionString =
|
||||
string(ETH_PROJECT_VERSION) +
|
||||
|
@ -29,13 +29,10 @@
|
||||
#include <memory>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::test;
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace lll
|
||||
{
|
||||
namespace test
|
||||
namespace solidity::lll::test
|
||||
{
|
||||
|
||||
BOOST_FIXTURE_TEST_SUITE(LLLEndToEndTest, LLLExecutionFramework)
|
||||
@ -1026,6 +1023,4 @@ BOOST_AUTO_TEST_CASE(string_literal)
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespaces
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <test/liblll/ExecutionFramework.h>
|
||||
|
||||
using namespace solidity::test;
|
||||
using namespace dev::lll::test;
|
||||
using namespace solidity::lll::test;
|
||||
|
||||
LLLExecutionFramework::LLLExecutionFramework() :
|
||||
ExecutionFramework()
|
||||
|
@ -28,14 +28,11 @@
|
||||
#define ACCOUNT(n) h256(account(n), h256::AlignRight)
|
||||
|
||||
using namespace std;
|
||||
using namespace dev::lll;
|
||||
using namespace solidity::lll;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::test;
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace lll
|
||||
{
|
||||
namespace test
|
||||
namespace solidity::lll::test
|
||||
{
|
||||
|
||||
namespace
|
||||
@ -503,6 +500,4 @@ BOOST_AUTO_TEST_CASE(fallback)
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespaces
|
||||
|
@ -33,14 +33,11 @@
|
||||
#define SUCCESS encodeArgs(1)
|
||||
|
||||
using namespace std;
|
||||
using namespace dev::lll;
|
||||
using namespace solidity::lll;
|
||||
using namespace solidity::util;
|
||||
using namespace solidity::test;
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace lll
|
||||
{
|
||||
namespace test
|
||||
namespace solidity::lll::test
|
||||
{
|
||||
|
||||
namespace
|
||||
@ -652,6 +649,4 @@ BOOST_AUTO_TEST_CASE(bad_data)
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespaces
|
||||
|
@ -27,11 +27,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace dev
|
||||
{
|
||||
namespace lll
|
||||
{
|
||||
namespace test
|
||||
namespace solidity::lll::test
|
||||
{
|
||||
|
||||
namespace
|
||||
@ -182,6 +178,4 @@ BOOST_AUTO_TEST_CASE(macro_with_zero_args)
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
}
|
||||
} // end namespaces
|
||||
|
Loading…
Reference in New Issue
Block a user