13namespace sysio {
namespace chain {
21 std::vector<WAST::Error> parse_errors;
23 if(parse_errors.size())
26 ss <<
"Error parsing WebAssembly text file:" << std::endl;
27 for(
auto& error : parse_errors)
29 ss <<
":" << error.locus.describe() <<
": " << error.message.c_str() << std::endl;
30 ss << error.locus.sourceLine << std::endl;
31 ss << std::setw(error.locus.column(8)) <<
"^" << std::endl;
36 for(
auto sectionIt = module.userSections.begin();sectionIt != module.userSections.end();++sectionIt)
38 if(sectionIt->name ==
"name") {
module.userSections.erase(sectionIt);
break; }
46 return stream.getBytes();
50 ss <<
"Error serializing WebAssembly binary file:" << std::endl;
54 ss <<
"Error validating WebAssembly binary file:" << std::endl;
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
Used to generate a useful error report when an exception is thrown.
Defines exception's used by fc.
#define FC_CAPTURE_AND_RETHROW(...)
void serialize(Stream &stream, U8 &i)
WAST_API bool parseModule(const char *string, Uptr stringLength, IR::Module &outModule, std::vector< Error > &outErrors)
key Invalid authority Invalid transaction Invalid block ID Invalid packed transaction Invalid chain ID Invalid symbol Signature type is not a currently activated type Block can not be found Unlinkable block Block does not guarantee concurrent execution without conflicts Block exhausted allowed resources Block is from the future Block is not signed by expected producer Block includes an ill formed protocol feature activation extension Block includes an ill formed additional block signature extension Error decompressing transaction Transaction should have at least one required authority Expired Transaction Invalid Reference Block Duplicate deferred transaction The transaction can not be found Transaction is too big Invalid transaction extension Transaction includes disallowed Transaction exceeded transient resource limit Account name already exists sysio_assert_message assertion failure Action can not be found Attempt to use unaccessible API Inline Action exceeds maximum size limit sysio_assert_code assertion failure uses restricted error code value action return value size too big Permission Query Exception Contract Table Query Exception Database is an unknown or unsupported version Database usage is at unsafe levels wasm_exception
std::vector< uint8_t > wast_to_wasm(const std::string &wast)