| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
I'm not sure why we were using stdout but the convention is normally to
write all logging and error message to stderr.
|
|
|
| |
Signed-off-by: Radu M <root@radu.sh>
|
|
|
|
|
| |
This adds a new TOOL: `run-gen-wasm-bad` which is the same as
`run-gen-wasm`, but assumes that both `wasm2wat` and `wasm-validate`
will fail with an error.
|
|
|
|
| |
As suggested in https://github.com/WebAssembly/wabt/pull/725#discussion_r162516714.
|
|
|
|
|
|
|
| |
Since SourceErrorHandler can support binary locations, it doesn't make
much sense to have two different error handlers. There is now only an
ErrorHandler base class, and the first argument specifies whether the
error handler is expecting text or binary locations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a few new classes:
* BinaryReader: the abstract base class
* BinaryReaderNop: implements all of BinaryReader, but does nothing
* BinaryReaderLogging: logs calls through BinaryReader, and forwards to
another BinaryReader
Typically this means we can remove the Context structs from these
implementations, since that data can just move into the BinaryReader
subclasses.
I also took the opportunity to rename the new member functions to
MixedCase instead of snake_case, since that's more common in C++.
|
|
When the binary logging is turned on, it can't use the
`reader->on_error` directly since that function expects that the
user_data is the BinaryReaderInterpreter context (for example), but it
is actually the LoggingContext.
To make it easier for users to use the default error handler, now they
return a bool saying whether the error was handled.
Some additional changes:
* Add a test that uses logging and succeeds
* Add a test that uses logging and has an error
* Change the `run-*-interp.py` scripts to use `-t` for tracing and `-v`
for logging
|