diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-02 20:17:52 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-03 04:19:36 +0800 |
commit | 26f3ea8cf7fba8d8222ab1889cfbf89046371d10 (patch) | |
tree | c19c2cc8cf9db681ba84f4789fa401d43668b848 /liblll/Compiler.cpp | |
parent | 91b20b4bd247ca5163fc562d54ae639eda2532ef (diff) | |
download | dexon-solidity-26f3ea8cf7fba8d8222ab1889cfbf89046371d10.tar.gz dexon-solidity-26f3ea8cf7fba8d8222ab1889cfbf89046371d10.tar.zst dexon-solidity-26f3ea8cf7fba8d8222ab1889cfbf89046371d10.zip |
LLL: change (include) to use a callback
Diffstat (limited to 'liblll/Compiler.cpp')
-rw-r--r-- | liblll/Compiler.cpp | 9 |
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(); |