aboutsummaryrefslogtreecommitdiffstats
path: root/liblll/Compiler.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-10-03 05:54:36 +0800
committerGitHub <noreply@github.com>2017-10-03 05:54:36 +0800
commit37365478c19b1227261ba4246b4d2f06ef7bb522 (patch)
treec19c2cc8cf9db681ba84f4789fa401d43668b848 /liblll/Compiler.cpp
parent91b20b4bd247ca5163fc562d54ae639eda2532ef (diff)
parent26f3ea8cf7fba8d8222ab1889cfbf89046371d10 (diff)
downloaddexon-solidity-37365478c19b1227261ba4246b4d2f06ef7bb522.tar.gz
dexon-solidity-37365478c19b1227261ba4246b4d2f06ef7bb522.tar.zst
dexon-solidity-37365478c19b1227261ba4246b4d2f06ef7bb522.zip
Merge pull request #3008 from ethereum/lll-include-callback
LLL: change (include) to use a callback
Diffstat (limited to 'liblll/Compiler.cpp')
-rw-r--r--liblll/Compiler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/liblll/Compiler.cpp b/liblll/Compiler.cpp
index b69675aa..1638f69e 100644
--- a/liblll/Compiler.cpp
+++ b/liblll/Compiler.cpp
@@ -28,13 +28,14 @@ using namespace std;
using namespace dev;
using namespace dev::eth;
-bytes dev::eth::compileLLL(string const& _src, bool _opt, vector<string>* _errors)
+
+bytes dev::eth::compileLLL(string const& _src, bool _opt, vector<string>* _errors, ReadCallback const& _readFile)
{
try
{
CompilerState cs;
cs.populateStandard();
- auto assembly = CodeFragment::compile(_src, cs).assembly(cs);
+ auto assembly = CodeFragment::compile(_src, cs, _readFile).assembly(cs);
if (_opt)
assembly = assembly.optimise(true);
bytes ret = assembly.assemble().bytecode;
@@ -66,13 +67,13 @@ bytes dev::eth::compileLLL(string const& _src, bool _opt, vector<string>* _error
return bytes();
}
-std::string dev::eth::compileLLLToAsm(std::string const& _src, bool _opt, std::vector<std::string>* _errors)
+std::string dev::eth::compileLLLToAsm(std::string const& _src, bool _opt, std::vector<std::string>* _errors, ReadCallback const& _readFile)
{
try
{
CompilerState cs;
cs.populateStandard();
- auto assembly = CodeFragment::compile(_src, cs).assembly(cs);
+ auto assembly = CodeFragment::compile(_src, cs, _readFile).assembly(cs);
if (_opt)
assembly = assembly.optimise(true);
string ret = assembly.assemblyString();