aboutsummaryrefslogtreecommitdiffstats
path: root/liblll
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-07-28 06:16:53 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-07-28 19:00:36 +0800
commit7c509137cfea7373628f74d8c4fd94e78eb26cbb (patch)
treef04f3e4e04e15a087d0a97f24ed8284095ca2be3 /liblll
parent705cbbc19a96c465b06973cd832c3674b956eba8 (diff)
downloaddexon-solidity-7c509137cfea7373628f74d8c4fd94e78eb26cbb.tar.gz
dexon-solidity-7c509137cfea7373628f74d8c4fd94e78eb26cbb.tar.zst
dexon-solidity-7c509137cfea7373628f74d8c4fd94e78eb26cbb.zip
Replace dev::eth namespace with dev::lll in LLL
Diffstat (limited to 'liblll')
-rw-r--r--liblll/CodeFragment.cpp7
-rw-r--r--liblll/CodeFragment.h6
-rw-r--r--liblll/Compiler.cpp8
-rw-r--r--liblll/Compiler.h2
-rw-r--r--liblll/CompilerState.cpp2
-rw-r--r--liblll/CompilerState.h2
-rw-r--r--liblll/Exceptions.h2
-rw-r--r--liblll/Parser.cpp13
-rw-r--r--liblll/Parser.h2
9 files changed, 23 insertions, 21 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp
index 5c68194b..3e82889a 100644
--- a/liblll/CodeFragment.cpp
+++ b/liblll/CodeFragment.cpp
@@ -32,9 +32,10 @@
#include <libevmasm/Instruction.h>
#include "CompilerState.h"
#include "Parser.h"
+
using namespace std;
using namespace dev;
-using namespace dev::eth;
+using namespace dev::lll;
void CodeFragment::finalise(CompilerState const& _cs)
{
@@ -552,7 +553,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
int targetDeposit = hasDefault ? code[code.size() - 1].m_asm.deposit() : 0;
// The conditions
- AssemblyItems jumpTags;
+ eth::AssemblyItems jumpTags;
for (unsigned i = 0; i < code.size() - 1; i += 2)
{
requireDeposit(i, 1);
@@ -619,7 +620,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
requireMaxSize(3);
requireDeposit(1, 1);
- auto subPush = m_asm.appendSubroutine(make_shared<Assembly>(code[0].assembly(ns)));
+ auto subPush = m_asm.appendSubroutine(make_shared<eth::Assembly>(code[0].assembly(ns)));
m_asm.append(Instruction::DUP1);
if (code.size() == 3)
{
diff --git a/liblll/CodeFragment.h b/liblll/CodeFragment.h
index e5cac34e..e6e4d3b6 100644
--- a/liblll/CodeFragment.h
+++ b/liblll/CodeFragment.h
@@ -31,7 +31,7 @@ namespace sp = boost::spirit;
namespace dev
{
-namespace eth
+namespace lll
{
struct CompilerState;
@@ -47,7 +47,7 @@ public:
static CodeFragment compile(std::string const& _src, CompilerState& _s, ReadCallback const& _readFile);
/// Consolidates data and compiles code.
- Assembly& assembly(CompilerState const& _cs) { finalise(_cs); return m_asm; }
+ eth::Assembly& assembly(CompilerState const& _cs) { finalise(_cs); return m_asm; }
private:
void finalise(CompilerState const& _cs);
@@ -61,7 +61,7 @@ private:
void constructOperation(sp::utree const& _t, CompilerState& _s);
bool m_finalised = false;
- Assembly m_asm;
+ eth::Assembly m_asm;
ReadCallback m_readFile;
};
diff --git a/liblll/Compiler.cpp b/liblll/Compiler.cpp
index f2c1b0be..657f58b8 100644
--- a/liblll/Compiler.cpp
+++ b/liblll/Compiler.cpp
@@ -26,9 +26,9 @@
using namespace std;
using namespace dev;
-using namespace dev::eth;
+using namespace dev::lll;
-bytes dev::eth::compileLLL(string const& _src, dev::solidity::EVMVersion _evmVersion, bool _opt, std::vector<std::string>* _errors, dev::eth::ReadCallback const& _readFile)
+bytes dev::lll::compileLLL(string const& _src, dev::solidity::EVMVersion _evmVersion, bool _opt, std::vector<std::string>* _errors, ReadCallback const& _readFile)
{
try
{
@@ -66,7 +66,7 @@ bytes dev::eth::compileLLL(string const& _src, dev::solidity::EVMVersion _evmVer
return bytes();
}
-std::string dev::eth::compileLLLToAsm(std::string const& _src, EVMVersion _evmVersion, bool _opt, std::vector<std::string>* _errors, ReadCallback const& _readFile)
+std::string dev::lll::compileLLLToAsm(std::string const& _src, EVMVersion _evmVersion, bool _opt, std::vector<std::string>* _errors, ReadCallback const& _readFile)
{
try
{
@@ -103,7 +103,7 @@ std::string dev::eth::compileLLLToAsm(std::string const& _src, EVMVersion _evmVe
return string();
}
-string dev::eth::parseLLL(string const& _src)
+string dev::lll::parseLLL(string const& _src)
{
sp::utree o;
diff --git a/liblll/Compiler.h b/liblll/Compiler.h
index 06440c17..1ff7d5f8 100644
--- a/liblll/Compiler.h
+++ b/liblll/Compiler.h
@@ -30,7 +30,7 @@
namespace dev
{
-namespace eth
+namespace lll
{
using ReadCallback = std::function<std::string(std::string const&)>;
diff --git a/liblll/CompilerState.cpp b/liblll/CompilerState.cpp
index c0e344b2..019582d4 100644
--- a/liblll/CompilerState.cpp
+++ b/liblll/CompilerState.cpp
@@ -24,7 +24,7 @@
using namespace std;
using namespace dev;
-using namespace dev::eth;
+using namespace dev::lll;
CompilerState::CompilerState()
{
diff --git a/liblll/CompilerState.h b/liblll/CompilerState.h
index 96a0246d..0fa50288 100644
--- a/liblll/CompilerState.h
+++ b/liblll/CompilerState.h
@@ -26,7 +26,7 @@
namespace dev
{
-namespace eth
+namespace lll
{
struct Macro
diff --git a/liblll/Exceptions.h b/liblll/Exceptions.h
index e8ca99db..7bd951e3 100644
--- a/liblll/Exceptions.h
+++ b/liblll/Exceptions.h
@@ -25,7 +25,7 @@
namespace dev
{
-namespace eth
+namespace lll
{
/// Compile a Low-level Lisp-like Language program into EVM-code.
diff --git a/liblll/Parser.cpp b/liblll/Parser.cpp
index a3962df4..506553f9 100644
--- a/liblll/Parser.cpp
+++ b/liblll/Parser.cpp
@@ -33,12 +33,12 @@
using namespace std;
using namespace dev;
-using namespace dev::eth;
+using namespace dev::lll;
namespace qi = boost::spirit::qi;
namespace px = boost::phoenix;
namespace sp = boost::spirit;
-void dev::eth::killBigints(sp::utree const& _this)
+void dev::lll::killBigints(sp::utree const& _this)
{
switch (_this.which())
{
@@ -48,7 +48,7 @@ void dev::eth::killBigints(sp::utree const& _this)
}
}
-void dev::eth::debugOutAST(ostream& _out, sp::utree const& _this)
+void dev::lll::debugOutAST(ostream& _out, sp::utree const& _this)
{
switch (_this.which())
{
@@ -74,7 +74,8 @@ void dev::eth::debugOutAST(ostream& _out, sp::utree const& _this)
}
}
-namespace dev { namespace eth {
+namespace dev {
+namespace lll {
namespace parseTreeLLL_ {
template<unsigned N>
@@ -88,11 +89,11 @@ struct tagNode
}}}
-void dev::eth::parseTreeLLL(string const& _s, sp::utree& o_out)
+void dev::lll::parseTreeLLL(string const& _s, sp::utree& o_out)
{
using qi::standard::space;
using qi::standard::space_type;
- using dev::eth::parseTreeLLL_::tagNode;
+ using dev::lll::parseTreeLLL_::tagNode;
using symbol_type = sp::basic_string<std::string, sp::utree_type::symbol_type>;
using it = string::const_iterator;
diff --git a/liblll/Parser.h b/liblll/Parser.h
index 694d0cc6..cfbec418 100644
--- a/liblll/Parser.h
+++ b/liblll/Parser.h
@@ -31,7 +31,7 @@ namespace sp = boost::spirit;
namespace dev
{
-namespace eth
+namespace lll
{
void killBigints(sp::utree const& _this);