未验证 提交 61cf8d78 编写于 作者: M Matt Witherspoon 提交者: GitHub

Merge pull request #5728 from EOSIO/wabt_upstream_sync_20180918

sync wabt to upstream as of 2018 Sep 18; considerable performance boost
......@@ -51,7 +51,7 @@ add_library( eosio_chain
)
target_link_libraries( eosio_chain eos_utilities fc chainbase Logging IR WAST WASM Runtime
wasm asmjs passes cfg ast emscripten-optimizer support softfloat builtins libwabt
wasm asmjs passes cfg ast emscripten-optimizer support softfloat builtins wabt
)
target_include_directories( eosio_chain
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include"
......
......@@ -7,7 +7,6 @@
#include <softfloat_types.h>
//wabt includes
#include <src/error-handler.h>
#include <src/binary-reader.h>
#include <src/common.h>
#include <src/interp.h>
......
......@@ -5,6 +5,7 @@
//wabt includes
#include <src/interp.h>
#include <src/binary-reader-interp.h>
#include <src/error-formatter.h>
namespace eosio { namespace chain { namespace webassembly { namespace wabt_runtime {
......@@ -87,10 +88,10 @@ std::unique_ptr<wasm_instantiated_module_interface> wabt_runtime::instantiate_mo
}
interp::DefinedModule* instantiated_module = nullptr;
ErrorHandlerBuffer error_handler(Location::Type::Binary);
wabt::Errors errors;
wabt::Result res = ReadBinaryInterp(env.get(), code_bytes, code_size, read_binary_options, &error_handler, &instantiated_module);
EOS_ASSERT( Succeeded(res), wasm_execution_error, "Error building wabt interp: ${e}", ("e", error_handler.buffer()) );
wabt::Result res = ReadBinaryInterp(env.get(), code_bytes, code_size, read_binary_options, &errors, &instantiated_module);
EOS_ASSERT( Succeeded(res), wasm_execution_error, "Error building wabt interp: ${e}", ("e", wabt::FormatErrorsToString(errors, Location::Type::Binary)) );
return std::make_unique<wabt_instantiated_module>(std::move(env), initial_memory, instantiated_module);
}
......
Subproject commit e7d6948d242a9931436c38275d59a9c6036c4095
Subproject commit 2f5382661f7bf77cf7a70dcf0543a44fd5025910
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册