aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2014-07-03 21:00:22 +0800
committerGav Wood <i@gavwood.com>2014-07-03 21:00:22 +0800
commitf4c99cdbb9f6123b33e29cb810c8781b5a2ba125 (patch)
treed0ad196cfd1243aa854cdcbad6fdd2340ae670fc
parent67315763116cf78b8c2047ce8bd2808576d8c066 (diff)
downloaddexon-solidity-f4c99cdbb9f6123b33e29cb810c8781b5a2ba125.tar.gz
dexon-solidity-f4c99cdbb9f6123b33e29cb810c8781b5a2ba125.tar.zst
dexon-solidity-f4c99cdbb9f6123b33e29cb810c8781b5a2ba125.zip
Windows build coersions.
-rw-r--r--CMakeLists.txt7
-rw-r--r--Compiler.cpp6
-rw-r--r--Parser.cpp13
3 files changed, 18 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2356b7d9..99d6d980 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,11 @@ aux_source_directory(. SRC_LIST)
set(EXECUTABLE lll)
# set(CMAKE_INSTALL_PREFIX ../lib)
-add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+if(ETH_STATIC)
+ add_library(${EXECUTABLE} STATIC ${SRC_LIST})
+else()
+ add_library(${EXECUTABLE} SHARED ${SRC_LIST})
+endif()
file(GLOB HEADERS "*.h")
@@ -15,7 +19,6 @@ include_directories(..)
target_link_libraries(${EXECUTABLE} evmface)
target_link_libraries(${EXECUTABLE} ethential)
-target_link_libraries(${EXECUTABLE} gmp)
if(${TARGET_PLATFORM} STREQUAL "w64")
diff --git a/Compiler.cpp b/Compiler.cpp
index 0faf478d..1621acf9 100644
--- a/Compiler.cpp
+++ b/Compiler.cpp
@@ -84,7 +84,11 @@ std::string eth::compileLLLToAsm(std::string const& _src, bool _opt, std::vector
string eth::parseLLL(string const& _src)
{
sp::utree o;
- parseTreeLLL(_src, o);
+ try
+ {
+ parseTreeLLL(_src, o);
+ }
+ catch (...) {}
ostringstream ret;
debugOutAST(ret, o);
killBigints(o);
diff --git a/Parser.cpp b/Parser.cpp
index d7658f67..4adcdd0e 100644
--- a/Parser.cpp
+++ b/Parser.cpp
@@ -21,6 +21,8 @@
#include "Parser.h"
+#define BOOST_RESULT_OF_USE_DECLTYPE
+#define BOOST_SPIRIT_USE_PHOENIX_V3
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp>
#include <boost/spirit/include/support_utree.hpp>
@@ -93,12 +95,13 @@ void eth::parseTreeLLL(string const& _s, sp::utree& o_out)
qi::rule<it, qi::ascii::space_type, sp::utree::list_type()> list = '(' > *element > ')';
// todo: fix compound compile errors in this line for Visual Studio 2013
-#ifndef _MSC_VER
- qi::rule<it, qi::ascii::space_type, sp::utree()> extra = sload[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 2)] | mload[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 1)] | sstore[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 4)] | mstore[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 3)] | seq[qi::_val = qi::_1, bind(&sp::utree::tag, qi::_val, 5)];
+//#ifndef _MSC_VER
+ auto x = [](int a) { return [=](sp::utree& n, typename qi::rule<it, qi::ascii::space_type, sp::utree()>::context_type& c) { (boost::fusion::at_c<0>(c.attributes) = n).tag(a); }; };
+ qi::rule<it, qi::ascii::space_type, sp::utree()> extra = mload[x(1)] | sload[x(2)] | mstore[x(3)] | sstore[x(4)] | seq[x(5)];
element = atom | list | extra;
-#else
- element = atom | list/* | extra*/;
-#endif
+/*#else
+ element = atom | list;
+#endif*/
string s;