summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/binary-reader-interp.cc29
-rw-r--r--src/binary-reader-interp.h4
-rw-r--r--src/binary-reader-ir.cc29
-rw-r--r--src/binary-reader-ir.h4
-rw-r--r--src/binary-reader-logging.cc4
-rw-r--r--src/binary-reader-logging.h2
-rw-r--r--src/binary-reader-nop.h2
-rw-r--r--src/binary-reader-objdump.cc5
-rw-r--r--src/binary-reader.cc3
-rw-r--r--src/binary-reader.h3
-rw-r--r--src/color.h1
-rw-r--r--src/common.h17
-rw-r--r--src/emscripten-exported.json9
-rw-r--r--src/emscripten-helpers.cc79
-rw-r--r--src/error-formatter.cc127
-rw-r--r--src/error-formatter.h54
-rw-r--r--src/error-handler.cc181
-rw-r--r--src/error-handler.h149
-rw-r--r--src/error.h57
-rw-r--r--src/lexer-source-line-finder.cc1
-rw-r--r--src/lexer-source.cc8
-rw-r--r--src/lexer-source.h6
-rw-r--r--src/prebuilt/wast-lexer-gen.cc1889
-rw-r--r--src/resolve-names.cc29
-rw-r--r--src/resolve-names.h6
-rw-r--r--src/test-interp.cc11
-rw-r--r--src/test-wast-parser.cc49
-rw-r--r--src/tools/spectest-interp.cc39
-rw-r--r--src/tools/wasm-interp.cc11
-rw-r--r--src/tools/wasm-strip.cc18
-rw-r--r--src/tools/wasm-validate.cc9
-rw-r--r--src/tools/wasm2c.cc9
-rw-r--r--src/tools/wasm2wat.cc9
-rw-r--r--src/tools/wast2json.cc15
-rw-r--r--src/tools/wat-desugar.cc10
-rw-r--r--src/tools/wat2wasm.cc13
-rw-r--r--src/validator.cc29
-rw-r--r--src/validator.h10
-rw-r--r--src/wabt.post.js112
-rw-r--r--src/wast-lexer.cc1
-rw-r--r--src/wast-parser.cc73
-rw-r--r--src/wast-parser.h12
42 files changed, 1498 insertions, 1630 deletions
diff --git a/src/binary-reader-interp.cc b/src/binary-reader-interp.cc
index 49f43a86..77941447 100644
--- a/src/binary-reader-interp.cc
+++ b/src/binary-reader-interp.cc
@@ -24,7 +24,6 @@
#include "src/binary-reader-nop.h"
#include "src/cast.h"
-#include "src/error-handler.h"
#include "src/feature.h"
#include "src/interp.h"
#include "src/stream.h"
@@ -72,7 +71,7 @@ class BinaryReaderInterp : public BinaryReaderNop {
BinaryReaderInterp(Environment* env,
DefinedModule* module,
std::unique_ptr<OutputBuffer> istream,
- ErrorHandler* error_handler,
+ Errors* errors,
const Features& features);
wabt::Result ReadBinary(DefinedModule* out_module);
@@ -80,7 +79,7 @@ class BinaryReaderInterp : public BinaryReaderNop {
std::unique_ptr<OutputBuffer> ReleaseOutputBuffer();
// Implement BinaryReader.
- bool OnError(ErrorLevel, const char* message) override;
+ bool OnError(const Error&) override;
wabt::Result EndModule() override;
@@ -224,7 +223,6 @@ class BinaryReaderInterp : public BinaryReaderNop {
void PushLabel(IstreamOffset offset, IstreamOffset fixup_offset);
void PopLabel();
- bool HandleError(ErrorLevel, Offset offset, const char* message);
void PrintError(const char* format, ...);
Index TranslateSigIndexToEnv(Index sig_index);
@@ -288,7 +286,7 @@ class BinaryReaderInterp : public BinaryReaderNop {
Export** out_export);
Features features_;
- ErrorHandler* error_handler_ = nullptr;
+ Errors* errors_ = nullptr;
Environment* env_ = nullptr;
DefinedModule* module_ = nullptr;
DefinedFunc* current_func_ = nullptr;
@@ -321,10 +319,10 @@ class BinaryReaderInterp : public BinaryReaderNop {
BinaryReaderInterp::BinaryReaderInterp(Environment* env,
DefinedModule* module,
std::unique_ptr<OutputBuffer> istream,
- ErrorHandler* error_handler,
+ Errors* errors,
const Features& features)
: features_(features),
- error_handler_(error_handler),
+ errors_(errors),
env_(env),
module_(module),
istream_(std::move(istream)),
@@ -346,16 +344,10 @@ Label* BinaryReaderInterp::TopLabel() {
return GetLabel(0);
}
-bool BinaryReaderInterp::HandleError(ErrorLevel error_level,
- Offset offset,
- const char* message) {
- return error_handler_->OnError(error_level, offset, message);
-}
-
void WABT_PRINTF_FORMAT(2, 3) BinaryReaderInterp::PrintError(const char* format,
...) {
WABT_SNPRINTF_ALLOCA(buffer, length, format);
- HandleError(ErrorLevel::Error, kInvalidOffset, buffer);
+ errors_->emplace_back(ErrorLevel::Error, Location(kInvalidOffset), buffer);
}
Index BinaryReaderInterp::TranslateSigIndexToEnv(Index sig_index) {
@@ -565,8 +557,9 @@ wabt::Result BinaryReaderInterp::EmitFuncOffset(DefinedFunc* func,
return wabt::Result::Ok;
}
-bool BinaryReaderInterp::OnError(ErrorLevel error_level, const char* message) {
- return HandleError(error_level, state->offset, message);
+bool BinaryReaderInterp::OnError(const Error& error) {
+ errors_->push_back(error);
+ return true;
}
wabt::Result BinaryReaderInterp::OnTypeCount(Index count) {
@@ -1567,7 +1560,7 @@ wabt::Result ReadBinaryInterp(Environment* env,
const void* data,
size_t size,
const ReadBinaryOptions& options,
- ErrorHandler* error_handler,
+ Errors* errors,
DefinedModule** out_module) {
// Need to mark before taking ownership of env->istream.
Environment::MarkPoint mark = env->Mark();
@@ -1576,7 +1569,7 @@ wabt::Result ReadBinaryInterp(Environment* env,
IstreamOffset istream_offset = istream->size();
DefinedModule* module = new DefinedModule();
- BinaryReaderInterp reader(env, module, std::move(istream), error_handler,
+ BinaryReaderInterp reader(env, module, std::move(istream), errors,
options.features);
env->EmplaceBackModule(module);
diff --git a/src/binary-reader-interp.h b/src/binary-reader-interp.h
index 82043ce5..767b9479 100644
--- a/src/binary-reader-interp.h
+++ b/src/binary-reader-interp.h
@@ -18,6 +18,7 @@
#define WABT_BINARY_READER_INTERP_H_
#include "src/common.h"
+#include "src/error.h"
namespace wabt {
@@ -28,14 +29,13 @@ class Environment;
} // namespace interp
-class ErrorHandler;
struct ReadBinaryOptions;
Result ReadBinaryInterp(interp::Environment* env,
const void* data,
size_t size,
const ReadBinaryOptions& options,
- ErrorHandler*,
+ Errors*,
interp::DefinedModule** out_module);
} // namespace wabt
diff --git a/src/binary-reader-ir.cc b/src/binary-reader-ir.cc
index ec033960..1c43c9d2 100644
--- a/src/binary-reader-ir.cc
+++ b/src/binary-reader-ir.cc
@@ -26,7 +26,6 @@
#include "src/binary-reader-nop.h"
#include "src/cast.h"
#include "src/common.h"
-#include "src/error-handler.h"
#include "src/ir.h"
namespace wabt {
@@ -48,9 +47,9 @@ class BinaryReaderIR : public BinaryReaderNop {
public:
BinaryReaderIR(Module* out_module,
const char* filename,
- ErrorHandler* error_handler);
+ Errors* errors);
- bool OnError(ErrorLevel, const char* message) override;
+ bool OnError(const Error&) override;
Result OnTypeCount(Index count) override;
Result OnType(Index index,
@@ -220,7 +219,6 @@ class BinaryReaderIR : public BinaryReaderNop {
Result OnInitExprI64ConstExpr(Index index, uint64_t value) override;
private:
- bool HandleError(ErrorLevel, Offset offset, const char* message);
Location GetLocation() const;
void PrintError(const char* format, ...);
void PushLabel(LabelType label_type,
@@ -233,7 +231,7 @@ class BinaryReaderIR : public BinaryReaderNop {
Result AppendExpr(std::unique_ptr<Expr> expr);
void SetBlockDeclaration(BlockDeclaration* decl, Type sig_type);
- ErrorHandler* error_handler_ = nullptr;
+ Errors* errors_ = nullptr;
Module* module_ = nullptr;
Func* current_func_ = nullptr;
@@ -244,8 +242,8 @@ class BinaryReaderIR : public BinaryReaderNop {
BinaryReaderIR::BinaryReaderIR(Module* out_module,
const char* filename,
- ErrorHandler* error_handler)
- : error_handler_(error_handler), module_(out_module), filename_(filename) {}
+ Errors* errors)
+ : errors_(errors), module_(out_module), filename_(filename) {}
Location BinaryReaderIR::GetLocation() const {
Location loc;
@@ -257,7 +255,7 @@ Location BinaryReaderIR::GetLocation() const {
void WABT_PRINTF_FORMAT(2, 3) BinaryReaderIR::PrintError(const char* format,
...) {
WABT_SNPRINTF_ALLOCA(buffer, length, format);
- HandleError(ErrorLevel::Error, kInvalidOffset, buffer);
+ errors_->emplace_back(ErrorLevel::Error, Location(kInvalidOffset), buffer);
}
void BinaryReaderIR::PushLabel(LabelType label_type,
@@ -321,14 +319,9 @@ void BinaryReaderIR::SetBlockDeclaration(BlockDeclaration* decl,
}
}
-bool BinaryReaderIR::HandleError(ErrorLevel error_level,
- Offset offset,
- const char* message) {
- return error_handler_->OnError(error_level, offset, message);
-}
-
-bool BinaryReaderIR::OnError(ErrorLevel error_level, const char* message) {
- return HandleError(error_level, state->offset, message);
+bool BinaryReaderIR::OnError(const Error& error) {
+ errors_->push_back(error);
+ return true;
}
Result BinaryReaderIR::OnTypeCount(Index count) {
@@ -1115,9 +1108,9 @@ Result ReadBinaryIr(const char* filename,
const void* data,
size_t size,
const ReadBinaryOptions& options,
- ErrorHandler* error_handler,
+ Errors* errors,
Module* out_module) {
- BinaryReaderIR reader(out_module, filename, error_handler);
+ BinaryReaderIR reader(out_module, filename, errors);
return ReadBinary(data, size, &reader, options);
}
diff --git a/src/binary-reader-ir.h b/src/binary-reader-ir.h
index 92de88cd..18c15585 100644
--- a/src/binary-reader-ir.h
+++ b/src/binary-reader-ir.h
@@ -18,10 +18,10 @@
#define WABT_BINARY_READER_IR_H_
#include "src/common.h"
+#include "src/error.h"
namespace wabt {
-class ErrorHandler;
struct Module;
struct ReadBinaryOptions;
@@ -29,7 +29,7 @@ Result ReadBinaryIr(const char* filename,
const void* data,
size_t size,
const ReadBinaryOptions& options,
- ErrorHandler*,
+ Errors*,
Module* out_module);
} // namespace wabt
diff --git a/src/binary-reader-logging.cc b/src/binary-reader-logging.cc
index 8010aac5..7edebdd1 100644
--- a/src/binary-reader-logging.cc
+++ b/src/binary-reader-logging.cc
@@ -99,8 +99,8 @@ void BinaryReaderLogging::LogTypes(TypeVector& types) {
LogTypes(types.size(), types.data());
}
-bool BinaryReaderLogging::OnError(ErrorLevel error_level, const char* message) {
- return reader_->OnError(error_level, message);
+bool BinaryReaderLogging::OnError(const Error& error) {
+ return reader_->OnError(error);
}
void BinaryReaderLogging::OnSetState(const State* s) {
diff --git a/src/binary-reader-logging.h b/src/binary-reader-logging.h
index d0424954..6791c622 100644
--- a/src/binary-reader-logging.h
+++ b/src/binary-reader-logging.h
@@ -27,7 +27,7 @@ class BinaryReaderLogging : public BinaryReaderDelegate {
public:
BinaryReaderLogging(Stream*, BinaryReaderDelegate* forward);
- bool OnError(ErrorLevel, const char* message) override;
+ bool OnError(const Error&) override;
void OnSetState(const State* s) override;
Result BeginModule(uint32_t version) override;
diff --git a/src/binary-reader-nop.h b/src/binary-reader-nop.h
index a08eddd2..f2370a78 100644
--- a/src/binary-reader-nop.h
+++ b/src/binary-reader-nop.h
@@ -23,7 +23,7 @@ namespace wabt {
class BinaryReaderNop : public BinaryReaderDelegate {
public:
- bool OnError(ErrorLevel, const char* message) override { return false; }
+ bool OnError(const Error&) override { return false; }
/* Module */
Result BeginModule(uint32_t version) override { return Result::Ok; }
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index cec37772..420940f5 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -38,7 +38,7 @@ class BinaryReaderObjdumpBase : public BinaryReaderNop {
ObjdumpOptions* options,
ObjdumpState* state);
- bool OnError(ErrorLevel, const char* message) override;
+ bool OnError(const Error&) override;
Result BeginModule(uint32_t version) override;
Result BeginSection(BinarySection section_type, Offset size) override;
@@ -86,8 +86,7 @@ Result BinaryReaderObjdumpBase::BeginSection(BinarySection section_code,
return Result::Ok;
}
-bool BinaryReaderObjdumpBase::OnError(ErrorLevel error_level,
- const char* message) {
+bool BinaryReaderObjdumpBase::OnError(const Error&) {
// Tell the BinaryReader that this error is "handled" for all passes other
// than the prepass. When the error is handled the default message will be
// suppressed.
diff --git a/src/binary-reader.cc b/src/binary-reader.cc
index 3687b08f..61284734 100644
--- a/src/binary-reader.cc
+++ b/src/binary-reader.cc
@@ -191,7 +191,8 @@ void WABT_PRINTF_FORMAT(2, 3) BinaryReader::PrintError(const char* format,
: ErrorLevel::Error;
WABT_SNPRINTF_ALLOCA(buffer, length, format);
- bool handled = delegate_->OnError(error_level, buffer);
+ Error error(error_level, Location(state_.offset), buffer);
+ bool handled = delegate_->OnError(error);
if (!handled) {
// Not great to just print, but we don't want to eat the error either.
diff --git a/src/binary-reader.h b/src/binary-reader.h
index c3506aa3..b0e1cb98 100644
--- a/src/binary-reader.h
+++ b/src/binary-reader.h
@@ -22,6 +22,7 @@
#include "src/binary.h"
#include "src/common.h"
+#include "src/error.h"
#include "src/feature.h"
#include "src/opcode.h"
#include "src/string-view.h"
@@ -63,7 +64,7 @@ class BinaryReaderDelegate {
virtual ~BinaryReaderDelegate() {}
- virtual bool OnError(ErrorLevel, const char* message) = 0;
+ virtual bool OnError(const Error&) = 0;
virtual void OnSetState(const State* s) { state = s; }
/* Module */
diff --git a/src/color.h b/src/color.h
index 7c358d9d..8af57f33 100644
--- a/src/color.h
+++ b/src/color.h
@@ -36,6 +36,7 @@ namespace wabt {
class Color {
public:
+ Color() : file_(nullptr), enabled_(false) {}
Color(FILE*, bool enabled = true);
// Write the given color to the file, if enabled.
diff --git a/src/common.h b/src/common.h
index b30ea6dd..fefec543 100644
--- a/src/common.h
+++ b/src/common.h
@@ -106,11 +106,6 @@ struct v128 {
namespace wabt {
-enum class ErrorLevel {
- Warning,
- Error,
-};
-
typedef uint32_t Index; // An index into one of the many index spaces.
typedef uint32_t Address; // An address or size in linear memory.
typedef size_t Offset; // An offset into a host's file or memory buffer.
@@ -399,18 +394,6 @@ static WABT_INLINE TypeVector GetInlineTypeVector(Type type) {
}
}
-/* error level */
-
-static WABT_INLINE const char* GetErrorLevelName(ErrorLevel error_level) {
- switch (error_level) {
- case ErrorLevel::Warning:
- return "warning";
- case ErrorLevel::Error:
- return "error";
- }
- WABT_UNREACHABLE;
-}
-
template <typename T>
void ConvertBackslashToSlash(T begin, T end) {
std::replace(begin, end, '\\', '/');
diff --git a/src/emscripten-exported.json b/src/emscripten-exported.json
index ad86b898..726ce9fb 100644
--- a/src/emscripten-exported.json
+++ b/src/emscripten-exported.json
@@ -1,18 +1,17 @@
[
"_malloc",
"_wabt_apply_names_module",
-"_wabt_destroy_error_handler_buffer",
+"_wabt_destroy_errors",
"_wabt_destroy_module",
"_wabt_destroy_output_buffer",
"_wabt_destroy_parse_wat_result",
"_wabt_destroy_read_binary_result",
"_wabt_destroy_wast_lexer",
"_wabt_destroy_write_module_result",
-"_wabt_error_handler_buffer_get_data",
-"_wabt_error_handler_buffer_get_size",
+"_wabt_format_text_errors",
+"_wabt_format_binary_errors",
"_wabt_generate_names_module",
-"_wabt_new_binary_error_handler_buffer",
-"_wabt_new_text_error_handler_buffer",
+"_wabt_new_errors",
"_wabt_new_wast_buffer_lexer",
"_wabt_output_buffer_get_data",
"_wabt_output_buffer_get_size",
diff --git a/src/emscripten-helpers.cc b/src/emscripten-helpers.cc
index 5aa6f6be..dd39cb79 100644
--- a/src/emscripten-helpers.cc
+++ b/src/emscripten-helpers.cc
@@ -31,7 +31,7 @@
#include "src/binary-writer-spec.h"
#include "src/binary-writer.h"
#include "src/common.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/filenames.h"
#include "src/generate-names.h"
#include "src/ir.h"
@@ -85,28 +85,27 @@ wabt::WastLexer* wabt_new_wast_buffer_lexer(const char* filename,
}
WabtParseWatResult* wabt_parse_wat(wabt::WastLexer* lexer,
- wabt::ErrorHandlerBuffer* error_handler) {
+ wabt::Errors* errors) {
WabtParseWatResult* result = new WabtParseWatResult();
std::unique_ptr<wabt::Module> module;
- result->result = wabt::ParseWatModule(lexer, &module, error_handler);
+ result->result = wabt::ParseWatModule(lexer, &module, errors);
result->module = std::move(module);
return result;
}
WabtParseWastResult* wabt_parse_wast(wabt::WastLexer* lexer,
- wabt::ErrorHandlerBuffer* error_handler) {
+ wabt::Errors* errors) {
WabtParseWastResult* result = new WabtParseWastResult();
std::unique_ptr<wabt::Script> script;
- result->result = wabt::ParseWastScript(lexer, &script, error_handler);
+ result->result = wabt::ParseWastScript(lexer, &script, errors);
result->script = std::move(script);
return result;
}
-WabtReadBinaryResult* wabt_read_binary(
- const void* data,
- size_t size,
- int read_debug_names,
- wabt::ErrorHandlerBuffer* error_handler) {
+WabtReadBinaryResult* wabt_read_binary(const void* data,
+ size_t size,
+ int read_debug_names,
+ wabt::Errors* errors) {
wabt::ReadBinaryOptions options;
options.read_debug_names = read_debug_names;
@@ -115,29 +114,26 @@ WabtReadBinaryResult* wabt_read_binary(
// TODO(binji): Pass through from wabt_read_binary parameter.
const char* filename = "<binary>";
result->result =
- wabt::ReadBinaryIr(filename, data, size, options, error_handler, module);
+ wabt::ReadBinaryIr(filename, data, size, options, errors, module);
result->module.reset(module);
return result;
}
-wabt::Result::Enum wabt_resolve_names_module(
- wabt::Module* module,
- wabt::ErrorHandlerBuffer* error_handler) {
- return ResolveNamesModule(module, error_handler);
+wabt::Result::Enum wabt_resolve_names_module(wabt::Module* module,
+ wabt::Errors* errors) {
+ return ResolveNamesModule(module, errors);
}
-wabt::Result::Enum wabt_validate_module(
- wabt::Module* module,
- wabt::ErrorHandlerBuffer* error_handler) {
+wabt::Result::Enum wabt_validate_module(wabt::Module* module,
+ wabt::Errors* errors) {
wabt::ValidateOptions options;
- return ValidateModule(module, error_handler, options);
+ return ValidateModule(module, errors, options);
}
-wabt::Result::Enum wabt_validate_script(
- wabt::Script* script,
- wabt::ErrorHandlerBuffer* error_handler) {
+wabt::Result::Enum wabt_validate_script(wabt::Script* script,
+ wabt::Errors* errors) {
wabt::ValidateOptions options;
- return ValidateScript(script, error_handler, options);
+ return ValidateScript(script, errors, options);
}
WabtWriteScriptResult* wabt_write_binary_spec_script(
@@ -234,28 +230,35 @@ void wabt_destroy_wast_lexer(wabt::WastLexer* lexer) {
delete lexer;
}
-// ErrorHandlerBuffer
-wabt::ErrorHandlerBuffer* wabt_new_text_error_handler_buffer(void) {
- return new wabt::ErrorHandlerBuffer(wabt::Location::Type::Text);
+// Errors
+wabt::Errors* wabt_new_errors(void) {
+ return new wabt::Errors();
}
-wabt::ErrorHandlerBuffer* wabt_new_binary_error_handler_buffer(void) {
- return new wabt::ErrorHandlerBuffer(wabt::Location::Type::Binary);
-}
+wabt::OutputBuffer* wabt_format_text_errors(wabt::Errors* errors,
+ wabt::WastLexer* lexer) {
+ auto line_finder = lexer->MakeLineFinder();
+ std::string string_result = FormatErrorsToString(
+ *errors, wabt::Location::Type::Text, line_finder.get());
-const void* wabt_error_handler_buffer_get_data(
- wabt::ErrorHandlerBuffer* error_handler) {
- return error_handler->buffer().data();
+ wabt::OutputBuffer* result = new wabt::OutputBuffer();
+ std::copy(string_result.begin(), string_result.end(),
+ std::back_inserter(result->data));
+ return result;
}
-size_t wabt_error_handler_buffer_get_size(
- wabt::ErrorHandlerBuffer* error_handler) {
- return error_handler->buffer().size();
+wabt::OutputBuffer* wabt_format_binary_errors(wabt::Errors* errors) {
+ std::string string_result =
+ FormatErrorsToString(*errors, wabt::Location::Type::Binary);
+
+ wabt::OutputBuffer* result = new wabt::OutputBuffer();
+ std::copy(string_result.begin(), string_result.end(),
+ std::back_inserter(result->data));
+ return result;
}
-void wabt_destroy_error_handler_buffer(
- wabt::ErrorHandlerBuffer* error_handler) {
- delete error_handler;
+void wabt_destroy_errors(wabt::Errors* errors) {
+ delete errors;
}
// WabtParseWatResult
diff --git a/src/error-formatter.cc b/src/error-formatter.cc
new file mode 100644
index 00000000..14c5d921
--- /dev/null
+++ b/src/error-formatter.cc
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2018 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "src/error-formatter.h"
+
+namespace wabt {
+
+namespace {
+
+std::string FormatError(const Error& error,
+ Location::Type location_type,
+ const Color& color,
+ LexerSourceLineFinder* line_finder,
+ int source_line_max_length,
+ int indent) {
+ std::string indent_str(indent, ' ');
+ std::string result = indent_str;
+
+ result += color.MaybeBoldCode();
+
+ const Location& loc = error.loc;
+ if (!loc.filename.empty()) {
+ result += loc.filename.to_string();
+ result += ":";
+ }
+
+ if (location_type == Location::Type::Text) {
+ result += StringPrintf("%d:%d: ", loc.line, loc.first_column);
+ } else if (loc.offset != kInvalidOffset) {
+ result += StringPrintf("%07" PRIzx ": ", loc.offset);
+ }
+
+ result += color.MaybeRedCode();
+ result += GetErrorLevelName(error.error_level);
+ result += ": ";
+ result += color.MaybeDefaultCode();
+
+ result += error.message;
+ result += '\n';
+
+ LexerSourceLineFinder::SourceLine source_line;
+ if (line_finder) {
+ line_finder->GetSourceLine(loc, source_line_max_length, &source_line);
+ }
+
+ if (!source_line.line.empty()) {
+ result += indent_str;
+ result += source_line.line;
+ result += '\n';
+ result += indent_str;
+
+ size_t num_spaces = (loc.first_column - 1) - source_line.column_offset;
+ size_t num_carets = loc.last_column - loc.first_column;
+ num_carets = std::min(num_carets, source_line.line.size() - num_spaces);
+ num_carets = std::max<size_t>(num_carets, 1);
+ result.append(num_spaces, ' ');
+ result += color.MaybeBoldCode();
+ result += color.MaybeGreenCode();
+ result.append(num_carets, '^');
+ result += color.MaybeDefaultCode();
+ result += '\n';
+ }
+
+ return result;
+}
+
+} // End of anonymous namespace
+
+std::string FormatErrorsToString(const Errors& errors,
+ Location::Type location_type,
+ LexerSourceLineFinder* line_finder,
+ const Color& color,
+ const std::string& header,
+ PrintHeader print_header,
+ int source_line_max_length) {
+ std::string result;
+ for (const auto& error : errors) {
+ if (!header.empty()) {
+ switch (print_header) {
+ case PrintHeader::Never:
+ break;
+ case PrintHeader::Once:
+ print_header = PrintHeader::Never;
+ // Fallthrough.
+ case PrintHeader::Always:
+ result += header;
+ result += ":\n";
+ break;
+ }
+ }
+
+ int indent = header.empty() ? 0 : 2;
+
+ result += FormatError(error, location_type, color, line_finder,
+ source_line_max_length, indent);
+ }
+ return result;
+}
+
+void FormatErrorsToFile(const Errors& errors,
+ Location::Type location_type,
+ LexerSourceLineFinder* line_finder,
+ FILE* file,
+ const std::string& header,
+ PrintHeader print_header,
+ int source_line_max_length) {
+ Color color(file);
+ std::string s =
+ FormatErrorsToString(errors, location_type, line_finder, color, header,
+ print_header, source_line_max_length);
+ fwrite(s.data(), 1, s.size(), file);
+}
+
+} // namespace wabt
diff --git a/src/error-formatter.h b/src/error-formatter.h
new file mode 100644
index 00000000..cd2ed912
--- /dev/null
+++ b/src/error-formatter.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2018 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_ERROR_FORMATTER_H_
+#define WABT_ERROR_FORMATTER_H_
+
+#include <cstdio>
+#include <string>
+#include <memory>
+
+#include "src/color.h"
+#include "src/error.h"
+#include "src/lexer-source-line-finder.h"
+
+namespace wabt {
+
+enum class PrintHeader {
+ Never,
+ Once,
+ Always,
+};
+
+std::string FormatErrorsToString(const Errors&,
+ Location::Type,
+ LexerSourceLineFinder* = nullptr,
+ const Color& color = Color(nullptr, false),
+ const std::string& header = {},
+ PrintHeader print_header = PrintHeader::Never,
+ int source_line_max_length = 80);
+
+void FormatErrorsToFile(const Errors&,
+ Location::Type,
+ LexerSourceLineFinder* = nullptr,
+ FILE* = stderr,
+ const std::string& header = {},
+ PrintHeader print_header = PrintHeader::Never,
+ int source_line_max_length = 80);
+
+} // namespace wabt
+
+#endif // WABT_ERROR_FORMATTER_H_
diff --git a/src/error-handler.cc b/src/error-handler.cc
deleted file mode 100644
index 75d59673..00000000
--- a/src/error-handler.cc
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright 2017 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "src/error-handler.h"
-
-#include <algorithm>
-
-namespace wabt {
-
-ErrorHandler::ErrorHandler(Location::Type location_type)
- : location_type_(location_type) {}
-
-ErrorHandler::ErrorHandler(Location::Type location_type,
- std::unique_ptr<LexerSourceLineFinder> line_finder)
- : location_type_(location_type), line_finder_(std::move(line_finder)) {}
-
-bool ErrorHandler::OnError(ErrorLevel error_level,
- const Location& loc,
- const char* format,
- va_list args) {
- va_list args_copy;
- va_copy(args_copy, args);
- char fixed_buf[WABT_DEFAULT_SNPRINTF_ALLOCA_BUFSIZE];
- char* buffer = fixed_buf;
- size_t len = wabt_vsnprintf(fixed_buf, sizeof(fixed_buf), format, args);
- if (len + 1 > sizeof(fixed_buf)) {
- buffer = static_cast<char*>(alloca(len + 1));
- len = wabt_vsnprintf(buffer, len + 1, format, args_copy);
- }
-
- LexerSourceLineFinder::SourceLine source_line;
- if (line_finder_) {
- Result result = line_finder_->GetSourceLine(loc, source_line_max_length(),
- &source_line);
- if (Failed(result)) {
- // If this fails, it means that we've probably screwed up the lexer. Blow
- // up.
- WABT_FATAL("error getting the source line.\n");
- }
- }
-
- return OnError(ErrorLevel::Error, loc, std::string(buffer), source_line.line,
- source_line.column_offset);
-}
-
-std::string ErrorHandler::DefaultErrorMessage(ErrorLevel error_level,
- const Color& color,
- const Location& loc,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset,
- int indent) {
- std::string indent_str(indent, ' ');
- std::string result = indent_str;
-
- result += color.MaybeBoldCode();
-
- if (!loc.filename.empty()) {
- result += loc.filename.to_string();
- result += ":";
- }
-
- if (location_type_ == Location::Type::Text) {
- result += StringPrintf("%d:%d: ", loc.line, loc.first_column);
- } else if (loc.offset != kInvalidOffset) {
- result += StringPrintf("%07" PRIzx ": ", loc.offset);
- }
-
- result += color.MaybeRedCode();
- result += GetErrorLevelName(error_level);
- result += ": ";
- result += color.MaybeDefaultCode();
-
- result += error;
- result += '\n';
-
- if (!source_line.empty()) {
- result += indent_str;
- result += source_line;
- result += '\n';
- result += indent_str;
-
- size_t num_spaces = (loc.first_column - 1) - source_line_column_offset;
- size_t num_carets = loc.last_column - loc.first_column;
- num_carets = std::min(num_carets, source_line.size() - num_spaces);
- num_carets = std::max<size_t>(num_carets, 1);
- result.append(num_spaces, ' ');
- result += color.MaybeBoldCode();
- result += color.MaybeGreenCode();
- result.append(num_carets, '^');
- result += color.MaybeDefaultCode();
- result += '\n';
- }
-
- return result;
-}
-
-ErrorHandlerNop::ErrorHandlerNop()
- // The Location::Type is irrelevant since we never display an error.
- : ErrorHandler(Location::Type::Text) {}
-
-ErrorHandlerFile::ErrorHandlerFile(
- Location::Type location_type,
- std::unique_ptr<LexerSourceLineFinder> line_finder,
- FILE* file,
- const std::string& header,
- PrintHeader print_header,
- size_t source_line_max_length)
- : ErrorHandler(location_type, std::move(line_finder)),
- file_(file),
- header_(header),
- print_header_(print_header),
- source_line_max_length_(source_line_max_length),
- color_(file) {}
-
-bool ErrorHandlerFile::OnError(ErrorLevel level,
- const Location& loc,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset) {
- PrintErrorHeader();
- int indent = header_.empty() ? 0 : 2;
-
- std::string message =
- DefaultErrorMessage(level, color_, loc, error, source_line,
- source_line_column_offset, indent);
- fwrite(message.data(), 1, message.size(), file_);
- return true;
-}
-
-void ErrorHandlerFile::PrintErrorHeader() {
- if (header_.empty()) {
- return;
- }
-
- switch (print_header_) {
- case PrintHeader::Never:
- break;
-
- case PrintHeader::Once:
- print_header_ = PrintHeader::Never;
- // Fallthrough.
-
- case PrintHeader::Always:
- fprintf(file_, "%s:\n", header_.c_str());
- break;
- }
-}
-
-ErrorHandlerBuffer::ErrorHandlerBuffer(
- Location::Type location_type,
- std::unique_ptr<LexerSourceLineFinder> line_finder,
- size_t source_line_max_length)
- : ErrorHandler(location_type, std::move(line_finder)),
- source_line_max_length_(source_line_max_length),
- color_(nullptr, false) {}
-
-bool ErrorHandlerBuffer::OnError(ErrorLevel level,
- const Location& loc,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset) {
- buffer_ += DefaultErrorMessage(level, color_, loc, error, source_line,
- source_line_column_offset, 0);
- return true;
-}
-
-} // namespace wabt
diff --git a/src/error-handler.h b/src/error-handler.h
deleted file mode 100644
index 45e212fd..00000000
--- a/src/error-handler.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright 2017 WebAssembly Community Group participants
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef WABT_ERROR_HANDLER_H_
-#define WABT_ERROR_HANDLER_H_
-
-#include <cstdarg>
-#include <string>
-
-#include "src/color.h"
-#include "src/common.h"
-#include "src/lexer-source-line-finder.h"
-
-namespace wabt {
-
-class WastLexer;
-
-class ErrorHandler {
- public:
- explicit ErrorHandler(Location::Type);
- ErrorHandler(Location::Type,
- std::unique_ptr<LexerSourceLineFinder> line_finder);
-
- virtual ~ErrorHandler() {}
-
- // Returns true if the error was handled.
- virtual bool OnError(ErrorLevel,
- const Location&,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset) = 0;
-
- // Helper function for binary locations.
- bool OnError(ErrorLevel error_level,
- size_t offset,
- const std::string& error) {
- return OnError(error_level, Location(offset), error, std::string(), 0);
- }
-
- // Helper function for va_lists.
- bool OnError(ErrorLevel, const Location&, const char* format, va_list args);
-
- // OnError will be called with with source_line trimmed to this length.
- virtual size_t source_line_max_length() const = 0;
-
- std::string DefaultErrorMessage(ErrorLevel,
- const Color&,
- const Location&,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset,
- int indent);
-
- protected:
- Location::Type location_type_;
- // TODO(binji): remove unique_ptr
- std::unique_ptr<LexerSourceLineFinder> line_finder_;
-};
-
-class ErrorHandlerNop : public ErrorHandler {
- public:
- ErrorHandlerNop();
-
- bool OnError(ErrorLevel,
- const Location&,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset) override {
- return false;
- }
-
- size_t source_line_max_length() const override { return 80; }
-};
-
-class ErrorHandlerFile : public ErrorHandler {
- public:
- enum class PrintHeader {
- Never,
- Once,
- Always,
- };
-
- explicit ErrorHandlerFile(Location::Type,
- std::unique_ptr<LexerSourceLineFinder> = {},
- FILE* file = stderr,
- const std::string& header = std::string(),
- PrintHeader print_header = PrintHeader::Never,
- size_t source_line_max_length = 80);
-
- bool OnError(ErrorLevel,
- const Location&,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset) override;
-
- size_t source_line_max_length() const override {
- return source_line_max_length_;
- }
-
- private:
- void PrintErrorHeader();
-
- FILE* file_;
- std::string header_;
- PrintHeader print_header_;
- size_t source_line_max_length_;
- Color color_;
-};
-
-class ErrorHandlerBuffer : public ErrorHandler {
- public:
- explicit ErrorHandlerBuffer(Location::Type,
- std::unique_ptr<LexerSourceLineFinder> = {},
- size_t source_line_max_length = 80);
-
- bool OnError(ErrorLevel,
- const Location&,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset) override;
-
- size_t source_line_max_length() const override {
- return source_line_max_length_;
- }
-
- const std::string& buffer() const { return buffer_; }
-
- private:
- size_t source_line_max_length_;
- std::string buffer_;
- Color color_;
-};
-
-} // namespace wabt
-
-#endif // WABT_ERROR_HANDLER_H_
diff --git a/src/error.h b/src/error.h
new file mode 100644
index 00000000..5c0d1ee5
--- /dev/null
+++ b/src/error.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2018 WebAssembly Community Group participants
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef WABT_ERROR_H_
+#define WABT_ERROR_H_
+
+#include <string>
+#include <vector>
+
+#include "src/common.h"
+#include "src/string-view.h"
+
+namespace wabt {
+
+enum class ErrorLevel {
+ Warning,
+ Error,
+};
+
+static WABT_INLINE const char* GetErrorLevelName(ErrorLevel error_level) {
+ switch (error_level) {
+ case ErrorLevel::Warning:
+ return "warning";
+ case ErrorLevel::Error:
+ return "error";
+ }
+ WABT_UNREACHABLE;
+}
+
+class Error {
+ public:
+ Error(ErrorLevel error_level, Location loc, string_view message)
+ : error_level(error_level), loc(loc), message(message.to_string()) {}
+
+ ErrorLevel error_level;
+ Location loc;
+ std::string message;
+};
+
+using Errors = std::vector<Error>;
+
+} // namespace wabt
+
+#endif // WABT_ERROR_H_
diff --git a/src/lexer-source-line-finder.cc b/src/lexer-source-line-finder.cc
index 0936afa4..833cb900 100644
--- a/src/lexer-source-line-finder.cc
+++ b/src/lexer-source-line-finder.cc
@@ -28,6 +28,7 @@ LexerSourceLineFinder::LexerSourceLineFinder(
next_line_start_(0),
last_cr_(false),
eof_(false) {
+ source_->Seek(0);
// Line 0 should not be used; but it makes indexing simpler.
line_ranges_.emplace_back(0, 0);
}
diff --git a/src/lexer-source.cc b/src/lexer-source.cc
index 762aea7e..dde6af9c 100644
--- a/src/lexer-source.cc
+++ b/src/lexer-source.cc
@@ -115,6 +115,14 @@ size_t LexerSourceBuffer::Fill(void* dest, Offset size) {
return read_size;
}
+Result LexerSourceBuffer::Seek(Offset offset) {
+ if (offset < size_) {
+ read_offset_ = offset;
+ return Result::Ok;
+ }
+ return Result::Error;
+}
+
Result LexerSourceBuffer::ReadRange(OffsetRange range,
std::vector<char>* out_data) {
OffsetRange clamped = range;
diff --git a/src/lexer-source.h b/src/lexer-source.h
index 616913c0..f36a3630 100644
--- a/src/lexer-source.h
+++ b/src/lexer-source.h
@@ -35,6 +35,7 @@ class LexerSource {
virtual Result Tell(Offset* out_offset) = 0;
virtual size_t Fill(void* dest, size_t size) = 0;
virtual Result ReadRange(OffsetRange, std::vector<char>* out_data) = 0;
+ virtual Result Seek(Offset) = 0;
WABT_DISALLOW_COPY_AND_ASSIGN(LexerSource);
};
@@ -50,9 +51,7 @@ class LexerSourceFile : public LexerSource {
Result Tell(Offset* out_offset) override;
size_t Fill(void* dest, size_t size) override;
Result ReadRange(OffsetRange, std::vector<char>* out_data) override;
-
- private:
- Result Seek(Offset offset);
+ Result Seek(Offset offset) override;
std::string filename_;
FILE* file_;
@@ -66,6 +65,7 @@ class LexerSourceBuffer : public LexerSource {
Result Tell(Offset* out_offset) override;
size_t Fill(void* dest, size_t size) override;
Result ReadRange(OffsetRange, std::vector<char>* out_data) override;
+ Result Seek(Offset offset) override;
private:
const void* data_;
diff --git a/src/prebuilt/wast-lexer-gen.cc b/src/prebuilt/wast-lexer-gen.cc
index 6d6cd861..6eba7b1b 100644
--- a/src/prebuilt/wast-lexer-gen.cc
+++ b/src/prebuilt/wast-lexer-gen.cc
@@ -23,7 +23,6 @@
#include "config.h"
-#include "src/error-handler.h"
#include "src/lexer-source.h"
#include "src/wast-parser.h"
@@ -191,21 +190,21 @@ Result WastLexer::Fill(size_t need) {
}
Token WastLexer::GetToken(WastParser* parser) {
- #line 195 "src/prebuilt/wast-lexer-gen.cc"
+ #line 194 "src/prebuilt/wast-lexer-gen.cc"
enum YYCONDTYPE {
YYCOND_i,
YYCOND_BAD_TEXT,
YYCOND_LINE_COMMENT,
YYCOND_BLOCK_COMMENT,
};
-#line 191 "src/wast-lexer.cc"
+#line 190 "src/wast-lexer.cc"
YYCONDTYPE cond = YYCOND_i; // i is the initial state.
for (;;) {
next_pos_ = cursor_;
-#line 209 "src/prebuilt/wast-lexer-gen.cc"
+#line 208 "src/prebuilt/wast-lexer-gen.cc"
{
unsigned char yych;
unsigned int yyaccept = 0;
@@ -359,9 +358,9 @@ YYCOND_i:
yy3:
++cursor_;
yy4:
-#line 713 "src/wast-lexer.cc"
+#line 712 "src/wast-lexer.cc"
{ ERROR("unexpected char"); continue; }
-#line 365 "src/prebuilt/wast-lexer-gen.cc"
+#line 364 "src/prebuilt/wast-lexer-gen.cc"
yy5:
++cursor_;
if (limit_ <= cursor_) FILL(1);
@@ -369,14 +368,14 @@ yy5:
if (yybm[0+yych] & 4) {
goto yy5;
}
-#line 711 "src/wast-lexer.cc"
+#line 710 "src/wast-lexer.cc"
{ continue; }
-#line 375 "src/prebuilt/wast-lexer-gen.cc"
+#line 374 "src/prebuilt/wast-lexer-gen.cc"
yy8:
++cursor_;
-#line 710 "src/wast-lexer.cc"
+#line 709 "src/wast-lexer.cc"
{ NEWLINE; continue; }
-#line 380 "src/prebuilt/wast-lexer-gen.cc"
+#line 379 "src/prebuilt/wast-lexer-gen.cc"
yy10:
++cursor_;
if (limit_ <= cursor_) FILL(1);
@@ -386,9 +385,9 @@ yy11:
goto yy10;
}
yy12:
-#line 712 "src/wast-lexer.cc"
+#line 711 "src/wast-lexer.cc"
{ RETURN_TEXT(Reserved); }
-#line 392 "src/prebuilt/wast-lexer-gen.cc"
+#line 391 "src/prebuilt/wast-lexer-gen.cc"
yy13:
yyaccept = 0;
yych = *(marker_ = ++cursor_);
@@ -398,9 +397,9 @@ yy13:
if (yych <= 0xF4) goto yy54;
yy14:
BEGIN(YYCOND_BAD_TEXT);
-#line 244 "src/wast-lexer.cc"
+#line 243 "src/wast-lexer.cc"
{ continue; }
-#line 404 "src/prebuilt/wast-lexer-gen.cc"
+#line 403 "src/prebuilt/wast-lexer-gen.cc"
yy15:
yych = *++cursor_;
if (yych <= '\'') {
@@ -420,14 +419,14 @@ yy15:
yy16:
yych = *++cursor_;
if (yych == ';') goto yy68;
-#line 235 "src/wast-lexer.cc"
+#line 234 "src/wast-lexer.cc"
{ RETURN(Lpar); }
-#line 426 "src/prebuilt/wast-lexer-gen.cc"
+#line 425 "src/prebuilt/wast-lexer-gen.cc"
yy18:
++cursor_;
-#line 236 "src/wast-lexer.cc"
+#line 235 "src/wast-lexer.cc"
{ RETURN(Rpar); }
-#line 431 "src/prebuilt/wast-lexer-gen.cc"
+#line 430 "src/prebuilt/wast-lexer-gen.cc"
yy20:
yych = *++cursor_;
if (yych <= 'h') {
@@ -445,9 +444,9 @@ yy21:
if (yych == 'x') goto yy80;
goto yy24;
yy22:
-#line 237 "src/wast-lexer.cc"
+#line 236 "src/wast-lexer.cc"
{ RETURN_LITERAL(Nat, Int); }
-#line 451 "src/prebuilt/wast-lexer-gen.cc"
+#line 450 "src/prebuilt/wast-lexer-gen.cc"
yy23:
++cursor_;
if ((limit_ - cursor_) < 3) FILL(3);
@@ -638,9 +637,9 @@ yy44:
yy45:
++cursor_;
yy46:
-#line 714 "src/wast-lexer.cc"
+#line 713 "src/wast-lexer.cc"
{ MAYBE_MALFORMED_UTF8(""); }
-#line 644 "src/prebuilt/wast-lexer-gen.cc"
+#line 643 "src/prebuilt/wast-lexer-gen.cc"
yy47:
yych = *++cursor_;
if (yych <= 0x7F) goto yy46;
@@ -710,9 +709,9 @@ yy55:
}
yy56:
++cursor_;
-#line 243 "src/wast-lexer.cc"
+#line 242 "src/wast-lexer.cc"
{ RETURN_TEXT(Text); }
-#line 716 "src/prebuilt/wast-lexer-gen.cc"
+#line 715 "src/prebuilt/wast-lexer-gen.cc"
yy58:
++cursor_;
if (limit_ <= cursor_) FILL(1);
@@ -807,23 +806,23 @@ yy66:
if (yych <= ';') goto yy67;
if (yych <= '}') goto yy10;
yy67:
-#line 695 "src/wast-lexer.cc"
+#line 694 "src/wast-lexer.cc"
{ RETURN_TEXT(Var); }
-#line 813 "src/prebuilt/wast-lexer-gen.cc"
+#line 812 "src/prebuilt/wast-lexer-gen.cc"
yy68:
++cursor_;
BEGIN(YYCOND_BLOCK_COMMENT);
-#line 701 "src/wast-lexer.cc"
+#line 700 "src/wast-lexer.cc"
{ COMMENT_NESTING = 1; continue; }
-#line 819 "src/prebuilt/wast-lexer-gen.cc"
+#line 818 "src/prebuilt/wast-lexer-gen.cc"
yy70:
yych = *++cursor_;
if (yych == 'x') goto yy137;
goto yy73;
yy71:
-#line 238 "src/wast-lexer.cc"
+#line 237 "src/wast-lexer.cc"
{ RETURN_LITERAL(Int, Int); }
-#line 827 "src/prebuilt/wast-lexer-gen.cc"
+#line 826 "src/prebuilt/wast-lexer-gen.cc"
yy72:
++cursor_;
if ((limit_ - cursor_) < 3) FILL(3);
@@ -877,9 +876,9 @@ yy76:
if (yych == '_') goto yy10;
goto yy140;
yy77:
-#line 239 "src/wast-lexer.cc"
+#line 238 "src/wast-lexer.cc"
{ RETURN_LITERAL(Float, Float); }
-#line 883 "src/prebuilt/wast-lexer-gen.cc"
+#line 882 "src/prebuilt/wast-lexer-gen.cc"
yy78:
yych = *++cursor_;
if (yych <= ',') {
@@ -936,9 +935,9 @@ yy80:
yy81:
++cursor_;
BEGIN(YYCOND_LINE_COMMENT);
-#line 698 "src/wast-lexer.cc"
+#line 697 "src/wast-lexer.cc"
{ continue; }
-#line 942 "src/prebuilt/wast-lexer-gen.cc"
+#line 941 "src/prebuilt/wast-lexer-gen.cc"
yy83:
yych = *++cursor_;
if (yych == 'i') goto yy146;
@@ -981,9 +980,9 @@ yy89:
}
}
yy90:
-#line 269 "src/wast-lexer.cc"
+#line 268 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Br); }
-#line 987 "src/prebuilt/wast-lexer-gen.cc"
+#line 986 "src/prebuilt/wast-lexer-gen.cc"
yy91:
yych = *++cursor_;
if (yych == 'l') goto yy153;
@@ -1073,9 +1072,9 @@ yy108:
}
}
yy109:
-#line 265 "src/wast-lexer.cc"
+#line 264 "src/wast-lexer.cc"
{ RETURN_OPCODE0(If); }
-#line 1079 "src/prebuilt/wast-lexer-gen.cc"
+#line 1078 "src/prebuilt/wast-lexer-gen.cc"
yy110:
yych = *++cursor_;
if (yych == 'p') goto yy180;
@@ -1430,9 +1429,9 @@ yy160:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 275 "src/wast-lexer.cc"
+#line 274 "src/wast-lexer.cc"
{ RETURN_OPCODE0(End); }
-#line 1436 "src/prebuilt/wast-lexer-gen.cc"
+#line 1435 "src/prebuilt/wast-lexer-gen.cc"
yy162:
yych = *++cursor_;
if (yych == 'e') goto yy240;
@@ -1459,9 +1458,9 @@ yy164:
if (yych <= '~') goto yy10;
}
}
-#line 258 "src/wast-lexer.cc"
+#line 257 "src/wast-lexer.cc"
{ RETURN_TYPE(ValueType, F32); }
-#line 1465 "src/prebuilt/wast-lexer-gen.cc"
+#line 1464 "src/prebuilt/wast-lexer-gen.cc"
yy166:
yych = *++cursor_;
if (yych <= '-') {
@@ -1480,9 +1479,9 @@ yy166:
if (yych <= '~') goto yy10;
}
}
-#line 259 "src/wast-lexer.cc"
+#line 258 "src/wast-lexer.cc"
{ RETURN_TYPE(ValueType, F64); }
-#line 1486 "src/prebuilt/wast-lexer-gen.cc"
+#line 1485 "src/prebuilt/wast-lexer-gen.cc"
yy168:
yych = *++cursor_;
if (yych == 'c') goto yy246;
@@ -1505,9 +1504,9 @@ yy169:
}
}
yy170:
-#line 681 "src/wast-lexer.cc"
+#line 680 "src/wast-lexer.cc"
{ RETURN(Get); }
-#line 1511 "src/prebuilt/wast-lexer-gen.cc"
+#line 1510 "src/prebuilt/wast-lexer-gen.cc"
yy171:
yych = *++cursor_;
if (yych == 'b') goto yy249;
@@ -1538,9 +1537,9 @@ yy174:
if (yych <= '~') goto yy10;
}
}
-#line 256 "src/wast-lexer.cc"
+#line 255 "src/wast-lexer.cc"
{ RETURN_TYPE(ValueType, I32); }
-#line 1544 "src/prebuilt/wast-lexer-gen.cc"
+#line 1543 "src/prebuilt/wast-lexer-gen.cc"
yy176:
yych = *++cursor_;
if (yych <= '-') {
@@ -1559,9 +1558,9 @@ yy176:
if (yych <= '~') goto yy10;
}
}
-#line 257 "src/wast-lexer.cc"
+#line 256 "src/wast-lexer.cc"
{ RETURN_TYPE(ValueType, I64); }
-#line 1565 "src/prebuilt/wast-lexer-gen.cc"
+#line 1564 "src/prebuilt/wast-lexer-gen.cc"
yy178:
yych = *++cursor_;
if (yych == '1') goto yy256;
@@ -1579,9 +1578,9 @@ yy181:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 241 "src/wast-lexer.cc"
+#line 240 "src/wast-lexer.cc"
{ RETURN_LITERAL(Float, Infinity); }
-#line 1585 "src/prebuilt/wast-lexer-gen.cc"
+#line 1584 "src/prebuilt/wast-lexer-gen.cc"
yy183:
yych = *++cursor_;
if (yych == 'o') goto yy259;
@@ -1607,9 +1606,9 @@ yy188:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 262 "src/wast-lexer.cc"
+#line 261 "src/wast-lexer.cc"
{ RETURN(Mut); }
-#line 1613 "src/prebuilt/wast-lexer-gen.cc"
+#line 1612 "src/prebuilt/wast-lexer-gen.cc"
yy190:
yych = *++cursor_;
if (yych <= ')') {
@@ -1629,17 +1628,17 @@ yy190:
}
}
yy191:
-#line 242 "src/wast-lexer.cc"
+#line 241 "src/wast-lexer.cc"
{ RETURN_LITERAL(Float, Nan); }
-#line 1635 "src/prebuilt/wast-lexer-gen.cc"
+#line 1634 "src/prebuilt/wast-lexer-gen.cc"
yy192:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 263 "src/wast-lexer.cc"
+#line 262 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Nop); }
-#line 1643 "src/prebuilt/wast-lexer-gen.cc"
+#line 1642 "src/prebuilt/wast-lexer-gen.cc"
yy194:
yych = *++cursor_;
if (yych == 's') goto yy266;
@@ -1702,9 +1701,9 @@ yy208:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 690 "src/wast-lexer.cc"
+#line 689 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Try); }
-#line 1708 "src/prebuilt/wast-lexer-gen.cc"
+#line 1707 "src/prebuilt/wast-lexer-gen.cc"
yy210:
yych = *++cursor_;
if (yych == 'e') goto yy282;
@@ -1797,9 +1796,9 @@ yy217:
if (yych == '_') goto yy10;
goto yy289;
yy218:
-#line 240 "src/wast-lexer.cc"
+#line 239 "src/wast-lexer.cc"
{ RETURN_LITERAL(Float, Hexfloat); }
-#line 1803 "src/prebuilt/wast-lexer-gen.cc"
+#line 1802 "src/prebuilt/wast-lexer-gen.cc"
yy219:
yych = *++cursor_;
if (yych <= ',') {
@@ -1861,9 +1860,9 @@ yy228:
}
}
yy229:
-#line 272 "src/wast-lexer.cc"
+#line 271 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Call); }
-#line 1867 "src/prebuilt/wast-lexer-gen.cc"
+#line 1866 "src/prebuilt/wast-lexer-gen.cc"
yy230:
yych = *++cursor_;
if (yych == 'h') goto yy304;
@@ -1877,33 +1876,33 @@ yy232:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 674 "src/wast-lexer.cc"
+#line 673 "src/wast-lexer.cc"
{ RETURN(Data); }
-#line 1883 "src/prebuilt/wast-lexer-gen.cc"
+#line 1882 "src/prebuilt/wast-lexer-gen.cc"
yy234:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 274 "src/wast-lexer.cc"
+#line 273 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Drop); }
-#line 1891 "src/prebuilt/wast-lexer-gen.cc"
+#line 1890 "src/prebuilt/wast-lexer-gen.cc"
yy236:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 673 "src/wast-lexer.cc"
+#line 672 "src/wast-lexer.cc"
{ RETURN(Elem); }
-#line 1899 "src/prebuilt/wast-lexer-gen.cc"
+#line 1898 "src/prebuilt/wast-lexer-gen.cc"
yy238:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 267 "src/wast-lexer.cc"
+#line 266 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Else); }
-#line 1907 "src/prebuilt/wast-lexer-gen.cc"
+#line 1906 "src/prebuilt/wast-lexer-gen.cc"
yy240:
yych = *++cursor_;
if (yych == 'p') goto yy307;
@@ -1960,9 +1959,9 @@ yy246:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 662 "src/wast-lexer.cc"
+#line 661 "src/wast-lexer.cc"
{ RETURN(Func); }
-#line 1966 "src/prebuilt/wast-lexer-gen.cc"
+#line 1965 "src/prebuilt/wast-lexer-gen.cc"
yy248:
yych = *++cursor_;
if (yych == 'g') goto yy336;
@@ -2052,9 +2051,9 @@ yy261:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 268 "src/wast-lexer.cc"
+#line 267 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Loop); }
-#line 2058 "src/prebuilt/wast-lexer-gen.cc"
+#line 2057 "src/prebuilt/wast-lexer-gen.cc"
yy263:
yych = *++cursor_;
if (yych == 'r') goto yy378;
@@ -2125,9 +2124,9 @@ yy279:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 266 "src/wast-lexer.cc"
+#line 265 "src/wast-lexer.cc"
{ RETURN(Then); }
-#line 2131 "src/prebuilt/wast-lexer-gen.cc"
+#line 2130 "src/prebuilt/wast-lexer-gen.cc"
yy281:
yych = *++cursor_;
if (yych == 'w') goto yy399;
@@ -2137,9 +2136,9 @@ yy282:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 661 "src/wast-lexer.cc"
+#line 660 "src/wast-lexer.cc"
{ RETURN(Type); }
-#line 2143 "src/prebuilt/wast-lexer-gen.cc"
+#line 2142 "src/prebuilt/wast-lexer-gen.cc"
yy284:
yych = *++cursor_;
if (yych == 'a') goto yy401;
@@ -2163,9 +2162,9 @@ yy285:
}
}
yy286:
-#line 260 "src/wast-lexer.cc"
+#line 259 "src/wast-lexer.cc"
{ RETURN_TYPE(ValueType, V128); }
-#line 2169 "src/prebuilt/wast-lexer-gen.cc"
+#line 2168 "src/prebuilt/wast-lexer-gen.cc"
yy287:
yych = *++cursor_;
if (yych == '6') goto yy403;
@@ -2288,17 +2287,17 @@ yy298:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 264 "src/wast-lexer.cc"
+#line 263 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Block); }
-#line 2294 "src/prebuilt/wast-lexer-gen.cc"
+#line 2293 "src/prebuilt/wast-lexer-gen.cc"
yy300:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 270 "src/wast-lexer.cc"
+#line 269 "src/wast-lexer.cc"
{ RETURN_OPCODE0(BrIf); }
-#line 2302 "src/prebuilt/wast-lexer-gen.cc"
+#line 2301 "src/prebuilt/wast-lexer-gen.cc"
yy302:
yych = *++cursor_;
if (yych == 'b') goto yy411;
@@ -2312,9 +2311,9 @@ yy304:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 691 "src/wast-lexer.cc"
+#line 690 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Catch); }
-#line 2318 "src/prebuilt/wast-lexer-gen.cc"
+#line 2317 "src/prebuilt/wast-lexer-gen.cc"
yy306:
yych = *++cursor_;
if (yych == 'n') goto yy413;
@@ -2697,9 +2696,9 @@ yy376:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 665 "src/wast-lexer.cc"
+#line 664 "src/wast-lexer.cc"
{ RETURN(Local); }
-#line 2703 "src/prebuilt/wast-lexer-gen.cc"
+#line 2702 "src/prebuilt/wast-lexer-gen.cc"
yy378:
yych = *++cursor_;
if (yych == 'y') goto yy547;
@@ -2721,17 +2720,17 @@ yy382:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 663 "src/wast-lexer.cc"
+#line 662 "src/wast-lexer.cc"
{ RETURN(Param); }
-#line 2727 "src/prebuilt/wast-lexer-gen.cc"
+#line 2726 "src/prebuilt/wast-lexer-gen.cc"
yy384:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 669 "src/wast-lexer.cc"
+#line 668 "src/wast-lexer.cc"
{ RETURN(Quote); }
-#line 2735 "src/prebuilt/wast-lexer-gen.cc"
+#line 2734 "src/prebuilt/wast-lexer-gen.cc"
yy386:
yych = *++cursor_;
if (yych == 't') goto yy554;
@@ -2769,17 +2768,17 @@ yy394:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 672 "src/wast-lexer.cc"
+#line 671 "src/wast-lexer.cc"
{ RETURN(Start); }
-#line 2775 "src/prebuilt/wast-lexer-gen.cc"
+#line 2774 "src/prebuilt/wast-lexer-gen.cc"
yy396:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 670 "src/wast-lexer.cc"
+#line 669 "src/wast-lexer.cc"
{ RETURN(Table); }
-#line 2783 "src/prebuilt/wast-lexer-gen.cc"
+#line 2782 "src/prebuilt/wast-lexer-gen.cc"
yy398:
yych = *++cursor_;
if (yych == 'o') goto yy566;
@@ -2789,9 +2788,9 @@ yy399:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 692 "src/wast-lexer.cc"
+#line 691 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Throw); }
-#line 2795 "src/prebuilt/wast-lexer-gen.cc"
+#line 2794 "src/prebuilt/wast-lexer-gen.cc"
yy401:
yych = *++cursor_;
if (yych == 'c') goto yy567;
@@ -2862,9 +2861,9 @@ yy409:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 668 "src/wast-lexer.cc"
+#line 667 "src/wast-lexer.cc"
{ RETURN(Bin); }
-#line 2868 "src/prebuilt/wast-lexer-gen.cc"
+#line 2867 "src/prebuilt/wast-lexer-gen.cc"
yy411:
yych = *++cursor_;
if (yych == 'l') goto yy585;
@@ -2882,17 +2881,17 @@ yy414:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 678 "src/wast-lexer.cc"
+#line 677 "src/wast-lexer.cc"
{ RETURN(Except); }
-#line 2888 "src/prebuilt/wast-lexer-gen.cc"
+#line 2887 "src/prebuilt/wast-lexer-gen.cc"
yy416:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 677 "src/wast-lexer.cc"
+#line 676 "src/wast-lexer.cc"
{ RETURN(Export); }
-#line 2896 "src/prebuilt/wast-lexer-gen.cc"
+#line 2895 "src/prebuilt/wast-lexer-gen.cc"
yy418:
yych = *++cursor_;
if (yych == 's') goto yy588;
@@ -2923,9 +2922,9 @@ yy424:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 402 "src/wast-lexer.cc"
+#line 401 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32Eq); }
-#line 2929 "src/prebuilt/wast-lexer-gen.cc"
+#line 2928 "src/prebuilt/wast-lexer-gen.cc"
yy426:
yych = *++cursor_;
if (yych == 'o') goto yy598;
@@ -2935,25 +2934,25 @@ yy427:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 412 "src/wast-lexer.cc"
+#line 411 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32Ge); }
-#line 2941 "src/prebuilt/wast-lexer-gen.cc"
+#line 2940 "src/prebuilt/wast-lexer-gen.cc"
yy429:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 410 "src/wast-lexer.cc"
+#line 409 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32Gt); }
-#line 2949 "src/prebuilt/wast-lexer-gen.cc"
+#line 2948 "src/prebuilt/wast-lexer-gen.cc"
yy431:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 408 "src/wast-lexer.cc"
+#line 407 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32Le); }
-#line 2957 "src/prebuilt/wast-lexer-gen.cc"
+#line 2956 "src/prebuilt/wast-lexer-gen.cc"
yy433:
yych = *++cursor_;
if (yych == 'a') goto yy599;
@@ -2963,9 +2962,9 @@ yy434:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 406 "src/wast-lexer.cc"
+#line 405 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32Lt); }
-#line 2969 "src/prebuilt/wast-lexer-gen.cc"
+#line 2968 "src/prebuilt/wast-lexer-gen.cc"
yy436:
yych = *++cursor_;
if (yych == 'x') goto yy600;
@@ -2998,9 +2997,9 @@ yy439:
}
}
yy440:
-#line 404 "src/wast-lexer.cc"
+#line 403 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32Ne); }
-#line 3004 "src/prebuilt/wast-lexer-gen.cc"
+#line 3003 "src/prebuilt/wast-lexer-gen.cc"
yy441:
yych = *++cursor_;
if (yych == 'i') goto yy609;
@@ -3062,9 +3061,9 @@ yy452:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 403 "src/wast-lexer.cc"
+#line 402 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64Eq); }
-#line 3068 "src/prebuilt/wast-lexer-gen.cc"
+#line 3067 "src/prebuilt/wast-lexer-gen.cc"
yy454:
yych = *++cursor_;
if (yych == 'o') goto yy634;
@@ -3074,25 +3073,25 @@ yy455:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 413 "src/wast-lexer.cc"
+#line 412 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64Ge); }
-#line 3080 "src/prebuilt/wast-lexer-gen.cc"
+#line 3079 "src/prebuilt/wast-lexer-gen.cc"
yy457:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 411 "src/wast-lexer.cc"
+#line 410 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64Gt); }
-#line 3088 "src/prebuilt/wast-lexer-gen.cc"
+#line 3087 "src/prebuilt/wast-lexer-gen.cc"
yy459:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 409 "src/wast-lexer.cc"
+#line 408 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64Le); }
-#line 3096 "src/prebuilt/wast-lexer-gen.cc"
+#line 3095 "src/prebuilt/wast-lexer-gen.cc"
yy461:
yych = *++cursor_;
if (yych == 'a') goto yy635;
@@ -3102,9 +3101,9 @@ yy462:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 407 "src/wast-lexer.cc"
+#line 406 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64Lt); }
-#line 3108 "src/prebuilt/wast-lexer-gen.cc"
+#line 3107 "src/prebuilt/wast-lexer-gen.cc"
yy464:
yych = *++cursor_;
if (yych == 'x') goto yy636;
@@ -3137,9 +3136,9 @@ yy467:
}
}
yy468:
-#line 405 "src/wast-lexer.cc"
+#line 404 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64Ne); }
-#line 3143 "src/prebuilt/wast-lexer-gen.cc"
+#line 3142 "src/prebuilt/wast-lexer-gen.cc"
yy469:
yych = *++cursor_;
if (yych == 'o') goto yy645;
@@ -3192,9 +3191,9 @@ yy478:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 666 "src/wast-lexer.cc"
+#line 665 "src/wast-lexer.cc"
{ RETURN(Global); }
-#line 3198 "src/prebuilt/wast-lexer-gen.cc"
+#line 3197 "src/prebuilt/wast-lexer-gen.cc"
yy480:
yych = *++cursor_;
if (yych == 'e') goto yy664;
@@ -3258,9 +3257,9 @@ yy489:
}
}
yy490:
-#line 382 "src/wast-lexer.cc"
+#line 381 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32Eq); }
-#line 3264 "src/prebuilt/wast-lexer-gen.cc"
+#line 3263 "src/prebuilt/wast-lexer-gen.cc"
yy491:
yych = *++cursor_;
if (yych == 't') goto yy686;
@@ -3294,17 +3293,17 @@ yy498:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 384 "src/wast-lexer.cc"
+#line 383 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32Ne); }
-#line 3300 "src/prebuilt/wast-lexer-gen.cc"
+#line 3299 "src/prebuilt/wast-lexer-gen.cc"
yy500:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 354 "src/wast-lexer.cc"
+#line 353 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32Or); }
-#line 3308 "src/prebuilt/wast-lexer-gen.cc"
+#line 3307 "src/prebuilt/wast-lexer-gen.cc"
yy502:
yych = *++cursor_;
if (yych == 'p') goto yy694;
@@ -3403,9 +3402,9 @@ yy519:
}
}
yy520:
-#line 383 "src/wast-lexer.cc"
+#line 382 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64Eq); }
-#line 3409 "src/prebuilt/wast-lexer-gen.cc"
+#line 3408 "src/prebuilt/wast-lexer-gen.cc"
yy521:
yych = *++cursor_;
if (yych == 't') goto yy730;
@@ -3439,17 +3438,17 @@ yy528:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 385 "src/wast-lexer.cc"
+#line 384 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64Ne); }
-#line 3445 "src/prebuilt/wast-lexer-gen.cc"
+#line 3444 "src/prebuilt/wast-lexer-gen.cc"
yy530:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 355 "src/wast-lexer.cc"
+#line 354 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64Or); }
-#line 3453 "src/prebuilt/wast-lexer-gen.cc"
+#line 3452 "src/prebuilt/wast-lexer-gen.cc"
yy532:
yych = *++cursor_;
if (yych == 'p') goto yy738;
@@ -3517,17 +3516,17 @@ yy543:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 676 "src/wast-lexer.cc"
+#line 675 "src/wast-lexer.cc"
{ RETURN(Import); }
-#line 3523 "src/prebuilt/wast-lexer-gen.cc"
+#line 3522 "src/prebuilt/wast-lexer-gen.cc"
yy545:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 680 "src/wast-lexer.cc"
+#line 679 "src/wast-lexer.cc"
{ RETURN(Invoke); }
-#line 3531 "src/prebuilt/wast-lexer-gen.cc"
+#line 3530 "src/prebuilt/wast-lexer-gen.cc"
yy547:
yych = *++cursor_;
if (yych <= ')') {
@@ -3547,17 +3546,17 @@ yy547:
}
}
yy548:
-#line 671 "src/wast-lexer.cc"
+#line 670 "src/wast-lexer.cc"
{ RETURN(Memory); }
-#line 3553 "src/prebuilt/wast-lexer-gen.cc"
+#line 3552 "src/prebuilt/wast-lexer-gen.cc"
yy549:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 667 "src/wast-lexer.cc"
+#line 666 "src/wast-lexer.cc"
{ RETURN(Module); }
-#line 3561 "src/prebuilt/wast-lexer-gen.cc"
+#line 3560 "src/prebuilt/wast-lexer-gen.cc"
yy551:
++cursor_;
if (limit_ <= cursor_) FILL(1);
@@ -3602,9 +3601,9 @@ yy552:
}
}
yy553:
-#line 675 "src/wast-lexer.cc"
+#line 674 "src/wast-lexer.cc"
{ RETURN(Offset); }
-#line 3608 "src/prebuilt/wast-lexer-gen.cc"
+#line 3607 "src/prebuilt/wast-lexer-gen.cc"
yy554:
yych = *++cursor_;
if (yych == 'e') goto yy770;
@@ -3614,9 +3613,9 @@ yy555:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 664 "src/wast-lexer.cc"
+#line 663 "src/wast-lexer.cc"
{ RETURN(Result); }
-#line 3620 "src/prebuilt/wast-lexer-gen.cc"
+#line 3619 "src/prebuilt/wast-lexer-gen.cc"
yy557:
yych = *++cursor_;
if (yych == 'w') goto yy771;
@@ -3626,17 +3625,17 @@ yy558:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 276 "src/wast-lexer.cc"
+#line 275 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Return); }
-#line 3632 "src/prebuilt/wast-lexer-gen.cc"
+#line 3631 "src/prebuilt/wast-lexer-gen.cc"
yy560:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 447 "src/wast-lexer.cc"
+#line 446 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Select); }
-#line 3640 "src/prebuilt/wast-lexer-gen.cc"
+#line 3639 "src/prebuilt/wast-lexer-gen.cc"
yy562:
yych = *++cursor_;
if (yych == 'o') goto yy773;
@@ -3650,9 +3649,9 @@ yy564:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 696 "src/wast-lexer.cc"
+#line 695 "src/wast-lexer.cc"
{ RETURN(Shared); }
-#line 3656 "src/prebuilt/wast-lexer-gen.cc"
+#line 3655 "src/prebuilt/wast-lexer-gen.cc"
yy566:
yych = *++cursor_;
if (yych == 'c') goto yy775;
@@ -3702,9 +3701,9 @@ yy577:
if (yych == 'x') goto yy788;
goto yy580;
yy578:
-#line 306 "src/wast-lexer.cc"
+#line 305 "src/wast-lexer.cc"
{ RETURN_TEXT_AT(AlignEqNat, 6); }
-#line 3708 "src/prebuilt/wast-lexer-gen.cc"
+#line 3707 "src/prebuilt/wast-lexer-gen.cc"
yy579:
++cursor_;
if (limit_ <= cursor_) FILL(1);
@@ -3735,9 +3734,9 @@ yy581:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 261 "src/wast-lexer.cc"
+#line 260 "src/wast-lexer.cc"
{ RETURN(Anyfunc); }
-#line 3741 "src/prebuilt/wast-lexer-gen.cc"
+#line 3740 "src/prebuilt/wast-lexer-gen.cc"
yy583:
yych = *++cursor_;
switch (yych) {
@@ -3770,17 +3769,17 @@ yy588:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 321 "src/wast-lexer.cc"
+#line 320 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32Abs); }
-#line 3776 "src/prebuilt/wast-lexer-gen.cc"
+#line 3775 "src/prebuilt/wast-lexer-gen.cc"
yy590:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 368 "src/wast-lexer.cc"
+#line 367 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32Add); }
-#line 3784 "src/prebuilt/wast-lexer-gen.cc"
+#line 3783 "src/prebuilt/wast-lexer-gen.cc"
yy592:
yych = *++cursor_;
if (yych == 'l') goto yy800;
@@ -3803,9 +3802,9 @@ yy596:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 374 "src/wast-lexer.cc"
+#line 373 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32Div); }
-#line 3809 "src/prebuilt/wast-lexer-gen.cc"
+#line 3808 "src/prebuilt/wast-lexer-gen.cc"
yy598:
yych = *++cursor_;
if (yych == 'o') goto yy806;
@@ -3819,25 +3818,25 @@ yy600:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 378 "src/wast-lexer.cc"
+#line 377 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32Max); }
-#line 3825 "src/prebuilt/wast-lexer-gen.cc"
+#line 3824 "src/prebuilt/wast-lexer-gen.cc"
yy602:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 376 "src/wast-lexer.cc"
+#line 375 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32Min); }
-#line 3833 "src/prebuilt/wast-lexer-gen.cc"
+#line 3832 "src/prebuilt/wast-lexer-gen.cc"
yy604:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 372 "src/wast-lexer.cc"
+#line 371 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32Mul); }
-#line 3841 "src/prebuilt/wast-lexer-gen.cc"
+#line 3840 "src/prebuilt/wast-lexer-gen.cc"
yy606:
yych = *++cursor_;
if (yych == 'r') goto yy809;
@@ -3847,9 +3846,9 @@ yy607:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 319 "src/wast-lexer.cc"
+#line 318 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32Neg); }
-#line 3853 "src/prebuilt/wast-lexer-gen.cc"
+#line 3852 "src/prebuilt/wast-lexer-gen.cc"
yy609:
yych = *++cursor_;
if (yych == 'n') goto yy810;
@@ -3867,9 +3866,9 @@ yy612:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 370 "src/wast-lexer.cc"
+#line 369 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32Sub); }
-#line 3873 "src/prebuilt/wast-lexer-gen.cc"
+#line 3872 "src/prebuilt/wast-lexer-gen.cc"
yy614:
yych = *++cursor_;
if (yych == 'n') goto yy814;
@@ -3935,17 +3934,17 @@ yy625:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 322 "src/wast-lexer.cc"
+#line 321 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64Abs); }
-#line 3941 "src/prebuilt/wast-lexer-gen.cc"
+#line 3940 "src/prebuilt/wast-lexer-gen.cc"
yy627:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 369 "src/wast-lexer.cc"
+#line 368 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64Add); }
-#line 3949 "src/prebuilt/wast-lexer-gen.cc"
+#line 3948 "src/prebuilt/wast-lexer-gen.cc"
yy629:
yych = *++cursor_;
if (yych == 'l') goto yy839;
@@ -3964,9 +3963,9 @@ yy632:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 375 "src/wast-lexer.cc"
+#line 374 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64Div); }
-#line 3970 "src/prebuilt/wast-lexer-gen.cc"
+#line 3969 "src/prebuilt/wast-lexer-gen.cc"
yy634:
yych = *++cursor_;
if (yych == 'o') goto yy844;
@@ -3980,25 +3979,25 @@ yy636:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 379 "src/wast-lexer.cc"
+#line 378 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64Max); }
-#line 3986 "src/prebuilt/wast-lexer-gen.cc"
+#line 3985 "src/prebuilt/wast-lexer-gen.cc"
yy638:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 377 "src/wast-lexer.cc"
+#line 376 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64Min); }
-#line 3994 "src/prebuilt/wast-lexer-gen.cc"
+#line 3993 "src/prebuilt/wast-lexer-gen.cc"
yy640:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 373 "src/wast-lexer.cc"
+#line 372 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64Mul); }
-#line 4002 "src/prebuilt/wast-lexer-gen.cc"
+#line 4001 "src/prebuilt/wast-lexer-gen.cc"
yy642:
yych = *++cursor_;
if (yych == 'r') goto yy847;
@@ -4008,9 +4007,9 @@ yy643:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 320 "src/wast-lexer.cc"
+#line 319 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64Neg); }
-#line 4014 "src/prebuilt/wast-lexer-gen.cc"
+#line 4013 "src/prebuilt/wast-lexer-gen.cc"
yy645:
yych = *++cursor_;
if (yych == 'm') goto yy848;
@@ -4032,9 +4031,9 @@ yy649:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 371 "src/wast-lexer.cc"
+#line 370 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64Sub); }
-#line 4038 "src/prebuilt/wast-lexer-gen.cc"
+#line 4037 "src/prebuilt/wast-lexer-gen.cc"
yy651:
yych = *++cursor_;
if (yych == 'n') goto yy853;
@@ -4159,17 +4158,17 @@ yy673:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 338 "src/wast-lexer.cc"
+#line 337 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32Add); }
-#line 4165 "src/prebuilt/wast-lexer-gen.cc"
+#line 4164 "src/prebuilt/wast-lexer-gen.cc"
yy675:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 352 "src/wast-lexer.cc"
+#line 351 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32And); }
-#line 4173 "src/prebuilt/wast-lexer-gen.cc"
+#line 4172 "src/prebuilt/wast-lexer-gen.cc"
yy677:
yych = *++cursor_;
if (yych == 'm') goto yy898;
@@ -4179,9 +4178,9 @@ yy678:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 313 "src/wast-lexer.cc"
+#line 312 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32Clz); }
-#line 4185 "src/prebuilt/wast-lexer-gen.cc"
+#line 4184 "src/prebuilt/wast-lexer-gen.cc"
yy680:
yych = *++cursor_;
if (yych == 's') goto yy899;
@@ -4191,9 +4190,9 @@ yy681:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 315 "src/wast-lexer.cc"
+#line 314 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32Ctz); }
-#line 4197 "src/prebuilt/wast-lexer-gen.cc"
+#line 4196 "src/prebuilt/wast-lexer-gen.cc"
yy683:
yych = *++cursor_;
if (yych == '_') goto yy900;
@@ -4203,9 +4202,9 @@ yy684:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 311 "src/wast-lexer.cc"
+#line 310 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32Eqz); }
-#line 4209 "src/prebuilt/wast-lexer-gen.cc"
+#line 4208 "src/prebuilt/wast-lexer-gen.cc"
yy686:
yych = *++cursor_;
if (yych == 'e') goto yy901;
@@ -4239,9 +4238,9 @@ yy692:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 342 "src/wast-lexer.cc"
+#line 341 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32Mul); }
-#line 4245 "src/prebuilt/wast-lexer-gen.cc"
+#line 4244 "src/prebuilt/wast-lexer-gen.cc"
yy694:
yych = *++cursor_;
if (yych == 'c') goto yy920;
@@ -4264,9 +4263,9 @@ yy698:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 358 "src/wast-lexer.cc"
+#line 357 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32Shl); }
-#line 4270 "src/prebuilt/wast-lexer-gen.cc"
+#line 4269 "src/prebuilt/wast-lexer-gen.cc"
yy700:
yych = *++cursor_;
if (yych == '_') goto yy927;
@@ -4280,9 +4279,9 @@ yy702:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 340 "src/wast-lexer.cc"
+#line 339 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32Sub); }
-#line 4286 "src/prebuilt/wast-lexer-gen.cc"
+#line 4285 "src/prebuilt/wast-lexer-gen.cc"
yy704:
yych = *++cursor_;
if (yych == 'n') goto yy929;
@@ -4296,9 +4295,9 @@ yy706:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 356 "src/wast-lexer.cc"
+#line 355 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32Xor); }
-#line 4302 "src/prebuilt/wast-lexer-gen.cc"
+#line 4301 "src/prebuilt/wast-lexer-gen.cc"
yy708:
yych = *++cursor_;
if (yych <= 'k') {
@@ -4355,17 +4354,17 @@ yy717:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 339 "src/wast-lexer.cc"
+#line 338 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64Add); }
-#line 4361 "src/prebuilt/wast-lexer-gen.cc"
+#line 4360 "src/prebuilt/wast-lexer-gen.cc"
yy719:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 353 "src/wast-lexer.cc"
+#line 352 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64And); }
-#line 4369 "src/prebuilt/wast-lexer-gen.cc"
+#line 4368 "src/prebuilt/wast-lexer-gen.cc"
yy721:
yych = *++cursor_;
if (yych == 'm') goto yy949;
@@ -4375,9 +4374,9 @@ yy722:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 314 "src/wast-lexer.cc"
+#line 313 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64Clz); }
-#line 4381 "src/prebuilt/wast-lexer-gen.cc"
+#line 4380 "src/prebuilt/wast-lexer-gen.cc"
yy724:
yych = *++cursor_;
if (yych == 's') goto yy950;
@@ -4387,9 +4386,9 @@ yy725:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 316 "src/wast-lexer.cc"
+#line 315 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64Ctz); }
-#line 4393 "src/prebuilt/wast-lexer-gen.cc"
+#line 4392 "src/prebuilt/wast-lexer-gen.cc"
yy727:
yych = *++cursor_;
if (yych == '_') goto yy951;
@@ -4399,9 +4398,9 @@ yy728:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 312 "src/wast-lexer.cc"
+#line 311 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64Eqz); }
-#line 4405 "src/prebuilt/wast-lexer-gen.cc"
+#line 4404 "src/prebuilt/wast-lexer-gen.cc"
yy730:
yych = *++cursor_;
if (yych == 'e') goto yy952;
@@ -4435,9 +4434,9 @@ yy736:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 343 "src/wast-lexer.cc"
+#line 342 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64Mul); }
-#line 4441 "src/prebuilt/wast-lexer-gen.cc"
+#line 4440 "src/prebuilt/wast-lexer-gen.cc"
yy738:
yych = *++cursor_;
if (yych == 'c') goto yy971;
@@ -4460,9 +4459,9 @@ yy742:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 359 "src/wast-lexer.cc"
+#line 358 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64Shl); }
-#line 4466 "src/prebuilt/wast-lexer-gen.cc"
+#line 4465 "src/prebuilt/wast-lexer-gen.cc"
yy744:
yych = *++cursor_;
if (yych == '_') goto yy978;
@@ -4476,9 +4475,9 @@ yy746:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 341 "src/wast-lexer.cc"
+#line 340 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64Sub); }
-#line 4482 "src/prebuilt/wast-lexer-gen.cc"
+#line 4481 "src/prebuilt/wast-lexer-gen.cc"
yy748:
yych = *++cursor_;
if (yych == 'n') goto yy980;
@@ -4488,9 +4487,9 @@ yy749:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 357 "src/wast-lexer.cc"
+#line 356 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64Xor); }
-#line 4494 "src/prebuilt/wast-lexer-gen.cc"
+#line 4493 "src/prebuilt/wast-lexer-gen.cc"
yy751:
yych = *++cursor_;
if (yych <= 'k') {
@@ -4630,9 +4629,9 @@ yy771:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 693 "src/wast-lexer.cc"
+#line 692 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Rethrow); }
-#line 4636 "src/prebuilt/wast-lexer-gen.cc"
+#line 4635 "src/prebuilt/wast-lexer-gen.cc"
yy773:
yych = *++cursor_;
if (yych == 'b') goto yy1017;
@@ -4674,9 +4673,9 @@ yy782:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 580 "src/wast-lexer.cc"
+#line 579 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, V128Or); }
-#line 4680 "src/prebuilt/wast-lexer-gen.cc"
+#line 4679 "src/prebuilt/wast-lexer-gen.cc"
yy784:
yych = *++cursor_;
if (yych == 'o') goto yy1028;
@@ -4772,9 +4771,9 @@ yy796:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 271 "src/wast-lexer.cc"
+#line 270 "src/wast-lexer.cc"
{ RETURN_OPCODE0(BrTable); }
-#line 4778 "src/prebuilt/wast-lexer-gen.cc"
+#line 4777 "src/prebuilt/wast-lexer-gen.cc"
yy798:
yych = *++cursor_;
if (yych == 'i') goto yy1041;
@@ -4788,9 +4787,9 @@ yy800:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 325 "src/wast-lexer.cc"
+#line 324 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32Ceil); }
-#line 4794 "src/prebuilt/wast-lexer-gen.cc"
+#line 4793 "src/prebuilt/wast-lexer-gen.cc"
yy802:
yych = *++cursor_;
if (yych == 't') goto yy1043;
@@ -4816,9 +4815,9 @@ yy807:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 284 "src/wast-lexer.cc"
+#line 283 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, F32Load); }
-#line 4822 "src/prebuilt/wast-lexer-gen.cc"
+#line 4821 "src/prebuilt/wast-lexer-gen.cc"
yy809:
yych = *++cursor_;
if (yych == 'e') goto yy1050;
@@ -4832,9 +4831,9 @@ yy811:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 323 "src/wast-lexer.cc"
+#line 322 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32Sqrt); }
-#line 4838 "src/prebuilt/wast-lexer-gen.cc"
+#line 4837 "src/prebuilt/wast-lexer-gen.cc"
yy813:
yych = *++cursor_;
if (yych == 'e') goto yy1052;
@@ -4864,9 +4863,9 @@ yy819:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 595 "src/wast-lexer.cc"
+#line 594 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32X4Eq); }
-#line 4870 "src/prebuilt/wast-lexer-gen.cc"
+#line 4869 "src/prebuilt/wast-lexer-gen.cc"
yy821:
yych = *++cursor_;
if (yych == 't') goto yy1063;
@@ -4876,33 +4875,33 @@ yy822:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 632 "src/wast-lexer.cc"
+#line 631 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32X4Ge); }
-#line 4882 "src/prebuilt/wast-lexer-gen.cc"
+#line 4881 "src/prebuilt/wast-lexer-gen.cc"
yy824:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 624 "src/wast-lexer.cc"
+#line 623 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32X4Gt); }
-#line 4890 "src/prebuilt/wast-lexer-gen.cc"
+#line 4889 "src/prebuilt/wast-lexer-gen.cc"
yy826:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 616 "src/wast-lexer.cc"
+#line 615 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32X4Le); }
-#line 4898 "src/prebuilt/wast-lexer-gen.cc"
+#line 4897 "src/prebuilt/wast-lexer-gen.cc"
yy828:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 608 "src/wast-lexer.cc"
+#line 607 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32X4Lt); }
-#line 4906 "src/prebuilt/wast-lexer-gen.cc"
+#line 4905 "src/prebuilt/wast-lexer-gen.cc"
yy830:
yych = *++cursor_;
if (yych == 'x') goto yy1064;
@@ -4933,9 +4932,9 @@ yy833:
}
}
yy834:
-#line 600 "src/wast-lexer.cc"
+#line 599 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F32X4Ne); }
-#line 4939 "src/prebuilt/wast-lexer-gen.cc"
+#line 4938 "src/prebuilt/wast-lexer-gen.cc"
yy835:
yych = *++cursor_;
if (yych == 'p') goto yy1072;
@@ -4957,9 +4956,9 @@ yy839:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 326 "src/wast-lexer.cc"
+#line 325 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64Ceil); }
-#line 4963 "src/prebuilt/wast-lexer-gen.cc"
+#line 4962 "src/prebuilt/wast-lexer-gen.cc"
yy841:
yych = *++cursor_;
if (yych == 't') goto yy1077;
@@ -4981,9 +4980,9 @@ yy845:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 285 "src/wast-lexer.cc"
+#line 284 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, F64Load); }
-#line 4987 "src/prebuilt/wast-lexer-gen.cc"
+#line 4986 "src/prebuilt/wast-lexer-gen.cc"
yy847:
yych = *++cursor_;
if (yych == 'e') goto yy1083;
@@ -5001,9 +5000,9 @@ yy850:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 324 "src/wast-lexer.cc"
+#line 323 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64Sqrt); }
-#line 5007 "src/prebuilt/wast-lexer-gen.cc"
+#line 5006 "src/prebuilt/wast-lexer-gen.cc"
yy852:
yych = *++cursor_;
if (yych == 'e') goto yy1086;
@@ -5033,9 +5032,9 @@ yy858:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 596 "src/wast-lexer.cc"
+#line 595 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64X2Eq); }
-#line 5039 "src/prebuilt/wast-lexer-gen.cc"
+#line 5038 "src/prebuilt/wast-lexer-gen.cc"
yy860:
yych = *++cursor_;
if (yych == 't') goto yy1097;
@@ -5045,33 +5044,33 @@ yy861:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 633 "src/wast-lexer.cc"
+#line 632 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64X2Ge); }
-#line 5051 "src/prebuilt/wast-lexer-gen.cc"
+#line 5050 "src/prebuilt/wast-lexer-gen.cc"
yy863:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 625 "src/wast-lexer.cc"
+#line 624 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64X2Gt); }
-#line 5059 "src/prebuilt/wast-lexer-gen.cc"
+#line 5058 "src/prebuilt/wast-lexer-gen.cc"
yy865:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 617 "src/wast-lexer.cc"
+#line 616 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64X2Le); }
-#line 5067 "src/prebuilt/wast-lexer-gen.cc"
+#line 5066 "src/prebuilt/wast-lexer-gen.cc"
yy867:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 609 "src/wast-lexer.cc"
+#line 608 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64X2Lt); }
-#line 5075 "src/prebuilt/wast-lexer-gen.cc"
+#line 5074 "src/prebuilt/wast-lexer-gen.cc"
yy869:
yych = *++cursor_;
if (yych == 'x') goto yy1098;
@@ -5102,9 +5101,9 @@ yy872:
}
}
yy873:
-#line 601 "src/wast-lexer.cc"
+#line 600 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, F64X2Ne); }
-#line 5108 "src/prebuilt/wast-lexer-gen.cc"
+#line 5107 "src/prebuilt/wast-lexer-gen.cc"
yy874:
yych = *++cursor_;
if (yych == 'p') goto yy1106;
@@ -5150,9 +5149,9 @@ yy884:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 593 "src/wast-lexer.cc"
+#line 592 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8Eq); }
-#line 5156 "src/prebuilt/wast-lexer-gen.cc"
+#line 5155 "src/prebuilt/wast-lexer-gen.cc"
yy886:
yych = *++cursor_;
if (yych == 't') goto yy1119;
@@ -5195,9 +5194,9 @@ yy892:
}
}
yy893:
-#line 598 "src/wast-lexer.cc"
+#line 597 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8Ne); }
-#line 5201 "src/prebuilt/wast-lexer-gen.cc"
+#line 5200 "src/prebuilt/wast-lexer-gen.cc"
yy894:
yych = *++cursor_;
if (yych == 'p') goto yy1128;
@@ -5237,49 +5236,49 @@ yy902:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 398 "src/wast-lexer.cc"
+#line 397 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32GeS); }
-#line 5243 "src/prebuilt/wast-lexer-gen.cc"
+#line 5242 "src/prebuilt/wast-lexer-gen.cc"
yy904:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 400 "src/wast-lexer.cc"
+#line 399 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32GeU); }
-#line 5251 "src/prebuilt/wast-lexer-gen.cc"
+#line 5250 "src/prebuilt/wast-lexer-gen.cc"
yy906:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 394 "src/wast-lexer.cc"
+#line 393 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32GtS); }
-#line 5259 "src/prebuilt/wast-lexer-gen.cc"
+#line 5258 "src/prebuilt/wast-lexer-gen.cc"
yy908:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 396 "src/wast-lexer.cc"
+#line 395 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32GtU); }
-#line 5267 "src/prebuilt/wast-lexer-gen.cc"
+#line 5266 "src/prebuilt/wast-lexer-gen.cc"
yy910:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 390 "src/wast-lexer.cc"
+#line 389 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32LeS); }
-#line 5275 "src/prebuilt/wast-lexer-gen.cc"
+#line 5274 "src/prebuilt/wast-lexer-gen.cc"
yy912:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 392 "src/wast-lexer.cc"
+#line 391 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32LeU); }
-#line 5283 "src/prebuilt/wast-lexer-gen.cc"
+#line 5282 "src/prebuilt/wast-lexer-gen.cc"
yy914:
yych = *++cursor_;
if (yych <= '0') {
@@ -5300,25 +5299,25 @@ yy914:
}
}
yy915:
-#line 282 "src/wast-lexer.cc"
+#line 281 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I32Load); }
-#line 5306 "src/prebuilt/wast-lexer-gen.cc"
+#line 5305 "src/prebuilt/wast-lexer-gen.cc"
yy916:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 386 "src/wast-lexer.cc"
+#line 385 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32LtS); }
-#line 5314 "src/prebuilt/wast-lexer-gen.cc"
+#line 5313 "src/prebuilt/wast-lexer-gen.cc"
yy918:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 388 "src/wast-lexer.cc"
+#line 387 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32LtU); }
-#line 5322 "src/prebuilt/wast-lexer-gen.cc"
+#line 5321 "src/prebuilt/wast-lexer-gen.cc"
yy920:
yych = *++cursor_;
if (yych == 'n') goto yy1145;
@@ -5337,17 +5336,17 @@ yy923:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 364 "src/wast-lexer.cc"
+#line 363 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32Rotl); }
-#line 5343 "src/prebuilt/wast-lexer-gen.cc"
+#line 5342 "src/prebuilt/wast-lexer-gen.cc"
yy925:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 366 "src/wast-lexer.cc"
+#line 365 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32Rotr); }
-#line 5351 "src/prebuilt/wast-lexer-gen.cc"
+#line 5350 "src/prebuilt/wast-lexer-gen.cc"
yy927:
yych = *++cursor_;
if (yych == 's') goto yy1151;
@@ -5382,9 +5381,9 @@ yy934:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 594 "src/wast-lexer.cc"
+#line 593 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4Eq); }
-#line 5388 "src/prebuilt/wast-lexer-gen.cc"
+#line 5387 "src/prebuilt/wast-lexer-gen.cc"
yy936:
yych = *++cursor_;
if (yych == 't') goto yy1163;
@@ -5427,9 +5426,9 @@ yy942:
}
}
yy943:
-#line 599 "src/wast-lexer.cc"
+#line 598 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4Ne); }
-#line 5433 "src/prebuilt/wast-lexer-gen.cc"
+#line 5432 "src/prebuilt/wast-lexer-gen.cc"
yy944:
yych = *++cursor_;
if (yych == 'p') goto yy1172;
@@ -5473,49 +5472,49 @@ yy953:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 399 "src/wast-lexer.cc"
+#line 398 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64GeS); }
-#line 5479 "src/prebuilt/wast-lexer-gen.cc"
+#line 5478 "src/prebuilt/wast-lexer-gen.cc"
yy955:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 401 "src/wast-lexer.cc"
+#line 400 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64GeU); }
-#line 5487 "src/prebuilt/wast-lexer-gen.cc"
+#line 5486 "src/prebuilt/wast-lexer-gen.cc"
yy957:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 395 "src/wast-lexer.cc"
+#line 394 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64GtS); }
-#line 5495 "src/prebuilt/wast-lexer-gen.cc"
+#line 5494 "src/prebuilt/wast-lexer-gen.cc"
yy959:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 397 "src/wast-lexer.cc"
+#line 396 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64GtU); }
-#line 5503 "src/prebuilt/wast-lexer-gen.cc"
+#line 5502 "src/prebuilt/wast-lexer-gen.cc"
yy961:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 391 "src/wast-lexer.cc"
+#line 390 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64LeS); }
-#line 5511 "src/prebuilt/wast-lexer-gen.cc"
+#line 5510 "src/prebuilt/wast-lexer-gen.cc"
yy963:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 393 "src/wast-lexer.cc"
+#line 392 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64LeU); }
-#line 5519 "src/prebuilt/wast-lexer-gen.cc"
+#line 5518 "src/prebuilt/wast-lexer-gen.cc"
yy965:
yych = *++cursor_;
if (yych <= '1') {
@@ -5538,25 +5537,25 @@ yy965:
}
}
yy966:
-#line 283 "src/wast-lexer.cc"
+#line 282 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I64Load); }
-#line 5544 "src/prebuilt/wast-lexer-gen.cc"
+#line 5543 "src/prebuilt/wast-lexer-gen.cc"
yy967:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 387 "src/wast-lexer.cc"
+#line 386 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64LtS); }
-#line 5552 "src/prebuilt/wast-lexer-gen.cc"
+#line 5551 "src/prebuilt/wast-lexer-gen.cc"
yy969:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 389 "src/wast-lexer.cc"
+#line 388 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I64LtU); }
-#line 5560 "src/prebuilt/wast-lexer-gen.cc"
+#line 5559 "src/prebuilt/wast-lexer-gen.cc"
yy971:
yych = *++cursor_;
if (yych == 'n') goto yy1191;
@@ -5575,17 +5574,17 @@ yy974:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 365 "src/wast-lexer.cc"
+#line 364 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64Rotl); }
-#line 5581 "src/prebuilt/wast-lexer-gen.cc"
+#line 5580 "src/prebuilt/wast-lexer-gen.cc"
yy976:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 367 "src/wast-lexer.cc"
+#line 366 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64Rotr); }
-#line 5589 "src/prebuilt/wast-lexer-gen.cc"
+#line 5588 "src/prebuilt/wast-lexer-gen.cc"
yy978:
yych = *++cursor_;
if (yych == 's') goto yy1197;
@@ -5657,9 +5656,9 @@ yy994:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 592 "src/wast-lexer.cc"
+#line 591 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16Eq); }
-#line 5663 "src/prebuilt/wast-lexer-gen.cc"
+#line 5662 "src/prebuilt/wast-lexer-gen.cc"
yy996:
yych = *++cursor_;
if (yych == 't') goto yy1223;
@@ -5702,9 +5701,9 @@ yy1002:
}
}
yy1003:
-#line 597 "src/wast-lexer.cc"
+#line 596 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16Ne); }
-#line 5708 "src/prebuilt/wast-lexer-gen.cc"
+#line 5707 "src/prebuilt/wast-lexer-gen.cc"
yy1004:
yych = *++cursor_;
if (yych == 'p') goto yy1232;
@@ -5739,9 +5738,9 @@ yy1011:
if (yych == 'x') goto yy1244;
goto yy1014;
yy1012:
-#line 305 "src/wast-lexer.cc"
+#line 304 "src/wast-lexer.cc"
{ RETURN_TEXT_AT(OffsetEqNat, 7); }
-#line 5745 "src/prebuilt/wast-lexer-gen.cc"
+#line 5744 "src/prebuilt/wast-lexer-gen.cc"
yy1013:
++cursor_;
if (limit_ <= cursor_) FILL(1);
@@ -5772,9 +5771,9 @@ yy1015:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 679 "src/wast-lexer.cc"
+#line 678 "src/wast-lexer.cc"
{ RETURN(Register); }
-#line 5778 "src/prebuilt/wast-lexer-gen.cc"
+#line 5777 "src/prebuilt/wast-lexer-gen.cc"
yy1017:
yych = *++cursor_;
if (yych == 'a') goto yy1245;
@@ -5796,9 +5795,9 @@ yy1021:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 579 "src/wast-lexer.cc"
+#line 578 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, V128And); }
-#line 5802 "src/prebuilt/wast-lexer-gen.cc"
+#line 5801 "src/prebuilt/wast-lexer-gen.cc"
yy1023:
yych = *++cursor_;
if (yych == 's') goto yy1251;
@@ -5816,9 +5815,9 @@ yy1026:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 582 "src/wast-lexer.cc"
+#line 581 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, V128Not); }
-#line 5822 "src/prebuilt/wast-lexer-gen.cc"
+#line 5821 "src/prebuilt/wast-lexer-gen.cc"
yy1028:
yych = *++cursor_;
if (yych == 'r') goto yy1255;
@@ -5828,9 +5827,9 @@ yy1029:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 581 "src/wast-lexer.cc"
+#line 580 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, V128Xor); }
-#line 5834 "src/prebuilt/wast-lexer-gen.cc"
+#line 5833 "src/prebuilt/wast-lexer-gen.cc"
yy1031:
yych = *++cursor_;
if (yych == 'u') goto yy1256;
@@ -5908,9 +5907,9 @@ yy1043:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 309 "src/wast-lexer.cc"
+#line 308 "src/wast-lexer.cc"
{ RETURN_OPCODE(Const, F32Const); }
-#line 5914 "src/prebuilt/wast-lexer-gen.cc"
+#line 5913 "src/prebuilt/wast-lexer-gen.cc"
yy1045:
yych = *++cursor_;
if (yych == 'r') goto yy1266;
@@ -5928,9 +5927,9 @@ yy1048:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 327 "src/wast-lexer.cc"
+#line 326 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32Floor); }
-#line 5934 "src/prebuilt/wast-lexer-gen.cc"
+#line 5933 "src/prebuilt/wast-lexer-gen.cc"
yy1050:
yych = *++cursor_;
if (yych == 's') goto yy1269;
@@ -5944,33 +5943,33 @@ yy1052:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 288 "src/wast-lexer.cc"
+#line 287 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, F32Store); }
-#line 5950 "src/prebuilt/wast-lexer-gen.cc"
+#line 5949 "src/prebuilt/wast-lexer-gen.cc"
yy1054:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 329 "src/wast-lexer.cc"
+#line 328 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32Trunc); }
-#line 5958 "src/prebuilt/wast-lexer-gen.cc"
+#line 5957 "src/prebuilt/wast-lexer-gen.cc"
yy1056:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 636 "src/wast-lexer.cc"
+#line 635 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32X4Abs); }
-#line 5966 "src/prebuilt/wast-lexer-gen.cc"
+#line 5965 "src/prebuilt/wast-lexer-gen.cc"
yy1058:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 642 "src/wast-lexer.cc"
+#line 641 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32X4Add); }
-#line 5974 "src/prebuilt/wast-lexer-gen.cc"
+#line 5973 "src/prebuilt/wast-lexer-gen.cc"
yy1060:
yych = *++cursor_;
if (yych == 'v') goto yy1271;
@@ -5980,9 +5979,9 @@ yy1061:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 646 "src/wast-lexer.cc"
+#line 645 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32X4Div); }
-#line 5986 "src/prebuilt/wast-lexer-gen.cc"
+#line 5985 "src/prebuilt/wast-lexer-gen.cc"
yy1063:
yych = *++cursor_;
if (yych == 'r') goto yy1272;
@@ -5992,33 +5991,33 @@ yy1064:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 640 "src/wast-lexer.cc"
+#line 639 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32X4Max); }
-#line 5998 "src/prebuilt/wast-lexer-gen.cc"
+#line 5997 "src/prebuilt/wast-lexer-gen.cc"
yy1066:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 638 "src/wast-lexer.cc"
+#line 637 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32X4Min); }
-#line 6006 "src/prebuilt/wast-lexer-gen.cc"
+#line 6005 "src/prebuilt/wast-lexer-gen.cc"
yy1068:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 648 "src/wast-lexer.cc"
+#line 647 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32X4Mul); }
-#line 6014 "src/prebuilt/wast-lexer-gen.cc"
+#line 6013 "src/prebuilt/wast-lexer-gen.cc"
yy1070:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 634 "src/wast-lexer.cc"
+#line 633 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32X4Neg); }
-#line 6022 "src/prebuilt/wast-lexer-gen.cc"
+#line 6021 "src/prebuilt/wast-lexer-gen.cc"
yy1072:
yych = *++cursor_;
if (yych == 'l') goto yy1273;
@@ -6036,17 +6035,17 @@ yy1075:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 644 "src/wast-lexer.cc"
+#line 643 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32X4Sub); }
-#line 6042 "src/prebuilt/wast-lexer-gen.cc"
+#line 6041 "src/prebuilt/wast-lexer-gen.cc"
yy1077:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 310 "src/wast-lexer.cc"
+#line 309 "src/wast-lexer.cc"
{ RETURN_OPCODE(Const, F64Const); }
-#line 6050 "src/prebuilt/wast-lexer-gen.cc"
+#line 6049 "src/prebuilt/wast-lexer-gen.cc"
yy1079:
yych = *++cursor_;
if (yych == 'r') goto yy1277;
@@ -6060,9 +6059,9 @@ yy1081:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 328 "src/wast-lexer.cc"
+#line 327 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64Floor); }
-#line 6066 "src/prebuilt/wast-lexer-gen.cc"
+#line 6065 "src/prebuilt/wast-lexer-gen.cc"
yy1083:
yych = *++cursor_;
if (yych == 's') goto yy1279;
@@ -6080,33 +6079,33 @@ yy1086:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 289 "src/wast-lexer.cc"
+#line 288 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, F64Store); }
-#line 6086 "src/prebuilt/wast-lexer-gen.cc"
+#line 6085 "src/prebuilt/wast-lexer-gen.cc"
yy1088:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 330 "src/wast-lexer.cc"
+#line 329 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64Trunc); }
-#line 6094 "src/prebuilt/wast-lexer-gen.cc"
+#line 6093 "src/prebuilt/wast-lexer-gen.cc"
yy1090:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 637 "src/wast-lexer.cc"
+#line 636 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64X2Abs); }
-#line 6102 "src/prebuilt/wast-lexer-gen.cc"
+#line 6101 "src/prebuilt/wast-lexer-gen.cc"
yy1092:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 643 "src/wast-lexer.cc"
+#line 642 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64X2Add); }
-#line 6110 "src/prebuilt/wast-lexer-gen.cc"
+#line 6109 "src/prebuilt/wast-lexer-gen.cc"
yy1094:
yych = *++cursor_;
if (yych == 'v') goto yy1282;
@@ -6116,9 +6115,9 @@ yy1095:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 647 "src/wast-lexer.cc"
+#line 646 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64X2Div); }
-#line 6122 "src/prebuilt/wast-lexer-gen.cc"
+#line 6121 "src/prebuilt/wast-lexer-gen.cc"
yy1097:
yych = *++cursor_;
if (yych == 'r') goto yy1283;
@@ -6128,33 +6127,33 @@ yy1098:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 641 "src/wast-lexer.cc"
+#line 640 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64X2Max); }
-#line 6134 "src/prebuilt/wast-lexer-gen.cc"
+#line 6133 "src/prebuilt/wast-lexer-gen.cc"
yy1100:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 639 "src/wast-lexer.cc"
+#line 638 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64X2Min); }
-#line 6142 "src/prebuilt/wast-lexer-gen.cc"
+#line 6141 "src/prebuilt/wast-lexer-gen.cc"
yy1102:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 649 "src/wast-lexer.cc"
+#line 648 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64X2Mul); }
-#line 6150 "src/prebuilt/wast-lexer-gen.cc"
+#line 6149 "src/prebuilt/wast-lexer-gen.cc"
yy1104:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 635 "src/wast-lexer.cc"
+#line 634 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64X2Neg); }
-#line 6158 "src/prebuilt/wast-lexer-gen.cc"
+#line 6157 "src/prebuilt/wast-lexer-gen.cc"
yy1106:
yych = *++cursor_;
if (yych == 'l') goto yy1284;
@@ -6172,9 +6171,9 @@ yy1109:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 645 "src/wast-lexer.cc"
+#line 644 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64X2Sub); }
-#line 6178 "src/prebuilt/wast-lexer-gen.cc"
+#line 6177 "src/prebuilt/wast-lexer-gen.cc"
yy1111:
yych = *++cursor_;
if (yych == 'l') goto yy1288;
@@ -6184,9 +6183,9 @@ yy1112:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 277 "src/wast-lexer.cc"
+#line 276 "src/wast-lexer.cc"
{ RETURN_OPCODE0(GetLocal); }
-#line 6190 "src/prebuilt/wast-lexer-gen.cc"
+#line 6189 "src/prebuilt/wast-lexer-gen.cc"
yy1114:
yych = *++cursor_;
if (yych == 'r') goto yy1290;
@@ -6209,9 +6208,9 @@ yy1115:
}
}
yy1116:
-#line 545 "src/wast-lexer.cc"
+#line 544 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8Add); }
-#line 6215 "src/prebuilt/wast-lexer-gen.cc"
+#line 6214 "src/prebuilt/wast-lexer-gen.cc"
yy1117:
yych = *++cursor_;
if (yych == '_') goto yy1292;
@@ -6249,17 +6248,17 @@ yy1124:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 553 "src/wast-lexer.cc"
+#line 552 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8Mul); }
-#line 6255 "src/prebuilt/wast-lexer-gen.cc"
+#line 6254 "src/prebuilt/wast-lexer-gen.cc"
yy1126:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 556 "src/wast-lexer.cc"
+#line 555 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I16X8Neg); }
-#line 6263 "src/prebuilt/wast-lexer-gen.cc"
+#line 6262 "src/prebuilt/wast-lexer-gen.cc"
yy1128:
yych = *++cursor_;
if (yych == 'l') goto yy1311;
@@ -6269,9 +6268,9 @@ yy1129:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 568 "src/wast-lexer.cc"
+#line 567 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8Shl); }
-#line 6275 "src/prebuilt/wast-lexer-gen.cc"
+#line 6274 "src/prebuilt/wast-lexer-gen.cc"
yy1131:
yych = *++cursor_;
if (yych == '_') goto yy1312;
@@ -6298,9 +6297,9 @@ yy1133:
}
}
yy1134:
-#line 549 "src/wast-lexer.cc"
+#line 548 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8Sub); }
-#line 6304 "src/prebuilt/wast-lexer-gen.cc"
+#line 6303 "src/prebuilt/wast-lexer-gen.cc"
yy1135:
yych = *++cursor_;
if (yych == 'c') goto yy1315;
@@ -6310,25 +6309,25 @@ yy1136:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 307 "src/wast-lexer.cc"
+#line 306 "src/wast-lexer.cc"
{ RETURN_OPCODE(Const, I32Const); }
-#line 6316 "src/prebuilt/wast-lexer-gen.cc"
+#line 6315 "src/prebuilt/wast-lexer-gen.cc"
yy1138:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 344 "src/wast-lexer.cc"
+#line 343 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32DivS); }
-#line 6324 "src/prebuilt/wast-lexer-gen.cc"
+#line 6323 "src/prebuilt/wast-lexer-gen.cc"
yy1140:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 346 "src/wast-lexer.cc"
+#line 345 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32DivU); }
-#line 6332 "src/prebuilt/wast-lexer-gen.cc"
+#line 6331 "src/prebuilt/wast-lexer-gen.cc"
yy1142:
yych = *++cursor_;
if (yych == 'd') goto yy1316;
@@ -6354,33 +6353,33 @@ yy1147:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 348 "src/wast-lexer.cc"
+#line 347 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32RemS); }
-#line 6360 "src/prebuilt/wast-lexer-gen.cc"
+#line 6359 "src/prebuilt/wast-lexer-gen.cc"
yy1149:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 350 "src/wast-lexer.cc"
+#line 349 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32RemU); }
-#line 6368 "src/prebuilt/wast-lexer-gen.cc"
+#line 6367 "src/prebuilt/wast-lexer-gen.cc"
yy1151:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 360 "src/wast-lexer.cc"
+#line 359 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32ShrS); }
-#line 6376 "src/prebuilt/wast-lexer-gen.cc"
+#line 6375 "src/prebuilt/wast-lexer-gen.cc"
yy1153:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 362 "src/wast-lexer.cc"
+#line 361 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32ShrU); }
-#line 6384 "src/prebuilt/wast-lexer-gen.cc"
+#line 6383 "src/prebuilt/wast-lexer-gen.cc"
yy1155:
yych = *++cursor_;
if (yych <= '0') {
@@ -6401,9 +6400,9 @@ yy1155:
}
}
yy1156:
-#line 286 "src/wast-lexer.cc"
+#line 285 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, I32Store); }
-#line 6407 "src/prebuilt/wast-lexer-gen.cc"
+#line 6406 "src/prebuilt/wast-lexer-gen.cc"
yy1157:
yych = *++cursor_;
if (yych == '_') goto yy1325;
@@ -6417,9 +6416,9 @@ yy1159:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 546 "src/wast-lexer.cc"
+#line 545 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32X4Add); }
-#line 6423 "src/prebuilt/wast-lexer-gen.cc"
+#line 6422 "src/prebuilt/wast-lexer-gen.cc"
yy1161:
yych = *++cursor_;
if (yych == '_') goto yy1327;
@@ -6457,17 +6456,17 @@ yy1168:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 554 "src/wast-lexer.cc"
+#line 553 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32X4Mul); }
-#line 6463 "src/prebuilt/wast-lexer-gen.cc"
+#line 6462 "src/prebuilt/wast-lexer-gen.cc"
yy1170:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 557 "src/wast-lexer.cc"
+#line 556 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32X4Neg); }
-#line 6471 "src/prebuilt/wast-lexer-gen.cc"
+#line 6470 "src/prebuilt/wast-lexer-gen.cc"
yy1172:
yych = *++cursor_;
if (yych == 'l') goto yy1346;
@@ -6477,9 +6476,9 @@ yy1173:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 569 "src/wast-lexer.cc"
+#line 568 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32X4Shl); }
-#line 6483 "src/prebuilt/wast-lexer-gen.cc"
+#line 6482 "src/prebuilt/wast-lexer-gen.cc"
yy1175:
yych = *++cursor_;
if (yych == '_') goto yy1347;
@@ -6493,9 +6492,9 @@ yy1177:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 550 "src/wast-lexer.cc"
+#line 549 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32X4Sub); }
-#line 6499 "src/prebuilt/wast-lexer-gen.cc"
+#line 6498 "src/prebuilt/wast-lexer-gen.cc"
yy1179:
yych = *++cursor_;
if (yych == 'n') goto yy1349;
@@ -6509,25 +6508,25 @@ yy1181:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 308 "src/wast-lexer.cc"
+#line 307 "src/wast-lexer.cc"
{ RETURN_OPCODE(Const, I64Const); }
-#line 6515 "src/prebuilt/wast-lexer-gen.cc"
+#line 6514 "src/prebuilt/wast-lexer-gen.cc"
yy1183:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 345 "src/wast-lexer.cc"
+#line 344 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64DivS); }
-#line 6523 "src/prebuilt/wast-lexer-gen.cc"
+#line 6522 "src/prebuilt/wast-lexer-gen.cc"
yy1185:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 347 "src/wast-lexer.cc"
+#line 346 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64DivU); }
-#line 6531 "src/prebuilt/wast-lexer-gen.cc"
+#line 6530 "src/prebuilt/wast-lexer-gen.cc"
yy1187:
yych = *++cursor_;
if (yych == 'd') goto yy1351;
@@ -6557,33 +6556,33 @@ yy1193:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 349 "src/wast-lexer.cc"
+#line 348 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64RemS); }
-#line 6563 "src/prebuilt/wast-lexer-gen.cc"
+#line 6562 "src/prebuilt/wast-lexer-gen.cc"
yy1195:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 351 "src/wast-lexer.cc"
+#line 350 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64RemU); }
-#line 6571 "src/prebuilt/wast-lexer-gen.cc"
+#line 6570 "src/prebuilt/wast-lexer-gen.cc"
yy1197:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 361 "src/wast-lexer.cc"
+#line 360 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64ShrS); }
-#line 6579 "src/prebuilt/wast-lexer-gen.cc"
+#line 6578 "src/prebuilt/wast-lexer-gen.cc"
yy1199:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 363 "src/wast-lexer.cc"
+#line 362 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64ShrU); }
-#line 6587 "src/prebuilt/wast-lexer-gen.cc"
+#line 6586 "src/prebuilt/wast-lexer-gen.cc"
yy1201:
yych = *++cursor_;
if (yych <= '1') {
@@ -6606,9 +6605,9 @@ yy1201:
}
}
yy1202:
-#line 287 "src/wast-lexer.cc"
+#line 286 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, I64Store); }
-#line 6612 "src/prebuilt/wast-lexer-gen.cc"
+#line 6611 "src/prebuilt/wast-lexer-gen.cc"
yy1203:
yych = *++cursor_;
if (yych == '_') goto yy1362;
@@ -6618,9 +6617,9 @@ yy1204:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 547 "src/wast-lexer.cc"
+#line 546 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64X2Add); }
-#line 6624 "src/prebuilt/wast-lexer-gen.cc"
+#line 6623 "src/prebuilt/wast-lexer-gen.cc"
yy1206:
yych = *++cursor_;
if (yych == '_') goto yy1363;
@@ -6638,9 +6637,9 @@ yy1209:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 558 "src/wast-lexer.cc"
+#line 557 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64X2Neg); }
-#line 6644 "src/prebuilt/wast-lexer-gen.cc"
+#line 6643 "src/prebuilt/wast-lexer-gen.cc"
yy1211:
yych = *++cursor_;
if (yych == 'l') goto yy1366;
@@ -6650,9 +6649,9 @@ yy1212:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 570 "src/wast-lexer.cc"
+#line 569 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64X2Shl); }
-#line 6656 "src/prebuilt/wast-lexer-gen.cc"
+#line 6655 "src/prebuilt/wast-lexer-gen.cc"
yy1214:
yych = *++cursor_;
if (yych == '_') goto yy1367;
@@ -6666,9 +6665,9 @@ yy1216:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 551 "src/wast-lexer.cc"
+#line 550 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64X2Sub); }
-#line 6672 "src/prebuilt/wast-lexer-gen.cc"
+#line 6671 "src/prebuilt/wast-lexer-gen.cc"
yy1218:
yych = *++cursor_;
if (yych == 'n') goto yy1369;
@@ -6691,9 +6690,9 @@ yy1219:
}
}
yy1220:
-#line 544 "src/wast-lexer.cc"
+#line 543 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16Add); }
-#line 6697 "src/prebuilt/wast-lexer-gen.cc"
+#line 6696 "src/prebuilt/wast-lexer-gen.cc"
yy1221:
yych = *++cursor_;
if (yych == '_') goto yy1371;
@@ -6731,17 +6730,17 @@ yy1228:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 552 "src/wast-lexer.cc"
+#line 551 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16Mul); }
-#line 6737 "src/prebuilt/wast-lexer-gen.cc"
+#line 6736 "src/prebuilt/wast-lexer-gen.cc"
yy1230:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 555 "src/wast-lexer.cc"
+#line 554 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I8X16Neg); }
-#line 6745 "src/prebuilt/wast-lexer-gen.cc"
+#line 6744 "src/prebuilt/wast-lexer-gen.cc"
yy1232:
yych = *++cursor_;
if (yych == 'l') goto yy1390;
@@ -6751,9 +6750,9 @@ yy1233:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 567 "src/wast-lexer.cc"
+#line 566 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16Shl); }
-#line 6757 "src/prebuilt/wast-lexer-gen.cc"
+#line 6756 "src/prebuilt/wast-lexer-gen.cc"
yy1235:
yych = *++cursor_;
if (yych == '_') goto yy1391;
@@ -6780,17 +6779,17 @@ yy1237:
}
}
yy1238:
-#line 548 "src/wast-lexer.cc"
+#line 547 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16Sub); }
-#line 6786 "src/prebuilt/wast-lexer-gen.cc"
+#line 6785 "src/prebuilt/wast-lexer-gen.cc"
yy1239:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 694 "src/wast-lexer.cc"
+#line 693 "src/wast-lexer.cc"
{ RETURN_OPCODE0(IfExcept); }
-#line 6794 "src/prebuilt/wast-lexer-gen.cc"
+#line 6793 "src/prebuilt/wast-lexer-gen.cc"
yy1241:
yych = *++cursor_;
if (yych == 'o') goto yy1394;
@@ -6858,17 +6857,17 @@ yy1246:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 278 "src/wast-lexer.cc"
+#line 277 "src/wast-lexer.cc"
{ RETURN_OPCODE0(SetLocal); }
-#line 6864 "src/prebuilt/wast-lexer-gen.cc"
+#line 6863 "src/prebuilt/wast-lexer-gen.cc"
yy1248:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 279 "src/wast-lexer.cc"
+#line 278 "src/wast-lexer.cc"
{ RETURN_OPCODE0(TeeLocal); }
-#line 6872 "src/prebuilt/wast-lexer-gen.cc"
+#line 6871 "src/prebuilt/wast-lexer-gen.cc"
yy1250:
yych = *++cursor_;
if (yych == 'l') goto yy1400;
@@ -6886,9 +6885,9 @@ yy1253:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 521 "src/wast-lexer.cc"
+#line 520 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, V128Load); }
-#line 6892 "src/prebuilt/wast-lexer-gen.cc"
+#line 6891 "src/prebuilt/wast-lexer-gen.cc"
yy1255:
yych = *++cursor_;
if (yych == 'e') goto yy1404;
@@ -6974,9 +6973,9 @@ yy1275:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 650 "src/wast-lexer.cc"
+#line 649 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32X4Sqrt); }
-#line 6980 "src/prebuilt/wast-lexer-gen.cc"
+#line 6979 "src/prebuilt/wast-lexer-gen.cc"
yy1277:
yych = *++cursor_;
if (yych == 't') goto yy1429;
@@ -7018,17 +7017,17 @@ yy1286:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 651 "src/wast-lexer.cc"
+#line 650 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64X2Sqrt); }
-#line 7024 "src/prebuilt/wast-lexer-gen.cc"
+#line 7023 "src/prebuilt/wast-lexer-gen.cc"
yy1288:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 280 "src/wast-lexer.cc"
+#line 279 "src/wast-lexer.cc"
{ RETURN_OPCODE0(GetGlobal); }
-#line 7032 "src/prebuilt/wast-lexer-gen.cc"
+#line 7031 "src/prebuilt/wast-lexer-gen.cc"
yy1290:
yych = *++cursor_;
if (yych == 'y') goto yy1440;
@@ -7054,65 +7053,65 @@ yy1295:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 628 "src/wast-lexer.cc"
+#line 627 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8GeS); }
-#line 7060 "src/prebuilt/wast-lexer-gen.cc"
+#line 7059 "src/prebuilt/wast-lexer-gen.cc"
yy1297:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 629 "src/wast-lexer.cc"
+#line 628 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8GeU); }
-#line 7068 "src/prebuilt/wast-lexer-gen.cc"
+#line 7067 "src/prebuilt/wast-lexer-gen.cc"
yy1299:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 620 "src/wast-lexer.cc"
+#line 619 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8GtS); }
-#line 7076 "src/prebuilt/wast-lexer-gen.cc"
+#line 7075 "src/prebuilt/wast-lexer-gen.cc"
yy1301:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 621 "src/wast-lexer.cc"
+#line 620 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8GtU); }
-#line 7084 "src/prebuilt/wast-lexer-gen.cc"
+#line 7083 "src/prebuilt/wast-lexer-gen.cc"
yy1303:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 612 "src/wast-lexer.cc"
+#line 611 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8LeS); }
-#line 7092 "src/prebuilt/wast-lexer-gen.cc"
+#line 7091 "src/prebuilt/wast-lexer-gen.cc"
yy1305:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 613 "src/wast-lexer.cc"
+#line 612 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8LeU); }
-#line 7100 "src/prebuilt/wast-lexer-gen.cc"
+#line 7099 "src/prebuilt/wast-lexer-gen.cc"
yy1307:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 604 "src/wast-lexer.cc"
+#line 603 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8LtS); }
-#line 7108 "src/prebuilt/wast-lexer-gen.cc"
+#line 7107 "src/prebuilt/wast-lexer-gen.cc"
yy1309:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 605 "src/wast-lexer.cc"
+#line 604 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I16X8LtU); }
-#line 7116 "src/prebuilt/wast-lexer-gen.cc"
+#line 7115 "src/prebuilt/wast-lexer-gen.cc"
yy1311:
yych = *++cursor_;
if (yych == 'a') goto yy1446;
@@ -7153,9 +7152,9 @@ yy1319:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 317 "src/wast-lexer.cc"
+#line 316 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32Popcnt); }
-#line 7159 "src/prebuilt/wast-lexer-gen.cc"
+#line 7158 "src/prebuilt/wast-lexer-gen.cc"
yy1321:
yych = *++cursor_;
if (yych == 'r') goto yy1462;
@@ -7169,9 +7168,9 @@ yy1323:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 300 "src/wast-lexer.cc"
+#line 299 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, I32Store8); }
-#line 7175 "src/prebuilt/wast-lexer-gen.cc"
+#line 7174 "src/prebuilt/wast-lexer-gen.cc"
yy1325:
yych = *++cursor_;
if (yych == 's') goto yy1465;
@@ -7198,65 +7197,65 @@ yy1330:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 630 "src/wast-lexer.cc"
+#line 629 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4GeS); }
-#line 7204 "src/prebuilt/wast-lexer-gen.cc"
+#line 7203 "src/prebuilt/wast-lexer-gen.cc"
yy1332:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 631 "src/wast-lexer.cc"
+#line 630 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4GeU); }
-#line 7212 "src/prebuilt/wast-lexer-gen.cc"
+#line 7211 "src/prebuilt/wast-lexer-gen.cc"
yy1334:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 622 "src/wast-lexer.cc"
+#line 621 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4GtS); }
-#line 7220 "src/prebuilt/wast-lexer-gen.cc"
+#line 7219 "src/prebuilt/wast-lexer-gen.cc"
yy1336:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 623 "src/wast-lexer.cc"
+#line 622 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4GtU); }
-#line 7228 "src/prebuilt/wast-lexer-gen.cc"
+#line 7227 "src/prebuilt/wast-lexer-gen.cc"
yy1338:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 614 "src/wast-lexer.cc"
+#line 613 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4LeS); }
-#line 7236 "src/prebuilt/wast-lexer-gen.cc"
+#line 7235 "src/prebuilt/wast-lexer-gen.cc"
yy1340:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 615 "src/wast-lexer.cc"
+#line 614 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4LeU); }
-#line 7244 "src/prebuilt/wast-lexer-gen.cc"
+#line 7243 "src/prebuilt/wast-lexer-gen.cc"
yy1342:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 606 "src/wast-lexer.cc"
+#line 605 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4LtS); }
-#line 7252 "src/prebuilt/wast-lexer-gen.cc"
+#line 7251 "src/prebuilt/wast-lexer-gen.cc"
yy1344:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 607 "src/wast-lexer.cc"
+#line 606 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I32X4LtU); }
-#line 7260 "src/prebuilt/wast-lexer-gen.cc"
+#line 7259 "src/prebuilt/wast-lexer-gen.cc"
yy1346:
yych = *++cursor_;
if (yych == 'a') goto yy1471;
@@ -7311,9 +7310,9 @@ yy1355:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 318 "src/wast-lexer.cc"
+#line 317 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64Popcnt); }
-#line 7317 "src/prebuilt/wast-lexer-gen.cc"
+#line 7316 "src/prebuilt/wast-lexer-gen.cc"
yy1357:
yych = *++cursor_;
if (yych == 'r') goto yy1490;
@@ -7331,9 +7330,9 @@ yy1360:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 301 "src/wast-lexer.cc"
+#line 300 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, I64Store8); }
-#line 7337 "src/prebuilt/wast-lexer-gen.cc"
+#line 7336 "src/prebuilt/wast-lexer-gen.cc"
yy1362:
yych = *++cursor_;
if (yych == 's') goto yy1495;
@@ -7389,65 +7388,65 @@ yy1374:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 626 "src/wast-lexer.cc"
+#line 625 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16GeS); }
-#line 7395 "src/prebuilt/wast-lexer-gen.cc"
+#line 7394 "src/prebuilt/wast-lexer-gen.cc"
yy1376:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 627 "src/wast-lexer.cc"
+#line 626 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16GeU); }
-#line 7403 "src/prebuilt/wast-lexer-gen.cc"
+#line 7402 "src/prebuilt/wast-lexer-gen.cc"
yy1378:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 618 "src/wast-lexer.cc"
+#line 617 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16GtS); }
-#line 7411 "src/prebuilt/wast-lexer-gen.cc"
+#line 7410 "src/prebuilt/wast-lexer-gen.cc"
yy1380:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 619 "src/wast-lexer.cc"
+#line 618 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16GtU); }
-#line 7419 "src/prebuilt/wast-lexer-gen.cc"
+#line 7418 "src/prebuilt/wast-lexer-gen.cc"
yy1382:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 610 "src/wast-lexer.cc"
+#line 609 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16LeS); }
-#line 7427 "src/prebuilt/wast-lexer-gen.cc"
+#line 7426 "src/prebuilt/wast-lexer-gen.cc"
yy1384:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 611 "src/wast-lexer.cc"
+#line 610 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16LeU); }
-#line 7435 "src/prebuilt/wast-lexer-gen.cc"
+#line 7434 "src/prebuilt/wast-lexer-gen.cc"
yy1386:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 602 "src/wast-lexer.cc"
+#line 601 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16LtS); }
-#line 7443 "src/prebuilt/wast-lexer-gen.cc"
+#line 7442 "src/prebuilt/wast-lexer-gen.cc"
yy1388:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 603 "src/wast-lexer.cc"
+#line 602 "src/wast-lexer.cc"
{ RETURN_OPCODE(Compare, I8X16LtU); }
-#line 7451 "src/prebuilt/wast-lexer-gen.cc"
+#line 7450 "src/prebuilt/wast-lexer-gen.cc"
yy1390:
yych = *++cursor_;
if (yych == 'a') goto yy1512;
@@ -7510,9 +7509,9 @@ yy1398:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 281 "src/wast-lexer.cc"
+#line 280 "src/wast-lexer.cc"
{ RETURN_OPCODE0(SetGlobal); }
-#line 7516 "src/prebuilt/wast-lexer-gen.cc"
+#line 7515 "src/prebuilt/wast-lexer-gen.cc"
yy1400:
yych = *++cursor_;
if (yych == 'e') goto yy1524;
@@ -7526,17 +7525,17 @@ yy1402:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 520 "src/wast-lexer.cc"
+#line 519 "src/wast-lexer.cc"
{ RETURN_OPCODE(Const, V128Const); }
-#line 7532 "src/prebuilt/wast-lexer-gen.cc"
+#line 7531 "src/prebuilt/wast-lexer-gen.cc"
yy1404:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 522 "src/wast-lexer.cc"
+#line 521 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, V128Store); }
-#line 7540 "src/prebuilt/wast-lexer-gen.cc"
+#line 7539 "src/prebuilt/wast-lexer-gen.cc"
yy1406:
yych = *++cursor_;
if (yych == 'f') goto yy1527;
@@ -7562,9 +7561,9 @@ yy1411:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 688 "src/wast-lexer.cc"
+#line 687 "src/wast-lexer.cc"
{ RETURN(AssertTrap); }
-#line 7568 "src/prebuilt/wast-lexer-gen.cc"
+#line 7567 "src/prebuilt/wast-lexer-gen.cc"
yy1413:
yych = *++cursor_;
if (yych == 'n') goto yy1532;
@@ -7574,9 +7573,9 @@ yy1414:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 456 "src/wast-lexer.cc"
+#line 455 "src/wast-lexer.cc"
{ RETURN_OPCODE0(AtomicWake); }
-#line 7580 "src/prebuilt/wast-lexer-gen.cc"
+#line 7579 "src/prebuilt/wast-lexer-gen.cc"
yy1416:
yych = *++cursor_;
if (yych == 'c') goto yy1533;
@@ -7602,9 +7601,9 @@ yy1421:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 331 "src/wast-lexer.cc"
+#line 330 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32Nearest); }
-#line 7608 "src/prebuilt/wast-lexer-gen.cc"
+#line 7607 "src/prebuilt/wast-lexer-gen.cc"
yy1423:
yych = *++cursor_;
if (yych == 'p') goto yy1539;
@@ -7626,9 +7625,9 @@ yy1427:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 527 "src/wast-lexer.cc"
+#line 526 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32X4Splat); }
-#line 7632 "src/prebuilt/wast-lexer-gen.cc"
+#line 7631 "src/prebuilt/wast-lexer-gen.cc"
yy1429:
yych = *++cursor_;
if (yych == '_') goto yy1543;
@@ -7642,9 +7641,9 @@ yy1431:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 332 "src/wast-lexer.cc"
+#line 331 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64Nearest); }
-#line 7648 "src/prebuilt/wast-lexer-gen.cc"
+#line 7647 "src/prebuilt/wast-lexer-gen.cc"
yy1433:
yych = *++cursor_;
if (yych == '/') goto yy1546;
@@ -7670,17 +7669,17 @@ yy1438:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 528 "src/wast-lexer.cc"
+#line 527 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64X2Splat); }
-#line 7676 "src/prebuilt/wast-lexer-gen.cc"
+#line 7675 "src/prebuilt/wast-lexer-gen.cc"
yy1440:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 452 "src/wast-lexer.cc"
+#line 451 "src/wast-lexer.cc"
{ RETURN_OPCODE0(MemoryGrow); }
-#line 7684 "src/prebuilt/wast-lexer-gen.cc"
+#line 7683 "src/prebuilt/wast-lexer-gen.cc"
yy1442:
yych = *++cursor_;
if (yych == 'a') goto yy1551;
@@ -7706,25 +7705,25 @@ yy1447:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 573 "src/wast-lexer.cc"
+#line 572 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8ShrS); }
-#line 7712 "src/prebuilt/wast-lexer-gen.cc"
+#line 7711 "src/prebuilt/wast-lexer-gen.cc"
yy1449:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 574 "src/wast-lexer.cc"
+#line 573 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8ShrU); }
-#line 7720 "src/prebuilt/wast-lexer-gen.cc"
+#line 7719 "src/prebuilt/wast-lexer-gen.cc"
yy1451:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 524 "src/wast-lexer.cc"
+#line 523 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I16X8Splat); }
-#line 7728 "src/prebuilt/wast-lexer-gen.cc"
+#line 7727 "src/prebuilt/wast-lexer-gen.cc"
yy1453:
yych = *++cursor_;
if (yych == 'a') goto yy1556;
@@ -7758,17 +7757,17 @@ yy1458:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 290 "src/wast-lexer.cc"
+#line 289 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I32Load8S); }
-#line 7764 "src/prebuilt/wast-lexer-gen.cc"
+#line 7763 "src/prebuilt/wast-lexer-gen.cc"
yy1460:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 292 "src/wast-lexer.cc"
+#line 291 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I32Load8U); }
-#line 7772 "src/prebuilt/wast-lexer-gen.cc"
+#line 7771 "src/prebuilt/wast-lexer-gen.cc"
yy1462:
yych = *++cursor_;
if (yych == 'p') goto yy1567;
@@ -7778,9 +7777,9 @@ yy1463:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 302 "src/wast-lexer.cc"
+#line 301 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, I32Store16); }
-#line 7784 "src/prebuilt/wast-lexer-gen.cc"
+#line 7783 "src/prebuilt/wast-lexer-gen.cc"
yy1465:
yych = *++cursor_;
if (yych == '/') goto yy1568;
@@ -7816,25 +7815,25 @@ yy1472:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 575 "src/wast-lexer.cc"
+#line 574 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32X4ShrS); }
-#line 7822 "src/prebuilt/wast-lexer-gen.cc"
+#line 7821 "src/prebuilt/wast-lexer-gen.cc"
yy1474:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 576 "src/wast-lexer.cc"
+#line 575 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I32X4ShrU); }
-#line 7830 "src/prebuilt/wast-lexer-gen.cc"
+#line 7829 "src/prebuilt/wast-lexer-gen.cc"
yy1476:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 525 "src/wast-lexer.cc"
+#line 524 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32X4Splat); }
-#line 7838 "src/prebuilt/wast-lexer-gen.cc"
+#line 7837 "src/prebuilt/wast-lexer-gen.cc"
yy1478:
yych = *++cursor_;
if (yych == '_') goto yy1578;
@@ -7882,17 +7881,17 @@ yy1486:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 291 "src/wast-lexer.cc"
+#line 290 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I64Load8S); }
-#line 7888 "src/prebuilt/wast-lexer-gen.cc"
+#line 7887 "src/prebuilt/wast-lexer-gen.cc"
yy1488:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 293 "src/wast-lexer.cc"
+#line 292 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I64Load8U); }
-#line 7896 "src/prebuilt/wast-lexer-gen.cc"
+#line 7895 "src/prebuilt/wast-lexer-gen.cc"
yy1490:
yych = *++cursor_;
if (yych == 'p') goto yy1596;
@@ -7902,17 +7901,17 @@ yy1491:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 303 "src/wast-lexer.cc"
+#line 302 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, I64Store16); }
-#line 7908 "src/prebuilt/wast-lexer-gen.cc"
+#line 7907 "src/prebuilt/wast-lexer-gen.cc"
yy1493:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 304 "src/wast-lexer.cc"
+#line 303 "src/wast-lexer.cc"
{ RETURN_OPCODE(Store, I64Store32); }
-#line 7916 "src/prebuilt/wast-lexer-gen.cc"
+#line 7915 "src/prebuilt/wast-lexer-gen.cc"
yy1495:
yych = *++cursor_;
if (yych == '/') goto yy1597;
@@ -7944,25 +7943,25 @@ yy1501:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 577 "src/wast-lexer.cc"
+#line 576 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64X2ShrS); }
-#line 7950 "src/prebuilt/wast-lexer-gen.cc"
+#line 7949 "src/prebuilt/wast-lexer-gen.cc"
yy1503:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 578 "src/wast-lexer.cc"
+#line 577 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I64X2ShrU); }
-#line 7958 "src/prebuilt/wast-lexer-gen.cc"
+#line 7957 "src/prebuilt/wast-lexer-gen.cc"
yy1505:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 526 "src/wast-lexer.cc"
+#line 525 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64X2Splat); }
-#line 7966 "src/prebuilt/wast-lexer-gen.cc"
+#line 7965 "src/prebuilt/wast-lexer-gen.cc"
yy1507:
yych = *++cursor_;
if (yych == '_') goto yy1605;
@@ -7992,25 +7991,25 @@ yy1513:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 571 "src/wast-lexer.cc"
+#line 570 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16ShrS); }
-#line 7998 "src/prebuilt/wast-lexer-gen.cc"
+#line 7997 "src/prebuilt/wast-lexer-gen.cc"
yy1515:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 572 "src/wast-lexer.cc"
+#line 571 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16ShrU); }
-#line 8006 "src/prebuilt/wast-lexer-gen.cc"
+#line 8005 "src/prebuilt/wast-lexer-gen.cc"
yy1517:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 523 "src/wast-lexer.cc"
+#line 522 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I8X16Splat); }
-#line 8014 "src/prebuilt/wast-lexer-gen.cc"
+#line 8013 "src/prebuilt/wast-lexer-gen.cc"
yy1519:
yych = *++cursor_;
if (yych == 'a') goto yy1611;
@@ -8020,25 +8019,25 @@ yy1520:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 450 "src/wast-lexer.cc"
+#line 449 "src/wast-lexer.cc"
{ RETURN_OPCODE0(MemoryGrow); }
-#line 8026 "src/prebuilt/wast-lexer-gen.cc"
+#line 8025 "src/prebuilt/wast-lexer-gen.cc"
yy1522:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 449 "src/wast-lexer.cc"
+#line 448 "src/wast-lexer.cc"
{ RETURN_OPCODE0(MemorySize); }
-#line 8034 "src/prebuilt/wast-lexer-gen.cc"
+#line 8033 "src/prebuilt/wast-lexer-gen.cc"
yy1524:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 448 "src/wast-lexer.cc"
+#line 447 "src/wast-lexer.cc"
{ RETURN_OPCODE0(Unreachable); }
-#line 8042 "src/prebuilt/wast-lexer-gen.cc"
+#line 8041 "src/prebuilt/wast-lexer-gen.cc"
yy1526:
yych = *++cursor_;
if (yych == 'e') goto yy1612;
@@ -8085,9 +8084,9 @@ yy1536:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 380 "src/wast-lexer.cc"
+#line 379 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F32Copysign); }
-#line 8091 "src/prebuilt/wast-lexer-gen.cc"
+#line 8090 "src/prebuilt/wast-lexer-gen.cc"
yy1538:
yych = *++cursor_;
if (yych == '6') goto yy1625;
@@ -8118,9 +8117,9 @@ yy1544:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 381 "src/wast-lexer.cc"
+#line 380 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, F64Copysign); }
-#line 8124 "src/prebuilt/wast-lexer-gen.cc"
+#line 8123 "src/prebuilt/wast-lexer-gen.cc"
yy1546:
yych = *++cursor_;
if (yych == 'f') goto yy1632;
@@ -8194,17 +8193,17 @@ yy1563:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 294 "src/wast-lexer.cc"
+#line 293 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I32Load16S); }
-#line 8200 "src/prebuilt/wast-lexer-gen.cc"
+#line 8199 "src/prebuilt/wast-lexer-gen.cc"
yy1565:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 296 "src/wast-lexer.cc"
+#line 295 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I32Load16U); }
-#line 8208 "src/prebuilt/wast-lexer-gen.cc"
+#line 8207 "src/prebuilt/wast-lexer-gen.cc"
yy1567:
yych = *++cursor_;
if (yych == 'r') goto yy1650;
@@ -8230,9 +8229,9 @@ yy1572:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 416 "src/wast-lexer.cc"
+#line 415 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32WrapI64); }
-#line 8236 "src/prebuilt/wast-lexer-gen.cc"
+#line 8235 "src/prebuilt/wast-lexer-gen.cc"
yy1574:
yych = *++cursor_;
if (yych == 'u') goto yy1655;
@@ -8295,33 +8294,33 @@ yy1588:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 295 "src/wast-lexer.cc"
+#line 294 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I64Load16S); }
-#line 8301 "src/prebuilt/wast-lexer-gen.cc"
+#line 8300 "src/prebuilt/wast-lexer-gen.cc"
yy1590:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 297 "src/wast-lexer.cc"
+#line 296 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I64Load16U); }
-#line 8309 "src/prebuilt/wast-lexer-gen.cc"
+#line 8308 "src/prebuilt/wast-lexer-gen.cc"
yy1592:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 298 "src/wast-lexer.cc"
+#line 297 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I64Load32S); }
-#line 8317 "src/prebuilt/wast-lexer-gen.cc"
+#line 8316 "src/prebuilt/wast-lexer-gen.cc"
yy1594:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 299 "src/wast-lexer.cc"
+#line 298 "src/wast-lexer.cc"
{ RETURN_OPCODE(Load, I64Load32U); }
-#line 8325 "src/prebuilt/wast-lexer-gen.cc"
+#line 8324 "src/prebuilt/wast-lexer-gen.cc"
yy1596:
yych = *++cursor_;
if (yych == 'r') goto yy1671;
@@ -8425,9 +8424,9 @@ yy1617:
}
}
yy1618:
-#line 685 "src/wast-lexer.cc"
+#line 684 "src/wast-lexer.cc"
{ RETURN(AssertReturn); }
-#line 8431 "src/prebuilt/wast-lexer-gen.cc"
+#line 8430 "src/prebuilt/wast-lexer-gen.cc"
yy1619:
yych = *++cursor_;
if (yych == 'a') goto yy1696;
@@ -8437,9 +8436,9 @@ yy1620:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 273 "src/wast-lexer.cc"
+#line 272 "src/wast-lexer.cc"
{ RETURN_OPCODE0(CallIndirect); }
-#line 8443 "src/prebuilt/wast-lexer-gen.cc"
+#line 8442 "src/prebuilt/wast-lexer-gen.cc"
yy1622:
yych = *++cursor_;
if (yych == 'y') goto yy1697;
@@ -8549,9 +8548,9 @@ yy1648:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 333 "src/wast-lexer.cc"
+#line 332 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32Extend8S); }
-#line 8555 "src/prebuilt/wast-lexer-gen.cc"
+#line 8554 "src/prebuilt/wast-lexer-gen.cc"
yy1650:
yych = *++cursor_;
if (yych == 'e') goto yy1728;
@@ -8627,9 +8626,9 @@ yy1667:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 335 "src/wast-lexer.cc"
+#line 334 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64Extend8S); }
-#line 8633 "src/prebuilt/wast-lexer-gen.cc"
+#line 8632 "src/prebuilt/wast-lexer-gen.cc"
yy1669:
yych = *++cursor_;
if (yych == 'i') goto yy1751;
@@ -8717,9 +8716,9 @@ yy1689:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 543 "src/wast-lexer.cc"
+#line 542 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdShuffleOp, V8X16Shuffle); }
-#line 8723 "src/prebuilt/wast-lexer-gen.cc"
+#line 8722 "src/prebuilt/wast-lexer-gen.cc"
yy1691:
yych = *++cursor_;
if (yych == 'i') goto yy1778;
@@ -8729,9 +8728,9 @@ yy1692:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 683 "src/wast-lexer.cc"
+#line 682 "src/wast-lexer.cc"
{ RETURN(AssertInvalid); }
-#line 8735 "src/prebuilt/wast-lexer-gen.cc"
+#line 8734 "src/prebuilt/wast-lexer-gen.cc"
yy1694:
yych = *++cursor_;
if (yych == 'e') goto yy1779;
@@ -8750,9 +8749,9 @@ yy1697:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 451 "src/wast-lexer.cc"
+#line 450 "src/wast-lexer.cc"
{ RETURN_OPCODE0(MemorySize); }
-#line 8756 "src/prebuilt/wast-lexer-gen.cc"
+#line 8755 "src/prebuilt/wast-lexer-gen.cc"
yy1699:
yych = *++cursor_;
if (yych == 'i') goto yy1783;
@@ -8766,9 +8765,9 @@ yy1701:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 442 "src/wast-lexer.cc"
+#line 441 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F32DemoteF64); }
-#line 8772 "src/prebuilt/wast-lexer-gen.cc"
+#line 8771 "src/prebuilt/wast-lexer-gen.cc"
yy1703:
yych = *++cursor_;
if (yych == 't') goto yy1785;
@@ -8824,17 +8823,17 @@ yy1715:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 589 "src/wast-lexer.cc"
+#line 588 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I16X8AllTrue); }
-#line 8830 "src/prebuilt/wast-lexer-gen.cc"
+#line 8829 "src/prebuilt/wast-lexer-gen.cc"
yy1717:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 585 "src/wast-lexer.cc"
+#line 584 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I16X8AnyTrue); }
-#line 8838 "src/prebuilt/wast-lexer-gen.cc"
+#line 8837 "src/prebuilt/wast-lexer-gen.cc"
yy1719:
yych = *++cursor_;
if (yych == 'l') goto yy1800;
@@ -8874,9 +8873,9 @@ yy1726:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 334 "src/wast-lexer.cc"
+#line 333 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32Extend16S); }
-#line 8880 "src/prebuilt/wast-lexer-gen.cc"
+#line 8879 "src/prebuilt/wast-lexer-gen.cc"
yy1728:
yych = *++cursor_;
if (yych == 't') goto yy1811;
@@ -8910,17 +8909,17 @@ yy1735:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 590 "src/wast-lexer.cc"
+#line 589 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32X4AllTrue); }
-#line 8916 "src/prebuilt/wast-lexer-gen.cc"
+#line 8915 "src/prebuilt/wast-lexer-gen.cc"
yy1737:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 586 "src/wast-lexer.cc"
+#line 585 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32X4AnyTrue); }
-#line 8924 "src/prebuilt/wast-lexer-gen.cc"
+#line 8923 "src/prebuilt/wast-lexer-gen.cc"
yy1739:
yych = *++cursor_;
if (yych == 'l') goto yy1822;
@@ -8963,17 +8962,17 @@ yy1747:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 336 "src/wast-lexer.cc"
+#line 335 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64Extend16S); }
-#line 8969 "src/prebuilt/wast-lexer-gen.cc"
+#line 8968 "src/prebuilt/wast-lexer-gen.cc"
yy1749:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 337 "src/wast-lexer.cc"
+#line 336 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64Extend32S); }
-#line 8977 "src/prebuilt/wast-lexer-gen.cc"
+#line 8976 "src/prebuilt/wast-lexer-gen.cc"
yy1751:
yych = *++cursor_;
if (yych == '3') goto yy1835;
@@ -9015,17 +9014,17 @@ yy1760:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 591 "src/wast-lexer.cc"
+#line 590 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64X2AllTrue); }
-#line 9021 "src/prebuilt/wast-lexer-gen.cc"
+#line 9020 "src/prebuilt/wast-lexer-gen.cc"
yy1762:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 587 "src/wast-lexer.cc"
+#line 586 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64X2AnyTrue); }
-#line 9029 "src/prebuilt/wast-lexer-gen.cc"
+#line 9028 "src/prebuilt/wast-lexer-gen.cc"
yy1764:
yych = *++cursor_;
if (yych == 'l') goto yy1848;
@@ -9051,17 +9050,17 @@ yy1769:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 588 "src/wast-lexer.cc"
+#line 587 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I8X16AllTrue); }
-#line 9057 "src/prebuilt/wast-lexer-gen.cc"
+#line 9056 "src/prebuilt/wast-lexer-gen.cc"
yy1771:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 584 "src/wast-lexer.cc"
+#line 583 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I8X16AnyTrue); }
-#line 9065 "src/prebuilt/wast-lexer-gen.cc"
+#line 9064 "src/prebuilt/wast-lexer-gen.cc"
yy1773:
yych = *++cursor_;
if (yych == 'l') goto yy1853;
@@ -9079,9 +9078,9 @@ yy1776:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 583 "src/wast-lexer.cc"
+#line 582 "src/wast-lexer.cc"
{ RETURN_OPCODE(Ternary, V128BitSelect); }
-#line 9085 "src/prebuilt/wast-lexer-gen.cc"
+#line 9084 "src/prebuilt/wast-lexer-gen.cc"
yy1778:
yych = *++cursor_;
if (yych == 'o') goto yy1856;
@@ -9147,9 +9146,9 @@ yy1792:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 441 "src/wast-lexer.cc"
+#line 440 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F64PromoteF32); }
-#line 9153 "src/prebuilt/wast-lexer-gen.cc"
+#line 9152 "src/prebuilt/wast-lexer-gen.cc"
yy1794:
yych = *++cursor_;
if (yych == '/') goto yy1875;
@@ -9206,9 +9205,9 @@ yy1803:
}
}
yy1804:
-#line 457 "src/wast-lexer.cc"
+#line 456 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicLoad, I32AtomicLoad); }
-#line 9212 "src/prebuilt/wast-lexer-gen.cc"
+#line 9211 "src/prebuilt/wast-lexer-gen.cc"
yy1805:
yych = *++cursor_;
switch (yych) {
@@ -9236,9 +9235,9 @@ yy1809:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 454 "src/wast-lexer.cc"
+#line 453 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicWait, I32AtomicWait); }
-#line 9242 "src/prebuilt/wast-lexer-gen.cc"
+#line 9241 "src/prebuilt/wast-lexer-gen.cc"
yy1811:
yych = *++cursor_;
if (yych == '/') goto yy1895;
@@ -9248,17 +9247,17 @@ yy1812:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 417 "src/wast-lexer.cc"
+#line 416 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32TruncSF32); }
-#line 9254 "src/prebuilt/wast-lexer-gen.cc"
+#line 9253 "src/prebuilt/wast-lexer-gen.cc"
yy1814:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 419 "src/wast-lexer.cc"
+#line 418 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32TruncSF64); }
-#line 9262 "src/prebuilt/wast-lexer-gen.cc"
+#line 9261 "src/prebuilt/wast-lexer-gen.cc"
yy1816:
yych = *++cursor_;
if (yych == '/') goto yy1896;
@@ -9268,17 +9267,17 @@ yy1817:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 421 "src/wast-lexer.cc"
+#line 420 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32TruncUF32); }
-#line 9274 "src/prebuilt/wast-lexer-gen.cc"
+#line 9273 "src/prebuilt/wast-lexer-gen.cc"
yy1819:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 423 "src/wast-lexer.cc"
+#line 422 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32TruncUF64); }
-#line 9282 "src/prebuilt/wast-lexer-gen.cc"
+#line 9281 "src/prebuilt/wast-lexer-gen.cc"
yy1821:
yych = *++cursor_;
if (yych == '/') goto yy1897;
@@ -9321,9 +9320,9 @@ yy1826:
}
}
yy1827:
-#line 458 "src/wast-lexer.cc"
+#line 457 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicLoad, I64AtomicLoad); }
-#line 9327 "src/prebuilt/wast-lexer-gen.cc"
+#line 9326 "src/prebuilt/wast-lexer-gen.cc"
yy1828:
yych = *++cursor_;
switch (yych) {
@@ -9355,9 +9354,9 @@ yy1833:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 455 "src/wast-lexer.cc"
+#line 454 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicWait, I64AtomicWait); }
-#line 9361 "src/prebuilt/wast-lexer-gen.cc"
+#line 9360 "src/prebuilt/wast-lexer-gen.cc"
yy1835:
yych = *++cursor_;
if (yych == '2') goto yy1915;
@@ -9375,17 +9374,17 @@ yy1838:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 418 "src/wast-lexer.cc"
+#line 417 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64TruncSF32); }
-#line 9381 "src/prebuilt/wast-lexer-gen.cc"
+#line 9380 "src/prebuilt/wast-lexer-gen.cc"
yy1840:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 420 "src/wast-lexer.cc"
+#line 419 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64TruncSF64); }
-#line 9389 "src/prebuilt/wast-lexer-gen.cc"
+#line 9388 "src/prebuilt/wast-lexer-gen.cc"
yy1842:
yych = *++cursor_;
if (yych == '/') goto yy1920;
@@ -9395,17 +9394,17 @@ yy1843:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 422 "src/wast-lexer.cc"
+#line 421 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64TruncUF32); }
-#line 9401 "src/prebuilt/wast-lexer-gen.cc"
+#line 9400 "src/prebuilt/wast-lexer-gen.cc"
yy1845:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 424 "src/wast-lexer.cc"
+#line 423 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64TruncUF64); }
-#line 9409 "src/prebuilt/wast-lexer-gen.cc"
+#line 9408 "src/prebuilt/wast-lexer-gen.cc"
yy1847:
yych = *++cursor_;
if (yych == '/') goto yy1921;
@@ -9451,9 +9450,9 @@ yy1857:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 682 "src/wast-lexer.cc"
+#line 681 "src/wast-lexer.cc"
{ RETURN(AssertMalformed); }
-#line 9457 "src/prebuilt/wast-lexer-gen.cc"
+#line 9456 "src/prebuilt/wast-lexer-gen.cc"
yy1859:
yych = *++cursor_;
if (yych == 'i') goto yy1932;
@@ -9612,9 +9611,9 @@ yy1893:
}
}
yy1894:
-#line 464 "src/wast-lexer.cc"
+#line 463 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicStore, I32AtomicStore); }
-#line 9618 "src/prebuilt/wast-lexer-gen.cc"
+#line 9617 "src/prebuilt/wast-lexer-gen.cc"
yy1895:
yych = *++cursor_;
if (yych == 'f') goto yy1981;
@@ -9711,25 +9710,25 @@ yy1913:
}
}
yy1914:
-#line 465 "src/wast-lexer.cc"
+#line 464 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicStore, I64AtomicStore); }
-#line 9717 "src/prebuilt/wast-lexer-gen.cc"
+#line 9716 "src/prebuilt/wast-lexer-gen.cc"
yy1915:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 414 "src/wast-lexer.cc"
+#line 413 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64ExtendSI32); }
-#line 9725 "src/prebuilt/wast-lexer-gen.cc"
+#line 9724 "src/prebuilt/wast-lexer-gen.cc"
yy1917:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 415 "src/wast-lexer.cc"
+#line 414 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64ExtendUI32); }
-#line 9733 "src/prebuilt/wast-lexer-gen.cc"
+#line 9732 "src/prebuilt/wast-lexer-gen.cc"
yy1919:
yych = *++cursor_;
if (yych == 'f') goto yy2006;
@@ -9779,9 +9778,9 @@ yy1930:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 689 "src/wast-lexer.cc"
+#line 688 "src/wast-lexer.cc"
{ RETURN(AssertExhaustion); }
-#line 9785 "src/prebuilt/wast-lexer-gen.cc"
+#line 9784 "src/prebuilt/wast-lexer-gen.cc"
yy1932:
yych = *++cursor_;
if (yych == 't') goto yy2017;
@@ -9795,41 +9794,41 @@ yy1934:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 684 "src/wast-lexer.cc"
+#line 683 "src/wast-lexer.cc"
{ RETURN(AssertUnlinkable); }
-#line 9801 "src/prebuilt/wast-lexer-gen.cc"
+#line 9800 "src/prebuilt/wast-lexer-gen.cc"
yy1936:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 433 "src/wast-lexer.cc"
+#line 432 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F32ConvertSI32); }
-#line 9809 "src/prebuilt/wast-lexer-gen.cc"
+#line 9808 "src/prebuilt/wast-lexer-gen.cc"
yy1938:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 435 "src/wast-lexer.cc"
+#line 434 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F32ConvertSI64); }
-#line 9817 "src/prebuilt/wast-lexer-gen.cc"
+#line 9816 "src/prebuilt/wast-lexer-gen.cc"
yy1940:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 437 "src/wast-lexer.cc"
+#line 436 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F32ConvertUI32); }
-#line 9825 "src/prebuilt/wast-lexer-gen.cc"
+#line 9824 "src/prebuilt/wast-lexer-gen.cc"
yy1942:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 439 "src/wast-lexer.cc"
+#line 438 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F32ConvertUI64); }
-#line 9833 "src/prebuilt/wast-lexer-gen.cc"
+#line 9832 "src/prebuilt/wast-lexer-gen.cc"
yy1944:
yych = *++cursor_;
if (yych == '3') goto yy2019;
@@ -9855,33 +9854,33 @@ yy1949:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 434 "src/wast-lexer.cc"
+#line 433 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F64ConvertSI32); }
-#line 9861 "src/prebuilt/wast-lexer-gen.cc"
+#line 9860 "src/prebuilt/wast-lexer-gen.cc"
yy1951:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 436 "src/wast-lexer.cc"
+#line 435 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F64ConvertSI64); }
-#line 9869 "src/prebuilt/wast-lexer-gen.cc"
+#line 9868 "src/prebuilt/wast-lexer-gen.cc"
yy1953:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 438 "src/wast-lexer.cc"
+#line 437 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F64ConvertUI32); }
-#line 9877 "src/prebuilt/wast-lexer-gen.cc"
+#line 9876 "src/prebuilt/wast-lexer-gen.cc"
yy1955:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 440 "src/wast-lexer.cc"
+#line 439 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F64ConvertUI64); }
-#line 9885 "src/prebuilt/wast-lexer-gen.cc"
+#line 9884 "src/prebuilt/wast-lexer-gen.cc"
yy1957:
yych = *++cursor_;
if (yych == '6') goto yy2026;
@@ -9943,9 +9942,9 @@ yy1971:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 492 "src/wast-lexer.cc"
+#line 491 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmwOr); }
-#line 9949 "src/prebuilt/wast-lexer-gen.cc"
+#line 9948 "src/prebuilt/wast-lexer-gen.cc"
yy1973:
yych = *++cursor_;
if (yych == 'b') goto yy2046;
@@ -9975,9 +9974,9 @@ yy1979:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 466 "src/wast-lexer.cc"
+#line 465 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicStore, I32AtomicStore8); }
-#line 9981 "src/prebuilt/wast-lexer-gen.cc"
+#line 9980 "src/prebuilt/wast-lexer-gen.cc"
yy1981:
yych = *++cursor_;
if (yych == '3') goto yy2055;
@@ -10037,9 +10036,9 @@ yy1994:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 493 "src/wast-lexer.cc"
+#line 492 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmwOr); }
-#line 10043 "src/prebuilt/wast-lexer-gen.cc"
+#line 10042 "src/prebuilt/wast-lexer-gen.cc"
yy1996:
yych = *++cursor_;
if (yych == 'b') goto yy2075;
@@ -10077,9 +10076,9 @@ yy2004:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 468 "src/wast-lexer.cc"
+#line 467 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicStore, I64AtomicStore8); }
-#line 10083 "src/prebuilt/wast-lexer-gen.cc"
+#line 10082 "src/prebuilt/wast-lexer-gen.cc"
yy2006:
yych = *++cursor_;
if (yych == '6') goto yy2087;
@@ -10151,17 +10150,17 @@ yy2022:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 535 "src/wast-lexer.cc"
+#line 534 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, F32X4ExtractLane); }
-#line 10157 "src/prebuilt/wast-lexer-gen.cc"
+#line 10156 "src/prebuilt/wast-lexer-gen.cc"
yy2024:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 541 "src/wast-lexer.cc"
+#line 540 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, F32X4ReplaceLane); }
-#line 10165 "src/prebuilt/wast-lexer-gen.cc"
+#line 10164 "src/prebuilt/wast-lexer-gen.cc"
yy2026:
yych = *++cursor_;
if (yych == '4') goto yy2109;
@@ -10179,17 +10178,17 @@ yy2029:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 536 "src/wast-lexer.cc"
+#line 535 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, F64X2ExtractLane); }
-#line 10185 "src/prebuilt/wast-lexer-gen.cc"
+#line 10184 "src/prebuilt/wast-lexer-gen.cc"
yy2031:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 542 "src/wast-lexer.cc"
+#line 541 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, F64X2ReplaceLane); }
-#line 10193 "src/prebuilt/wast-lexer-gen.cc"
+#line 10192 "src/prebuilt/wast-lexer-gen.cc"
yy2033:
yych = *++cursor_;
if (yych == '_') goto yy2113;
@@ -10203,9 +10202,9 @@ yy2035:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 538 "src/wast-lexer.cc"
+#line 537 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I16X8ReplaceLane); }
-#line 10209 "src/prebuilt/wast-lexer-gen.cc"
+#line 10208 "src/prebuilt/wast-lexer-gen.cc"
yy2037:
yych = *++cursor_;
if (yych == '_') goto yy2115;
@@ -10219,25 +10218,25 @@ yy2039:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 459 "src/wast-lexer.cc"
+#line 458 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicLoad, I32AtomicLoad8U); }
-#line 10225 "src/prebuilt/wast-lexer-gen.cc"
+#line 10224 "src/prebuilt/wast-lexer-gen.cc"
yy2041:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 471 "src/wast-lexer.cc"
+#line 470 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmwAdd); }
-#line 10233 "src/prebuilt/wast-lexer-gen.cc"
+#line 10232 "src/prebuilt/wast-lexer-gen.cc"
yy2043:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 485 "src/wast-lexer.cc"
+#line 484 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmwAnd); }
-#line 10241 "src/prebuilt/wast-lexer-gen.cc"
+#line 10240 "src/prebuilt/wast-lexer-gen.cc"
yy2045:
yych = *++cursor_;
if (yych == 'x') goto yy2118;
@@ -10247,9 +10246,9 @@ yy2046:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 478 "src/wast-lexer.cc"
+#line 477 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmwSub); }
-#line 10253 "src/prebuilt/wast-lexer-gen.cc"
+#line 10252 "src/prebuilt/wast-lexer-gen.cc"
yy2048:
yych = *++cursor_;
if (yych == 'g') goto yy2119;
@@ -10259,9 +10258,9 @@ yy2049:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 499 "src/wast-lexer.cc"
+#line 498 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmwXor); }
-#line 10265 "src/prebuilt/wast-lexer-gen.cc"
+#line 10264 "src/prebuilt/wast-lexer-gen.cc"
yy2051:
yych = *++cursor_;
if (yych == '.') goto yy2121;
@@ -10281,9 +10280,9 @@ yy2053:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 467 "src/wast-lexer.cc"
+#line 466 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicStore, I32AtomicStore16); }
-#line 10287 "src/prebuilt/wast-lexer-gen.cc"
+#line 10286 "src/prebuilt/wast-lexer-gen.cc"
yy2055:
yych = *++cursor_;
if (yych == '2') goto yy2127;
@@ -10309,17 +10308,17 @@ yy2060:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 533 "src/wast-lexer.cc"
+#line 532 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I32X4ExtractLane); }
-#line 10315 "src/prebuilt/wast-lexer-gen.cc"
+#line 10314 "src/prebuilt/wast-lexer-gen.cc"
yy2062:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 539 "src/wast-lexer.cc"
+#line 538 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I32X4ReplaceLane); }
-#line 10323 "src/prebuilt/wast-lexer-gen.cc"
+#line 10322 "src/prebuilt/wast-lexer-gen.cc"
yy2064:
yych = *++cursor_;
if (yych == '4') goto yy2137;
@@ -10341,25 +10340,25 @@ yy2068:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 461 "src/wast-lexer.cc"
+#line 460 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicLoad, I64AtomicLoad8U); }
-#line 10347 "src/prebuilt/wast-lexer-gen.cc"
+#line 10346 "src/prebuilt/wast-lexer-gen.cc"
yy2070:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 472 "src/wast-lexer.cc"
+#line 471 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmwAdd); }
-#line 10355 "src/prebuilt/wast-lexer-gen.cc"
+#line 10354 "src/prebuilt/wast-lexer-gen.cc"
yy2072:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 486 "src/wast-lexer.cc"
+#line 485 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmwAnd); }
-#line 10363 "src/prebuilt/wast-lexer-gen.cc"
+#line 10362 "src/prebuilt/wast-lexer-gen.cc"
yy2074:
yych = *++cursor_;
if (yych == 'x') goto yy2143;
@@ -10369,9 +10368,9 @@ yy2075:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 479 "src/wast-lexer.cc"
+#line 478 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmwSub); }
-#line 10375 "src/prebuilt/wast-lexer-gen.cc"
+#line 10374 "src/prebuilt/wast-lexer-gen.cc"
yy2077:
yych = *++cursor_;
if (yych == 'g') goto yy2144;
@@ -10381,9 +10380,9 @@ yy2078:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 500 "src/wast-lexer.cc"
+#line 499 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmwXor); }
-#line 10387 "src/prebuilt/wast-lexer-gen.cc"
+#line 10386 "src/prebuilt/wast-lexer-gen.cc"
yy2080:
yych = *++cursor_;
if (yych == '.') goto yy2146;
@@ -10407,17 +10406,17 @@ yy2083:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 469 "src/wast-lexer.cc"
+#line 468 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicStore, I64AtomicStore16); }
-#line 10413 "src/prebuilt/wast-lexer-gen.cc"
+#line 10412 "src/prebuilt/wast-lexer-gen.cc"
yy2085:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 470 "src/wast-lexer.cc"
+#line 469 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicStore, I64AtomicStore32); }
-#line 10421 "src/prebuilt/wast-lexer-gen.cc"
+#line 10420 "src/prebuilt/wast-lexer-gen.cc"
yy2087:
yych = *++cursor_;
if (yych == '4') goto yy2153;
@@ -10443,17 +10442,17 @@ yy2092:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 534 "src/wast-lexer.cc"
+#line 533 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I64X2ExtractLane); }
-#line 10449 "src/prebuilt/wast-lexer-gen.cc"
+#line 10448 "src/prebuilt/wast-lexer-gen.cc"
yy2094:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 540 "src/wast-lexer.cc"
+#line 539 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I64X2ReplaceLane); }
-#line 10457 "src/prebuilt/wast-lexer-gen.cc"
+#line 10456 "src/prebuilt/wast-lexer-gen.cc"
yy2096:
yych = *++cursor_;
if (yych == '2') goto yy2163;
@@ -10475,9 +10474,9 @@ yy2100:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 537 "src/wast-lexer.cc"
+#line 536 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I8X16ReplaceLane); }
-#line 10481 "src/prebuilt/wast-lexer-gen.cc"
+#line 10480 "src/prebuilt/wast-lexer-gen.cc"
yy2102:
yych = *++cursor_;
if (yych == '_') goto yy2167;
@@ -10495,9 +10494,9 @@ yy2105:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 443 "src/wast-lexer.cc"
+#line 442 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F32ReinterpretI32); }
-#line 10501 "src/prebuilt/wast-lexer-gen.cc"
+#line 10500 "src/prebuilt/wast-lexer-gen.cc"
yy2107:
yych = *++cursor_;
if (yych == 'x') goto yy2170;
@@ -10511,9 +10510,9 @@ yy2109:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 445 "src/wast-lexer.cc"
+#line 444 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, F64ReinterpretI64); }
-#line 10517 "src/prebuilt/wast-lexer-gen.cc"
+#line 10516 "src/prebuilt/wast-lexer-gen.cc"
yy2111:
yych = *++cursor_;
if (yych == 'x') goto yy2172;
@@ -10542,9 +10541,9 @@ yy2116:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 460 "src/wast-lexer.cc"
+#line 459 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicLoad, I32AtomicLoad16U); }
-#line 10548 "src/prebuilt/wast-lexer-gen.cc"
+#line 10547 "src/prebuilt/wast-lexer-gen.cc"
yy2118:
yych = *++cursor_;
if (yych == 'c') goto yy2186;
@@ -10554,9 +10553,9 @@ yy2119:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 506 "src/wast-lexer.cc"
+#line 505 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmwXchg); }
-#line 10560 "src/prebuilt/wast-lexer-gen.cc"
+#line 10559 "src/prebuilt/wast-lexer-gen.cc"
yy2121:
yych = *++cursor_;
switch (yych) {
@@ -10594,41 +10593,41 @@ yy2127:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 444 "src/wast-lexer.cc"
+#line 443 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32ReinterpretF32); }
-#line 10600 "src/prebuilt/wast-lexer-gen.cc"
+#line 10599 "src/prebuilt/wast-lexer-gen.cc"
yy2129:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 425 "src/wast-lexer.cc"
+#line 424 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32TruncSSatF32); }
-#line 10608 "src/prebuilt/wast-lexer-gen.cc"
+#line 10607 "src/prebuilt/wast-lexer-gen.cc"
yy2131:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 427 "src/wast-lexer.cc"
+#line 426 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32TruncSSatF64); }
-#line 10616 "src/prebuilt/wast-lexer-gen.cc"
+#line 10615 "src/prebuilt/wast-lexer-gen.cc"
yy2133:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 429 "src/wast-lexer.cc"
+#line 428 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32TruncUSatF32); }
-#line 10624 "src/prebuilt/wast-lexer-gen.cc"
+#line 10623 "src/prebuilt/wast-lexer-gen.cc"
yy2135:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 431 "src/wast-lexer.cc"
+#line 430 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I32TruncUSatF64); }
-#line 10632 "src/prebuilt/wast-lexer-gen.cc"
+#line 10631 "src/prebuilt/wast-lexer-gen.cc"
yy2137:
yych = *++cursor_;
if (yych == ':') goto yy2200;
@@ -10642,17 +10641,17 @@ yy2139:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 462 "src/wast-lexer.cc"
+#line 461 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicLoad, I64AtomicLoad16U); }
-#line 10648 "src/prebuilt/wast-lexer-gen.cc"
+#line 10647 "src/prebuilt/wast-lexer-gen.cc"
yy2141:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 463 "src/wast-lexer.cc"
+#line 462 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicLoad, I64AtomicLoad32U); }
-#line 10656 "src/prebuilt/wast-lexer-gen.cc"
+#line 10655 "src/prebuilt/wast-lexer-gen.cc"
yy2143:
yych = *++cursor_;
if (yych == 'c') goto yy2202;
@@ -10662,9 +10661,9 @@ yy2144:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 507 "src/wast-lexer.cc"
+#line 506 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmwXchg); }
-#line 10668 "src/prebuilt/wast-lexer-gen.cc"
+#line 10667 "src/prebuilt/wast-lexer-gen.cc"
yy2146:
yych = *++cursor_;
switch (yych) {
@@ -10712,41 +10711,41 @@ yy2153:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 446 "src/wast-lexer.cc"
+#line 445 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64ReinterpretF64); }
-#line 10718 "src/prebuilt/wast-lexer-gen.cc"
+#line 10717 "src/prebuilt/wast-lexer-gen.cc"
yy2155:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 426 "src/wast-lexer.cc"
+#line 425 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64TruncSSatF32); }
-#line 10726 "src/prebuilt/wast-lexer-gen.cc"
+#line 10725 "src/prebuilt/wast-lexer-gen.cc"
yy2157:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 428 "src/wast-lexer.cc"
+#line 427 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64TruncSSatF64); }
-#line 10734 "src/prebuilt/wast-lexer-gen.cc"
+#line 10733 "src/prebuilt/wast-lexer-gen.cc"
yy2159:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 430 "src/wast-lexer.cc"
+#line 429 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64TruncUSatF32); }
-#line 10742 "src/prebuilt/wast-lexer-gen.cc"
+#line 10741 "src/prebuilt/wast-lexer-gen.cc"
yy2161:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 432 "src/wast-lexer.cc"
+#line 431 "src/wast-lexer.cc"
{ RETURN_OPCODE(Convert, I64TruncUSatF64); }
-#line 10750 "src/prebuilt/wast-lexer-gen.cc"
+#line 10749 "src/prebuilt/wast-lexer-gen.cc"
yy2163:
yych = *++cursor_;
if (yych == ':') goto yy2221;
@@ -10799,49 +10798,49 @@ yy2174:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 561 "src/wast-lexer.cc"
+#line 560 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8AddSaturateS); }
-#line 10805 "src/prebuilt/wast-lexer-gen.cc"
+#line 10804 "src/prebuilt/wast-lexer-gen.cc"
yy2176:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 562 "src/wast-lexer.cc"
+#line 561 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8AddSaturateU); }
-#line 10813 "src/prebuilt/wast-lexer-gen.cc"
+#line 10812 "src/prebuilt/wast-lexer-gen.cc"
yy2178:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 531 "src/wast-lexer.cc"
+#line 530 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I16X8ExtractLaneS); }
-#line 10821 "src/prebuilt/wast-lexer-gen.cc"
+#line 10820 "src/prebuilt/wast-lexer-gen.cc"
yy2180:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 532 "src/wast-lexer.cc"
+#line 531 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I16X8ExtractLaneU); }
-#line 10829 "src/prebuilt/wast-lexer-gen.cc"
+#line 10828 "src/prebuilt/wast-lexer-gen.cc"
yy2182:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 565 "src/wast-lexer.cc"
+#line 564 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8SubSaturateS); }
-#line 10837 "src/prebuilt/wast-lexer-gen.cc"
+#line 10836 "src/prebuilt/wast-lexer-gen.cc"
yy2184:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 566 "src/wast-lexer.cc"
+#line 565 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I16X8SubSaturateU); }
-#line 10845 "src/prebuilt/wast-lexer-gen.cc"
+#line 10844 "src/prebuilt/wast-lexer-gen.cc"
yy2186:
yych = *++cursor_;
if (yych == 'h') goto yy2245;
@@ -10885,9 +10884,9 @@ yy2195:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 494 "src/wast-lexer.cc"
+#line 493 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw8UOr); }
-#line 10891 "src/prebuilt/wast-lexer-gen.cc"
+#line 10890 "src/prebuilt/wast-lexer-gen.cc"
yy2197:
yych = *++cursor_;
if (yych == 'b') goto yy2259;
@@ -10973,9 +10972,9 @@ yy2216:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 496 "src/wast-lexer.cc"
+#line 495 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw8UOr); }
-#line 10979 "src/prebuilt/wast-lexer-gen.cc"
+#line 10978 "src/prebuilt/wast-lexer-gen.cc"
yy2218:
yych = *++cursor_;
if (yych == 'b') goto yy2288;
@@ -11001,49 +11000,49 @@ yy2223:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 559 "src/wast-lexer.cc"
+#line 558 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16AddSaturateS); }
-#line 11007 "src/prebuilt/wast-lexer-gen.cc"
+#line 11006 "src/prebuilt/wast-lexer-gen.cc"
yy2225:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 560 "src/wast-lexer.cc"
+#line 559 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16AddSaturateU); }
-#line 11015 "src/prebuilt/wast-lexer-gen.cc"
+#line 11014 "src/prebuilt/wast-lexer-gen.cc"
yy2227:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 529 "src/wast-lexer.cc"
+#line 528 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I8X16ExtractLaneS); }
-#line 11023 "src/prebuilt/wast-lexer-gen.cc"
+#line 11022 "src/prebuilt/wast-lexer-gen.cc"
yy2229:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 530 "src/wast-lexer.cc"
+#line 529 "src/wast-lexer.cc"
{ RETURN_OPCODE(SimdLaneOp, I8X16ExtractLaneU); }
-#line 11031 "src/prebuilt/wast-lexer-gen.cc"
+#line 11030 "src/prebuilt/wast-lexer-gen.cc"
yy2231:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 563 "src/wast-lexer.cc"
+#line 562 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16SubSaturateS); }
-#line 11039 "src/prebuilt/wast-lexer-gen.cc"
+#line 11038 "src/prebuilt/wast-lexer-gen.cc"
yy2233:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 564 "src/wast-lexer.cc"
+#line 563 "src/wast-lexer.cc"
{ RETURN_OPCODE(Binary, I8X16SubSaturateU); }
-#line 11047 "src/prebuilt/wast-lexer-gen.cc"
+#line 11046 "src/prebuilt/wast-lexer-gen.cc"
yy2235:
yych = *++cursor_;
if (yych == 't') goto yy2295;
@@ -11057,33 +11056,33 @@ yy2237:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 652 "src/wast-lexer.cc"
+#line 651 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32X4ConvertSI32X4); }
-#line 11063 "src/prebuilt/wast-lexer-gen.cc"
+#line 11062 "src/prebuilt/wast-lexer-gen.cc"
yy2239:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 653 "src/wast-lexer.cc"
+#line 652 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F32X4ConvertUI32X4); }
-#line 11071 "src/prebuilt/wast-lexer-gen.cc"
+#line 11070 "src/prebuilt/wast-lexer-gen.cc"
yy2241:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 654 "src/wast-lexer.cc"
+#line 653 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64X2ConvertSI64X2); }
-#line 11079 "src/prebuilt/wast-lexer-gen.cc"
+#line 11078 "src/prebuilt/wast-lexer-gen.cc"
yy2243:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 655 "src/wast-lexer.cc"
+#line 654 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, F64X2ConvertUI64X2); }
-#line 11087 "src/prebuilt/wast-lexer-gen.cc"
+#line 11086 "src/prebuilt/wast-lexer-gen.cc"
yy2245:
yych = *++cursor_;
if (yych == 'g') goto yy2297;
@@ -11105,9 +11104,9 @@ yy2249:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 495 "src/wast-lexer.cc"
+#line 494 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw16UOr); }
-#line 11111 "src/prebuilt/wast-lexer-gen.cc"
+#line 11110 "src/prebuilt/wast-lexer-gen.cc"
yy2251:
yych = *++cursor_;
if (yych == 'b') goto yy2304;
@@ -11125,17 +11124,17 @@ yy2254:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 473 "src/wast-lexer.cc"
+#line 472 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw8UAdd); }
-#line 11131 "src/prebuilt/wast-lexer-gen.cc"
+#line 11130 "src/prebuilt/wast-lexer-gen.cc"
yy2256:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 487 "src/wast-lexer.cc"
+#line 486 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw8UAnd); }
-#line 11139 "src/prebuilt/wast-lexer-gen.cc"
+#line 11138 "src/prebuilt/wast-lexer-gen.cc"
yy2258:
yych = *++cursor_;
if (yych == 'x') goto yy2309;
@@ -11145,9 +11144,9 @@ yy2259:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 480 "src/wast-lexer.cc"
+#line 479 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw8USub); }
-#line 11151 "src/prebuilt/wast-lexer-gen.cc"
+#line 11150 "src/prebuilt/wast-lexer-gen.cc"
yy2261:
yych = *++cursor_;
if (yych == 'g') goto yy2310;
@@ -11157,9 +11156,9 @@ yy2262:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 501 "src/wast-lexer.cc"
+#line 500 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw8UXor); }
-#line 11163 "src/prebuilt/wast-lexer-gen.cc"
+#line 11162 "src/prebuilt/wast-lexer-gen.cc"
yy2264:
yych = *++cursor_;
if (yych == 'a') goto yy2312;
@@ -11189,9 +11188,9 @@ yy2270:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 497 "src/wast-lexer.cc"
+#line 496 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw16UOr); }
-#line 11195 "src/prebuilt/wast-lexer-gen.cc"
+#line 11194 "src/prebuilt/wast-lexer-gen.cc"
yy2272:
yych = *++cursor_;
if (yych == 'b') goto yy2321;
@@ -11221,9 +11220,9 @@ yy2278:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 498 "src/wast-lexer.cc"
+#line 497 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw32UOr); }
-#line 11227 "src/prebuilt/wast-lexer-gen.cc"
+#line 11226 "src/prebuilt/wast-lexer-gen.cc"
yy2280:
yych = *++cursor_;
if (yych == 'b') goto yy2331;
@@ -11241,17 +11240,17 @@ yy2283:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 475 "src/wast-lexer.cc"
+#line 474 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw8UAdd); }
-#line 11247 "src/prebuilt/wast-lexer-gen.cc"
+#line 11246 "src/prebuilt/wast-lexer-gen.cc"
yy2285:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 489 "src/wast-lexer.cc"
+#line 488 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw8UAnd); }
-#line 11255 "src/prebuilt/wast-lexer-gen.cc"
+#line 11254 "src/prebuilt/wast-lexer-gen.cc"
yy2287:
yych = *++cursor_;
if (yych == 'x') goto yy2336;
@@ -11261,9 +11260,9 @@ yy2288:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 482 "src/wast-lexer.cc"
+#line 481 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw8USub); }
-#line 11267 "src/prebuilt/wast-lexer-gen.cc"
+#line 11266 "src/prebuilt/wast-lexer-gen.cc"
yy2290:
yych = *++cursor_;
if (yych == 'g') goto yy2337;
@@ -11273,9 +11272,9 @@ yy2291:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 503 "src/wast-lexer.cc"
+#line 502 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw8UXor); }
-#line 11279 "src/prebuilt/wast-lexer-gen.cc"
+#line 11278 "src/prebuilt/wast-lexer-gen.cc"
yy2293:
yych = *++cursor_;
if (yych == 'a') goto yy2339;
@@ -11297,25 +11296,25 @@ yy2297:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 513 "src/wast-lexer.cc"
+#line 512 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmwCmpxchg, I32AtomicRmwCmpxchg); }
-#line 11303 "src/prebuilt/wast-lexer-gen.cc"
+#line 11302 "src/prebuilt/wast-lexer-gen.cc"
yy2299:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 474 "src/wast-lexer.cc"
+#line 473 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw16UAdd); }
-#line 11311 "src/prebuilt/wast-lexer-gen.cc"
+#line 11310 "src/prebuilt/wast-lexer-gen.cc"
yy2301:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 488 "src/wast-lexer.cc"
+#line 487 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw16UAnd); }
-#line 11319 "src/prebuilt/wast-lexer-gen.cc"
+#line 11318 "src/prebuilt/wast-lexer-gen.cc"
yy2303:
yych = *++cursor_;
if (yych == 'x') goto yy2343;
@@ -11325,9 +11324,9 @@ yy2304:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 481 "src/wast-lexer.cc"
+#line 480 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw16USub); }
-#line 11331 "src/prebuilt/wast-lexer-gen.cc"
+#line 11330 "src/prebuilt/wast-lexer-gen.cc"
yy2306:
yych = *++cursor_;
if (yych == 'g') goto yy2344;
@@ -11337,9 +11336,9 @@ yy2307:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 502 "src/wast-lexer.cc"
+#line 501 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw16UXor); }
-#line 11343 "src/prebuilt/wast-lexer-gen.cc"
+#line 11342 "src/prebuilt/wast-lexer-gen.cc"
yy2309:
yych = *++cursor_;
if (yych == 'c') goto yy2346;
@@ -11349,9 +11348,9 @@ yy2310:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 508 "src/wast-lexer.cc"
+#line 507 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw8UXchg); }
-#line 11355 "src/prebuilt/wast-lexer-gen.cc"
+#line 11354 "src/prebuilt/wast-lexer-gen.cc"
yy2312:
yych = *++cursor_;
if (yych == 't') goto yy2347;
@@ -11365,25 +11364,25 @@ yy2314:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 514 "src/wast-lexer.cc"
+#line 513 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmwCmpxchg, I64AtomicRmwCmpxchg); }
-#line 11371 "src/prebuilt/wast-lexer-gen.cc"
+#line 11370 "src/prebuilt/wast-lexer-gen.cc"
yy2316:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 476 "src/wast-lexer.cc"
+#line 475 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw16UAdd); }
-#line 11379 "src/prebuilt/wast-lexer-gen.cc"
+#line 11378 "src/prebuilt/wast-lexer-gen.cc"
yy2318:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 490 "src/wast-lexer.cc"
+#line 489 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw16UAnd); }
-#line 11387 "src/prebuilt/wast-lexer-gen.cc"
+#line 11386 "src/prebuilt/wast-lexer-gen.cc"
yy2320:
yych = *++cursor_;
if (yych == 'x') goto yy2351;
@@ -11393,9 +11392,9 @@ yy2321:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 483 "src/wast-lexer.cc"
+#line 482 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw16USub); }
-#line 11399 "src/prebuilt/wast-lexer-gen.cc"
+#line 11398 "src/prebuilt/wast-lexer-gen.cc"
yy2323:
yych = *++cursor_;
if (yych == 'g') goto yy2352;
@@ -11405,25 +11404,25 @@ yy2324:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 504 "src/wast-lexer.cc"
+#line 503 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw16UXor); }
-#line 11411 "src/prebuilt/wast-lexer-gen.cc"
+#line 11410 "src/prebuilt/wast-lexer-gen.cc"
yy2326:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 477 "src/wast-lexer.cc"
+#line 476 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw32UAdd); }
-#line 11419 "src/prebuilt/wast-lexer-gen.cc"
+#line 11418 "src/prebuilt/wast-lexer-gen.cc"
yy2328:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 491 "src/wast-lexer.cc"
+#line 490 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw32UAnd); }
-#line 11427 "src/prebuilt/wast-lexer-gen.cc"
+#line 11426 "src/prebuilt/wast-lexer-gen.cc"
yy2330:
yych = *++cursor_;
if (yych == 'x') goto yy2354;
@@ -11433,9 +11432,9 @@ yy2331:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 484 "src/wast-lexer.cc"
+#line 483 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw32USub); }
-#line 11439 "src/prebuilt/wast-lexer-gen.cc"
+#line 11438 "src/prebuilt/wast-lexer-gen.cc"
yy2333:
yych = *++cursor_;
if (yych == 'g') goto yy2355;
@@ -11445,9 +11444,9 @@ yy2334:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 505 "src/wast-lexer.cc"
+#line 504 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw32UXor); }
-#line 11451 "src/prebuilt/wast-lexer-gen.cc"
+#line 11450 "src/prebuilt/wast-lexer-gen.cc"
yy2336:
yych = *++cursor_;
if (yych == 'c') goto yy2357;
@@ -11457,9 +11456,9 @@ yy2337:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 510 "src/wast-lexer.cc"
+#line 509 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw8UXchg); }
-#line 11463 "src/prebuilt/wast-lexer-gen.cc"
+#line 11462 "src/prebuilt/wast-lexer-gen.cc"
yy2339:
yych = *++cursor_;
if (yych == 't') goto yy2358;
@@ -11485,9 +11484,9 @@ yy2344:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 509 "src/wast-lexer.cc"
+#line 508 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I32AtomicRmw16UXchg); }
-#line 11491 "src/prebuilt/wast-lexer-gen.cc"
+#line 11490 "src/prebuilt/wast-lexer-gen.cc"
yy2346:
yych = *++cursor_;
if (yych == 'h') goto yy2365;
@@ -11497,17 +11496,17 @@ yy2347:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 656 "src/wast-lexer.cc"
+#line 655 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32X4TruncSF32X4Sat); }
-#line 11503 "src/prebuilt/wast-lexer-gen.cc"
+#line 11502 "src/prebuilt/wast-lexer-gen.cc"
yy2349:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 657 "src/wast-lexer.cc"
+#line 656 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I32X4TruncUF32X4Sat); }
-#line 11511 "src/prebuilt/wast-lexer-gen.cc"
+#line 11510 "src/prebuilt/wast-lexer-gen.cc"
yy2351:
yych = *++cursor_;
if (yych == 'c') goto yy2366;
@@ -11517,9 +11516,9 @@ yy2352:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 511 "src/wast-lexer.cc"
+#line 510 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw16UXchg); }
-#line 11523 "src/prebuilt/wast-lexer-gen.cc"
+#line 11522 "src/prebuilt/wast-lexer-gen.cc"
yy2354:
yych = *++cursor_;
if (yych == 'c') goto yy2367;
@@ -11529,9 +11528,9 @@ yy2355:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 512 "src/wast-lexer.cc"
+#line 511 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmw, I64AtomicRmw32UXchg); }
-#line 11535 "src/prebuilt/wast-lexer-gen.cc"
+#line 11534 "src/prebuilt/wast-lexer-gen.cc"
yy2357:
yych = *++cursor_;
if (yych == 'h') goto yy2368;
@@ -11541,17 +11540,17 @@ yy2358:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 658 "src/wast-lexer.cc"
+#line 657 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64X2TruncSF64X2Sat); }
-#line 11547 "src/prebuilt/wast-lexer-gen.cc"
+#line 11546 "src/prebuilt/wast-lexer-gen.cc"
yy2360:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 659 "src/wast-lexer.cc"
+#line 658 "src/wast-lexer.cc"
{ RETURN_OPCODE(Unary, I64X2TruncUF64X2Sat); }
-#line 11555 "src/prebuilt/wast-lexer-gen.cc"
+#line 11554 "src/prebuilt/wast-lexer-gen.cc"
yy2362:
yych = *++cursor_;
if (yych == '_') goto yy2369;
@@ -11597,9 +11596,9 @@ yy2372:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 515 "src/wast-lexer.cc"
+#line 514 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmwCmpxchg, I32AtomicRmw8UCmpxchg); }
-#line 11603 "src/prebuilt/wast-lexer-gen.cc"
+#line 11602 "src/prebuilt/wast-lexer-gen.cc"
yy2374:
yych = *++cursor_;
if (yych == 'g') goto yy2382;
@@ -11613,9 +11612,9 @@ yy2376:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 517 "src/wast-lexer.cc"
+#line 516 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmwCmpxchg, I64AtomicRmw8UCmpxchg); }
-#line 11619 "src/prebuilt/wast-lexer-gen.cc"
+#line 11618 "src/prebuilt/wast-lexer-gen.cc"
yy2378:
yych = *++cursor_;
if (yych == 'a') goto yy2386;
@@ -11629,25 +11628,25 @@ yy2380:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 516 "src/wast-lexer.cc"
+#line 515 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmwCmpxchg, I32AtomicRmw16UCmpxchg); }
-#line 11635 "src/prebuilt/wast-lexer-gen.cc"
+#line 11634 "src/prebuilt/wast-lexer-gen.cc"
yy2382:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 518 "src/wast-lexer.cc"
+#line 517 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmwCmpxchg, I64AtomicRmw16UCmpxchg); }
-#line 11643 "src/prebuilt/wast-lexer-gen.cc"
+#line 11642 "src/prebuilt/wast-lexer-gen.cc"
yy2384:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 519 "src/wast-lexer.cc"
+#line 518 "src/wast-lexer.cc"
{ RETURN_OPCODE(AtomicRmwCmpxchg, I64AtomicRmw32UCmpxchg); }
-#line 11651 "src/prebuilt/wast-lexer-gen.cc"
+#line 11650 "src/prebuilt/wast-lexer-gen.cc"
yy2386:
yych = *++cursor_;
if (yych == 'n') goto yy2389;
@@ -11657,17 +11656,17 @@ yy2387:
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 686 "src/wast-lexer.cc"
+#line 685 "src/wast-lexer.cc"
{ RETURN(AssertReturnCanonicalNan); }
-#line 11663 "src/prebuilt/wast-lexer-gen.cc"
+#line 11662 "src/prebuilt/wast-lexer-gen.cc"
yy2389:
yych = *++cursor_;
if (yybm[0+yych] & 8) {
goto yy10;
}
-#line 687 "src/wast-lexer.cc"
+#line 686 "src/wast-lexer.cc"
{ RETURN(AssertReturnArithmeticNan); }
-#line 11671 "src/prebuilt/wast-lexer-gen.cc"
+#line 11670 "src/prebuilt/wast-lexer-gen.cc"
}
/* *********************************** */
YYCOND_BAD_TEXT:
@@ -11697,29 +11696,29 @@ YYCOND_BAD_TEXT:
}
++cursor_;
yy2394:
-#line 253 "src/wast-lexer.cc"
+#line 252 "src/wast-lexer.cc"
{ ERROR("illegal character in string");
continue; }
-#line 11704 "src/prebuilt/wast-lexer-gen.cc"
+#line 11703 "src/prebuilt/wast-lexer-gen.cc"
yy2395:
++cursor_;
BEGIN(YYCOND_i);
-#line 246 "src/wast-lexer.cc"
+#line 245 "src/wast-lexer.cc"
{ ERROR("newline in string");
NEWLINE;
continue; }
-#line 11712 "src/prebuilt/wast-lexer-gen.cc"
+#line 11711 "src/prebuilt/wast-lexer-gen.cc"
yy2397:
++cursor_;
-#line 245 "src/wast-lexer.cc"
+#line 244 "src/wast-lexer.cc"
{ continue; }
-#line 11717 "src/prebuilt/wast-lexer-gen.cc"
+#line 11716 "src/prebuilt/wast-lexer-gen.cc"
yy2399:
++cursor_;
BEGIN(YYCOND_i);
-#line 252 "src/wast-lexer.cc"
+#line 251 "src/wast-lexer.cc"
{ RETURN_TEXT(Text); }
-#line 11723 "src/prebuilt/wast-lexer-gen.cc"
+#line 11722 "src/prebuilt/wast-lexer-gen.cc"
yy2401:
yyaccept = 0;
yych = *(marker_ = ++cursor_);
@@ -11771,9 +11770,9 @@ yy2401:
yy2402:
++cursor_;
yy2403:
-#line 255 "src/wast-lexer.cc"
+#line 254 "src/wast-lexer.cc"
{ MAYBE_MALFORMED_UTF8(" in string"); }
-#line 11777 "src/prebuilt/wast-lexer-gen.cc"
+#line 11776 "src/prebuilt/wast-lexer-gen.cc"
yy2404:
yych = *++cursor_;
if (yych <= 0x7F) goto yy2403;
@@ -11812,11 +11811,11 @@ yy2409:
yy2410:
++cursor_;
yy2411:
-#line 249 "src/wast-lexer.cc"
+#line 248 "src/wast-lexer.cc"
{ ERROR("bad escape \"%.*s\"",
static_cast<int>(yyleng), yytext);
continue; }
-#line 11820 "src/prebuilt/wast-lexer-gen.cc"
+#line 11819 "src/prebuilt/wast-lexer-gen.cc"
yy2412:
yych = *++cursor_;
if (yych <= '@') {
@@ -11951,21 +11950,21 @@ yy2424:
if (yych <= 0xF4) goto yy2443;
}
yy2426:
-#line 700 "src/wast-lexer.cc"
+#line 699 "src/wast-lexer.cc"
{ continue; }
-#line 11957 "src/prebuilt/wast-lexer-gen.cc"
+#line 11956 "src/prebuilt/wast-lexer-gen.cc"
yy2427:
++cursor_;
BEGIN(YYCOND_i);
-#line 699 "src/wast-lexer.cc"
+#line 698 "src/wast-lexer.cc"
{ NEWLINE; continue; }
-#line 11963 "src/prebuilt/wast-lexer-gen.cc"
+#line 11962 "src/prebuilt/wast-lexer-gen.cc"
yy2429:
++cursor_;
yy2430:
-#line 714 "src/wast-lexer.cc"
+#line 713 "src/wast-lexer.cc"
{ MAYBE_MALFORMED_UTF8(""); }
-#line 11969 "src/prebuilt/wast-lexer-gen.cc"
+#line 11968 "src/prebuilt/wast-lexer-gen.cc"
yy2431:
yych = *++cursor_;
if (yych <= 0x7F) goto yy2430;
@@ -12077,14 +12076,14 @@ YYCOND_BLOCK_COMMENT:
yy2446:
++cursor_;
yy2447:
-#line 708 "src/wast-lexer.cc"
+#line 707 "src/wast-lexer.cc"
{ continue; }
-#line 12083 "src/prebuilt/wast-lexer-gen.cc"
+#line 12082 "src/prebuilt/wast-lexer-gen.cc"
yy2448:
++cursor_;
-#line 707 "src/wast-lexer.cc"
+#line 706 "src/wast-lexer.cc"
{ NEWLINE; continue; }
-#line 12088 "src/prebuilt/wast-lexer-gen.cc"
+#line 12087 "src/prebuilt/wast-lexer-gen.cc"
yy2450:
yych = *++cursor_;
if (yych == ';') goto yy2460;
@@ -12096,9 +12095,9 @@ yy2451:
yy2452:
++cursor_;
yy2453:
-#line 709 "src/wast-lexer.cc"
+#line 708 "src/wast-lexer.cc"
{ MAYBE_MALFORMED_UTF8(" in block comment"); }
-#line 12102 "src/prebuilt/wast-lexer-gen.cc"
+#line 12101 "src/prebuilt/wast-lexer-gen.cc"
yy2454:
yych = *++cursor_;
if (yych <= 0x7F) goto yy2453;
@@ -12131,17 +12130,17 @@ yy2459:
goto yy2453;
yy2460:
++cursor_;
-#line 702 "src/wast-lexer.cc"
+#line 701 "src/wast-lexer.cc"
{ COMMENT_NESTING++; continue; }
-#line 12137 "src/prebuilt/wast-lexer-gen.cc"
+#line 12136 "src/prebuilt/wast-lexer-gen.cc"
yy2462:
++cursor_;
-#line 703 "src/wast-lexer.cc"
+#line 702 "src/wast-lexer.cc"
{ if (--COMMENT_NESTING == 0) {
BEGIN(YYCOND_i);
}
continue; }
-#line 12145 "src/prebuilt/wast-lexer-gen.cc"
+#line 12144 "src/prebuilt/wast-lexer-gen.cc"
yy2464:
yych = *++cursor_;
if (yych <= 0x7F) goto yy2465;
@@ -12155,7 +12154,7 @@ yy2466:
if (yych <= 0xBF) goto yy2464;
goto yy2465;
}
-#line 715 "src/wast-lexer.cc"
+#line 714 "src/wast-lexer.cc"
}
}
diff --git a/src/resolve-names.cc b/src/resolve-names.cc
index dbc35b4f..c424001f 100644
--- a/src/resolve-names.cc
+++ b/src/resolve-names.cc
@@ -20,7 +20,6 @@
#include <cstdio>
#include "src/cast.h"
-#include "src/error-handler.h"
#include "src/expr-visitor.h"
#include "src/ir.h"
#include "src/wast-lexer.h"
@@ -31,7 +30,7 @@ namespace {
class NameResolver : public ExprVisitor::DelegateNop {
public:
- NameResolver(Script* script, ErrorHandler* error_handler);
+ NameResolver(Script* script, Errors* errors);
Result VisitModule(Module* module);
Result VisitScript(Script* script);
@@ -81,7 +80,7 @@ class NameResolver : public ExprVisitor::DelegateNop {
void VisitScriptModule(ScriptModule* script_module);
void VisitCommand(Command* command);
- ErrorHandler* error_handler_ = nullptr;
+ Errors* errors_ = nullptr;
Script* script_ = nullptr;
Module* current_module_ = nullptr;
Func* current_func_ = nullptr;
@@ -90,21 +89,19 @@ class NameResolver : public ExprVisitor::DelegateNop {
Result result_ = Result::Ok;
};
-NameResolver::NameResolver(Script* script, ErrorHandler* error_handler)
- : error_handler_(error_handler),
+NameResolver::NameResolver(Script* script, Errors* errors)
+ : errors_(errors),
script_(script),
visitor_(this) {}
} // end anonymous namespace
void WABT_PRINTF_FORMAT(3, 4) NameResolver::PrintError(const Location* loc,
- const char* fmt,
+ const char* format,
...) {
result_ = Result::Error;
- va_list args;
- va_start(args, fmt);
- error_handler_->OnError(ErrorLevel::Error, *loc, fmt, args);
- va_end(args);
+ WABT_SNPRINTF_ALLOCA(buffer, length, format);
+ errors_->emplace_back(ErrorLevel::Error, *loc, buffer);
}
void NameResolver::PushLabel(const std::string& label) {
@@ -419,8 +416,8 @@ void NameResolver::VisitCommand(Command* command) {
/* The module may be invalid because the names cannot be resolved; we
* don't want to print errors or fail if that's the case, but we still
* should try to resolve names when possible. */
- ErrorHandlerNop new_error_handler;
- NameResolver new_resolver(script_, &new_error_handler);
+ Errors errors;
+ NameResolver new_resolver(script_, &errors);
new_resolver.VisitScriptModule(assert_invalid_command->module.get());
break;
}
@@ -442,13 +439,13 @@ Result NameResolver::VisitScript(Script* script) {
return result_;
}
-Result ResolveNamesModule(Module* module, ErrorHandler* error_handler) {
- NameResolver resolver(nullptr, error_handler);
+Result ResolveNamesModule(Module* module, Errors* errors) {
+ NameResolver resolver(nullptr, errors);
return resolver.VisitModule(module);
}
-Result ResolveNamesScript(Script* script, ErrorHandler* error_handler) {
- NameResolver resolver(script, error_handler);
+Result ResolveNamesScript(Script* script, Errors* errors) {
+ NameResolver resolver(script, errors);
return resolver.VisitScript(script);
}
diff --git a/src/resolve-names.h b/src/resolve-names.h
index 88787e56..04f2115c 100644
--- a/src/resolve-names.h
+++ b/src/resolve-names.h
@@ -18,15 +18,15 @@
#define WABT_RESOLVE_NAMES_H_
#include "src/common.h"
+#include "src/error.h"
namespace wabt {
struct Module;
struct Script;
-class ErrorHandler;
-Result ResolveNamesModule(Module*, ErrorHandler*);
-Result ResolveNamesScript(Script*, ErrorHandler*);
+Result ResolveNamesModule(Module*, Errors*);
+Result ResolveNamesScript(Script*, Errors*);
} // namespace wabt
diff --git a/src/test-interp.cc b/src/test-interp.cc
index 98c46b20..0928ef03 100644
--- a/src/test-interp.cc
+++ b/src/test-interp.cc
@@ -25,7 +25,6 @@
#include "src/binary-reader.h"
#include "src/binary-reader-interp.h"
#include "src/cast.h"
-#include "src/error-handler.h"
#include "src/interp.h"
#include "src/make-unique.h"
@@ -51,11 +50,11 @@ class HostTrapTest : public ::testing::Test {
interp::ExecResult LoadModuleAndRunStartFunction(
const std::vector<uint8_t>& data) {
- ErrorHandlerFile error_handler(Location::Type::Binary);
+ Errors errors;
interp::DefinedModule* module = nullptr;
ReadBinaryOptions options;
Result result = ReadBinaryInterp(&env_, data.data(), data.size(), options,
- &error_handler, &module);
+ &errors, &module);
EXPECT_EQ(Result::Ok, result);
if (result == Result::Ok) {
@@ -127,10 +126,10 @@ class HostMemoryTest : public ::testing::Test {
}
Result LoadModule(const std::vector<uint8_t>& data) {
- ErrorHandlerFile error_handler(Location::Type::Binary);
+ Errors errors;
ReadBinaryOptions options;
- return ReadBinaryInterp(&env_, data.data(), data.size(), options,
- &error_handler, &module_);
+ return ReadBinaryInterp(&env_, data.data(), data.size(), options, &errors,
+ &module_);
}
std::string string_data;
diff --git a/src/test-wast-parser.cc b/src/test-wast-parser.cc
index 05ef7bfe..f51c9402 100644
--- a/src/test-wast-parser.cc
+++ b/src/test-wast-parser.cc
@@ -18,7 +18,6 @@
#include <memory>
-#include "src/error-handler.h"
#include "src/wast-lexer.h"
#include "src/wast-parser.h"
@@ -34,16 +33,14 @@ std::string repeat(std::string s, size_t count) {
return result;
}
-std::string ParseInvalidModule(std::string text) {
+Errors ParseInvalidModule(std::string text) {
auto lexer = WastLexer::CreateBufferLexer("test", text.c_str(), text.size());
- const size_t source_line_max_length = 80;
- ErrorHandlerBuffer error_handler(
- Location::Type::Text, lexer->MakeLineFinder(), source_line_max_length);
+ Errors errors;
std::unique_ptr<Module> module;
- Result result = ParseWatModule(lexer.get(), &module, &error_handler);
+ Result result = ParseWatModule(lexer.get(), &module, &errors);
EXPECT_EQ(Result::Error, result);
- return error_handler.buffer();
+ return errors;
}
} // end of anonymous namespace
@@ -56,15 +53,15 @@ TEST(WastParser, LongToken) {
text += repeat("a", 0x10000);
text += "\"))";
- std::string output = ParseInvalidModule(text);
+ Errors errors = ParseInvalidModule(text);
+ ASSERT_EQ(1u, errors.size());
- const char expected[] =
- R"(test:1:15: error: unexpected token ""aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...", expected an offset expr (e.g. (i32.const 123)).
-(module (data "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-)";
-
- ASSERT_STREQ(expected, output.c_str());
+ ASSERT_EQ(ErrorLevel::Error, errors[0].error_level);
+ ASSERT_EQ(1, errors[0].loc.line);
+ ASSERT_EQ(15, errors[0].loc.first_column);
+ ASSERT_STREQ(
+ R"(unexpected token ""aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...", expected an offset expr (e.g. (i32.const 123)).)",
+ errors[0].message.c_str());
}
TEST(WastParser, LongTokenSpace) {
@@ -73,16 +70,18 @@ TEST(WastParser, LongTokenSpace) {
text += repeat(" ", 0x10000);
text += "notmodule";
- std::string output = ParseInvalidModule(text);
+ Errors errors = ParseInvalidModule(text);
+ ASSERT_EQ(2u, errors.size());
- const char expected[] =
- R"(test:1:1: error: unexpected token "notparen", expected a module field or a module.
-notparen ...
-^^^^^^^^
-test:1:65545: error: unexpected token notmodule, expected EOF.
-... notmodule
- ^^^^^^^^^
-)";
+ ASSERT_EQ(ErrorLevel::Error, errors[0].error_level);
+ ASSERT_EQ(1, errors[0].loc.line);
+ ASSERT_EQ(1, errors[0].loc.first_column);
+ ASSERT_STREQ(
+ R"(unexpected token "notparen", expected a module field or a module.)",
+ errors[0].message.c_str());
- ASSERT_STREQ(expected, output.c_str());
+ ASSERT_EQ(1, errors[1].loc.line);
+ ASSERT_EQ(65545, errors[1].loc.first_column);
+ ASSERT_STREQ(R"(unexpected token notmodule, expected EOF.)",
+ errors[1].message.c_str());
}
diff --git a/src/tools/spectest-interp.cc b/src/tools/spectest-interp.cc
index f66efcdd..22becce2 100644
--- a/src/tools/spectest-interp.cc
+++ b/src/tools/spectest-interp.cc
@@ -26,7 +26,7 @@
#include "src/binary-reader-interp.h"
#include "src/binary-reader.h"
#include "src/cast.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/feature.h"
#include "src/interp.h"
#include "src/literal.h"
@@ -979,26 +979,28 @@ wabt::Result CommandRunner::ReadInvalidTextModule(string_view module_filename,
const std::string& header) {
std::unique_ptr<WastLexer> lexer =
WastLexer::CreateFileLexer(module_filename);
- ErrorHandlerFile error_handler(Location::Type::Text, lexer->MakeLineFinder(),
- stdout, header,
- ErrorHandlerFile::PrintHeader::Once);
+ Errors errors;
std::unique_ptr<::Script> script;
- wabt::Result result = ParseWastScript(lexer.get(), &script, &error_handler);
+ wabt::Result result = ParseWastScript(lexer.get(), &script, &errors);
if (Succeeded(result)) {
wabt::Module* module = script->GetFirstModule();
- result = ResolveNamesModule(module, &error_handler);
+ result = ResolveNamesModule(module, &errors);
if (Succeeded(result)) {
ValidateOptions options(s_features);
// Don't do a full validation, just validate the function signatures.
- result = ValidateFuncSignatures(module, &error_handler, options);
+ result = ValidateFuncSignatures(module, &errors, options);
}
}
+
+ auto line_finder = lexer->MakeLineFinder();
+ FormatErrorsToFile(errors, Location::Type::Text, line_finder.get(), stdout,
+ header, PrintHeader::Once);
return result;
}
static wabt::Result ReadModule(string_view module_filename,
Environment* env,
- ErrorHandler* error_handler,
+ Errors* errors,
DefinedModule** out_module) {
wabt::Result result;
std::vector<uint8_t> file_data;
@@ -1013,7 +1015,7 @@ static wabt::Result ReadModule(string_view module_filename,
ReadBinaryOptions options(s_features, s_log_stream.get(), kReadDebugNames,
kStopOnFirstError, kFailOnCustomSectionError);
result = ReadBinaryInterp(env, file_data.data(), file_data.size(), options,
- error_handler, out_module);
+ errors, out_module);
if (Succeeded(result)) {
if (s_verbose) {
@@ -1039,9 +1041,11 @@ wabt::Result CommandRunner::ReadInvalidModule(int line_number,
case ModuleType::Binary: {
DefinedModule* module;
- ErrorHandlerFile error_handler(Location::Type::Binary, {}, stdout, header,
- ErrorHandlerFile::PrintHeader::Once);
- return ReadModule(module_filename, env, &error_handler, &module);
+ Errors errors;
+ wabt::Result result = ReadModule(module_filename, env, &errors, &module);
+ FormatErrorsToFile(errors, Location::Type::Binary, {}, stdout, header,
+ PrintHeader::Once);
+ return result;
}
}
@@ -1050,9 +1054,10 @@ wabt::Result CommandRunner::ReadInvalidModule(int line_number,
wabt::Result CommandRunner::OnModuleCommand(const ModuleCommand* command) {
Environment::MarkPoint mark = env_.Mark();
- ErrorHandlerFile error_handler(Location::Type::Binary);
+ Errors errors;
wabt::Result result = ReadModule(command->filename, &env_,
- &error_handler, &last_module_);
+ &errors, &last_module_);
+ FormatErrorsToFile(errors, Location::Type::Binary);
if (Failed(result)) {
env_.ResetToMarkPoint(mark);
@@ -1160,11 +1165,11 @@ wabt::Result CommandRunner::OnAssertInvalidCommand(
wabt::Result CommandRunner::OnAssertUninstantiableCommand(
const AssertUninstantiableCommand* command) {
- ErrorHandlerFile error_handler(Location::Type::Binary);
+ Errors errors;
DefinedModule* module;
Environment::MarkPoint mark = env_.Mark();
- wabt::Result result =
- ReadModule(command->filename, &env_, &error_handler, &module);
+ wabt::Result result = ReadModule(command->filename, &env_, &errors, &module);
+ FormatErrorsToFile(errors, Location::Type::Binary);
if (Succeeded(result)) {
ExecResult exec_result = executor_.RunStartFunction(module);
diff --git a/src/tools/wasm-interp.cc b/src/tools/wasm-interp.cc
index 0e4e2dd8..01f18e66 100644
--- a/src/tools/wasm-interp.cc
+++ b/src/tools/wasm-interp.cc
@@ -26,7 +26,7 @@
#include "src/binary-reader-interp.h"
#include "src/binary-reader.h"
#include "src/cast.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/feature.h"
#include "src/interp.h"
#include "src/literal.h"
@@ -128,7 +128,7 @@ static void RunAllExports(interp::Module* module,
static wabt::Result ReadModule(const char* module_filename,
Environment* env,
- ErrorHandler* error_handler,
+ Errors* errors,
DefinedModule** out_module) {
wabt::Result result;
std::vector<uint8_t> file_data;
@@ -143,7 +143,7 @@ static wabt::Result ReadModule(const char* module_filename,
ReadBinaryOptions options(s_features, s_log_stream.get(), kReadDebugNames,
kStopOnFirstError, kFailOnCustomSectionError);
result = ReadBinaryInterp(env, file_data.data(), file_data.size(), options,
- error_handler, out_module);
+ errors, out_module);
if (Succeeded(result)) {
if (s_verbose) {
@@ -186,9 +186,10 @@ static wabt::Result ReadAndRunModule(const char* module_filename) {
Environment env;
InitEnvironment(&env);
- ErrorHandlerFile error_handler(Location::Type::Binary);
+ Errors errors;
DefinedModule* module = nullptr;
- result = ReadModule(module_filename, &env, &error_handler, &module);
+ result = ReadModule(module_filename, &env, &errors, &module);
+ FormatErrorsToFile(errors, Location::Type::Binary);
if (Succeeded(result)) {
Executor executor(&env, s_trace_stream, s_thread_options);
ExecResult exec_result = executor.RunStartFunction(module);
diff --git a/src/tools/wasm-strip.cc b/src/tools/wasm-strip.cc
index c12d105a..5df87527 100644
--- a/src/tools/wasm-strip.cc
+++ b/src/tools/wasm-strip.cc
@@ -17,7 +17,7 @@
#include "src/binary.h"
#include "src/binary-reader.h"
#include "src/binary-reader-nop.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/leb128.h"
#include "src/option-parser.h"
#include "src/stream.h"
@@ -48,14 +48,15 @@ static void ParseOptions(int argc, char** argv) {
class BinaryReaderStrip : public BinaryReaderNop {
public:
- explicit BinaryReaderStrip(ErrorHandler* error_handler)
- : error_handler_(error_handler) {
+ explicit BinaryReaderStrip(Errors* errors)
+ : errors_(errors) {
stream_.WriteU32(WABT_BINARY_MAGIC, "WASM_BINARY_MAGIC");
stream_.WriteU32(WABT_BINARY_VERSION, "WASM_BINARY_VERSION");
}
- bool OnError(ErrorLevel error_level, const char* message) override {
- return error_handler_->OnError(error_level, state->offset, message);
+ bool OnError(const Error& error) override {
+ errors_->push_back(error);
+ return true;
}
Result BeginSection(BinarySection section_type, Offset size) override {
@@ -74,7 +75,7 @@ class BinaryReaderStrip : public BinaryReaderNop {
private:
MemoryStream stream_;
- ErrorHandler* error_handler_;
+ Errors* errors_;
};
int ProgramMain(int argc, char** argv) {
@@ -86,16 +87,17 @@ int ProgramMain(int argc, char** argv) {
std::vector<uint8_t> file_data;
result = ReadFile(s_filename.c_str(), &file_data);
if (Succeeded(result)) {
+ Errors errors;
Features features;
- ErrorHandlerFile error_handler(Location::Type::Binary);
const bool kReadDebugNames = false;
const bool kStopOnFirstError = true;
const bool kFailOnCustomSectionError = false;
ReadBinaryOptions options(features, nullptr, kReadDebugNames,
kStopOnFirstError, kFailOnCustomSectionError);
- BinaryReaderStrip reader(&error_handler);
+ BinaryReaderStrip reader(&errors);
result = ReadBinary(file_data.data(), file_data.size(), &reader, options);
+ FormatErrorsToFile(errors, Location::Type::Binary);
if (Succeeded(result)) {
result = reader.WriteToFile(s_filename);
diff --git a/src/tools/wasm-validate.cc b/src/tools/wasm-validate.cc
index 54c13daa..5ec6be1d 100644
--- a/src/tools/wasm-validate.cc
+++ b/src/tools/wasm-validate.cc
@@ -21,7 +21,7 @@
#include "src/binary-reader.h"
#include "src/binary-reader-ir.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/ir.h"
#include "src/option-parser.h"
#include "src/stream.h"
@@ -76,18 +76,19 @@ int ProgramMain(int argc, char** argv) {
std::vector<uint8_t> file_data;
result = ReadFile(s_infile.c_str(), &file_data);
if (Succeeded(result)) {
- ErrorHandlerFile error_handler(Location::Type::Binary);
+ Errors errors;
Module module;
const bool kStopOnFirstError = true;
ReadBinaryOptions options(s_features, s_log_stream.get(),
s_read_debug_names, kStopOnFirstError,
s_fail_on_custom_section_error);
result = ReadBinaryIr(s_infile.c_str(), file_data.data(), file_data.size(),
- options, &error_handler, &module);
+ options, &errors, &module);
if (Succeeded(result)) {
ValidateOptions options(s_features);
- result = ValidateModule(&module, &error_handler, options);
+ result = ValidateModule(&module, &errors, options);
}
+ FormatErrorsToFile(errors, Location::Type::Binary);
}
return result != Result::Ok;
}
diff --git a/src/tools/wasm2c.cc b/src/tools/wasm2c.cc
index 45a55b0b..c7ce2113 100644
--- a/src/tools/wasm2c.cc
+++ b/src/tools/wasm2c.cc
@@ -22,7 +22,7 @@
#include "src/apply-names.h"
#include "src/binary-reader.h"
#include "src/binary-reader-ir.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/feature.h"
#include "src/generate-names.h"
#include "src/ir.h"
@@ -113,7 +113,7 @@ int ProgramMain(int argc, char** argv) {
std::vector<uint8_t> file_data;
result = ReadFile(s_infile.c_str(), &file_data);
if (Succeeded(result)) {
- ErrorHandlerFile error_handler(Location::Type::Binary);
+ Errors errors;
Module module;
const bool kStopOnFirstError = true;
const bool kFailOnCustomSectionError = true;
@@ -121,11 +121,11 @@ int ProgramMain(int argc, char** argv) {
s_read_debug_names, kStopOnFirstError,
kFailOnCustomSectionError);
result = ReadBinaryIr(s_infile.c_str(), file_data.data(), file_data.size(),
- options, &error_handler, &module);
+ options, &errors, &module);
if (Succeeded(result)) {
if (Succeeded(result)) {
ValidateOptions options(s_features);
- result = ValidateModule(&module, &error_handler, options);
+ result = ValidateModule(&module, &errors, options);
result |= GenerateNames(&module);
}
@@ -151,6 +151,7 @@ int ProgramMain(int argc, char** argv) {
}
}
}
+ FormatErrorsToFile(errors, Location::Type::Binary);
}
return result != Result::Ok;
}
diff --git a/src/tools/wasm2wat.cc b/src/tools/wasm2wat.cc
index fe1d17a9..53c7001c 100644
--- a/src/tools/wasm2wat.cc
+++ b/src/tools/wasm2wat.cc
@@ -22,7 +22,7 @@
#include "src/apply-names.h"
#include "src/binary-reader.h"
#include "src/binary-reader-ir.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/feature.h"
#include "src/generate-names.h"
#include "src/ir.h"
@@ -107,18 +107,18 @@ int ProgramMain(int argc, char** argv) {
std::vector<uint8_t> file_data;
result = ReadFile(s_infile.c_str(), &file_data);
if (Succeeded(result)) {
- ErrorHandlerFile error_handler(Location::Type::Binary);
+ Errors errors;
Module module;
const bool kStopOnFirstError = true;
ReadBinaryOptions options(s_features, s_log_stream.get(),
s_read_debug_names, kStopOnFirstError,
s_fail_on_custom_section_error);
result = ReadBinaryIr(s_infile.c_str(), file_data.data(), file_data.size(),
- options, &error_handler, &module);
+ options, &errors, &module);
if (Succeeded(result)) {
if (Succeeded(result) && s_validate) {
ValidateOptions options(s_features);
- result = ValidateModule(&module, &error_handler, options);
+ result = ValidateModule(&module, &errors, options);
}
if (s_generate_names) {
@@ -138,6 +138,7 @@ int ProgramMain(int argc, char** argv) {
result = WriteWat(&stream, &module, s_write_wat_options);
}
}
+ FormatErrorsToFile(errors, Location::Type::Binary);
}
return result != Result::Ok;
}
diff --git a/src/tools/wast2json.cc b/src/tools/wast2json.cc
index f82a493d..5f5d211f 100644
--- a/src/tools/wast2json.cc
+++ b/src/tools/wast2json.cc
@@ -26,7 +26,7 @@
#include "src/binary-writer.h"
#include "src/binary-writer-spec.h"
#include "src/common.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/feature.h"
#include "src/filenames.h"
#include "src/ir.h"
@@ -100,18 +100,18 @@ int ProgramMain(int argc, char** argv) {
WABT_FATAL("unable to read file: %s\n", s_infile);
}
- ErrorHandlerFile error_handler(Location::Type::Text, lexer->MakeLineFinder());
+ Errors errors;
std::unique_ptr<Script> script;
WastParseOptions parse_wast_options(s_features);
- Result result = ParseWastScript(lexer.get(), &script, &error_handler,
- &parse_wast_options);
+ Result result =
+ ParseWastScript(lexer.get(), &script, &errors, &parse_wast_options);
if (Succeeded(result)) {
- result = ResolveNamesScript(script.get(), &error_handler);
+ result = ResolveNamesScript(script.get(), &errors);
if (Succeeded(result) && s_validate) {
ValidateOptions options(s_features);
- result = ValidateScript(script.get(), &error_handler, options);
+ result = ValidateScript(script.get(), &errors, options);
}
if (Succeeded(result)) {
@@ -135,6 +135,9 @@ int ProgramMain(int argc, char** argv) {
}
}
+ auto line_finder = lexer->MakeLineFinder();
+ FormatErrorsToFile(errors, Location::Type::Text, line_finder.get());
+
return result != Result::Ok;
}
diff --git a/src/tools/wat-desugar.cc b/src/tools/wat-desugar.cc
index 5deb9615..767bd8d7 100644
--- a/src/tools/wat-desugar.cc
+++ b/src/tools/wat-desugar.cc
@@ -24,7 +24,7 @@
#include "src/apply-names.h"
#include "src/common.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/feature.h"
#include "src/generate-names.h"
#include "src/ir.h"
@@ -90,11 +90,13 @@ int ProgramMain(int argc, char** argv) {
WABT_FATAL("unable to read %s\n", s_infile);
}
- ErrorHandlerFile error_handler(Location::Type::Text, lexer->MakeLineFinder());
+ Errors errors;
std::unique_ptr<Script> script;
WastParseOptions parse_wast_options(s_features);
- Result result = ParseWastScript(lexer.get(), &script, &error_handler,
- &parse_wast_options);
+ Result result =
+ ParseWastScript(lexer.get(), &script, &errors, &parse_wast_options);
+ auto line_finder = lexer->MakeLineFinder();
+ FormatErrorsToFile(errors, Location::Type::Text);
if (Succeeded(result)) {
Module* module = script->GetFirstModule();
diff --git a/src/tools/wat2wasm.cc b/src/tools/wat2wasm.cc
index 5810ba56..d2f2185d 100644
--- a/src/tools/wat2wasm.cc
+++ b/src/tools/wat2wasm.cc
@@ -25,7 +25,7 @@
#include "src/binary-writer.h"
#include "src/common.h"
-#include "src/error-handler.h"
+#include "src/error-formatter.h"
#include "src/feature.h"
#include "src/filenames.h"
#include "src/ir.h"
@@ -131,18 +131,18 @@ int ProgramMain(int argc, char** argv) {
WABT_FATAL("unable to read file: %s\n", s_infile);
}
- ErrorHandlerFile error_handler(Location::Type::Text, lexer->MakeLineFinder());
+ Errors errors;
std::unique_ptr<Module> module;
WastParseOptions parse_wast_options(s_features);
Result result =
- ParseWatModule(lexer.get(), &module, &error_handler, &parse_wast_options);
+ ParseWatModule(lexer.get(), &module, &errors, &parse_wast_options);
if (Succeeded(result)) {
- result = ResolveNamesModule(module.get(), &error_handler);
+ result = ResolveNamesModule(module.get(), &errors);
if (Succeeded(result) && s_validate) {
ValidateOptions options(s_features);
- result = ValidateModule(module.get(), &error_handler, options);
+ result = ValidateModule(module.get(), &errors, options);
}
if (Succeeded(result)) {
@@ -158,6 +158,9 @@ int ProgramMain(int argc, char** argv) {
}
}
+ auto line_finder = lexer->MakeLineFinder();
+ FormatErrorsToFile(errors, Location::Type::Text, line_finder.get());
+
return result != Result::Ok;
}
diff --git a/src/validator.cc b/src/validator.cc
index 9ec8e9ee..a418e309 100644
--- a/src/validator.cc
+++ b/src/validator.cc
@@ -25,7 +25,6 @@
#include "src/binary-reader.h"
#include "src/cast.h"
-#include "src/error-handler.h"
#include "src/expr-visitor.h"
#include "src/ir.h"
#include "src/type-checker.h"
@@ -37,7 +36,7 @@ namespace {
class Validator : public ExprVisitor::Delegate {
public:
WABT_DISALLOW_COPY_AND_ASSIGN(Validator);
- Validator(ErrorHandler*, const Script*, const ValidateOptions& options);
+ Validator(Errors*, const Script*, const ValidateOptions& options);
Result CheckModule(const Module* module);
Result CheckScript(const Script* script);
@@ -196,7 +195,7 @@ class Validator : public ExprVisitor::Delegate {
Result CheckExceptVar(const Var* var, const Exception** out_except);
const ValidateOptions& options_;
- ErrorHandler* error_handler_ = nullptr;
+ Errors* errors_ = nullptr;
const Script* script_ = nullptr;
const Module* current_module_ = nullptr;
const Func* current_func_ = nullptr;
@@ -211,20 +210,18 @@ class Validator : public ExprVisitor::Delegate {
Result result_ = Result::Ok;
};
-Validator::Validator(ErrorHandler* error_handler,
+Validator::Validator(Errors* errors,
const Script* script,
const ValidateOptions& options)
- : options_(options), error_handler_(error_handler), script_(script) {
+ : options_(options), errors_(errors), script_(script) {
typechecker_.set_error_callback(
[this](const char* msg) { OnTypecheckerError(msg); });
}
-void Validator::PrintError(const Location* loc, const char* fmt, ...) {
+void Validator::PrintError(const Location* loc, const char* format, ...) {
result_ = Result::Error;
- va_list args;
- va_start(args, fmt);
- error_handler_->OnError(ErrorLevel::Error, *loc, fmt, args);
- va_end(args);
+ WABT_SNPRINTF_ALLOCA(buffer, length, format);
+ errors_->emplace_back(ErrorLevel::Error, *loc, buffer);
}
void Validator::OnTypecheckerError(const char* msg) {
@@ -1435,25 +1432,25 @@ Result Validator::CheckAllFuncSignatures(const Module* module) {
} // end anonymous namespace
Result ValidateScript(const Script* script,
- ErrorHandler* error_handler,
+ Errors* errors,
const ValidateOptions& options) {
- Validator validator(error_handler, script, options);
+ Validator validator(errors, script, options);
return validator.CheckScript(script);
}
Result ValidateModule(const Module* module,
- ErrorHandler* error_handler,
+ Errors* errors,
const ValidateOptions& options) {
- Validator validator(error_handler, nullptr, options);
+ Validator validator(errors, nullptr, options);
return validator.CheckModule(module);
}
Result ValidateFuncSignatures(const Module* module,
- ErrorHandler* error_handler,
+ Errors* errors,
const ValidateOptions& options) {
- Validator validator(error_handler, nullptr, options);
+ Validator validator(errors, nullptr, options);
return validator.CheckAllFuncSignatures(module);
}
diff --git a/src/validator.h b/src/validator.h
index 9ead26c5..4dfe0eda 100644
--- a/src/validator.h
+++ b/src/validator.h
@@ -17,13 +17,13 @@
#ifndef WABT_VALIDATOR_H_
#define WABT_VALIDATOR_H_
+#include "src/error.h"
#include "src/feature.h"
namespace wabt {
struct Module;
struct Script;
-class ErrorHandler;
struct ValidateOptions {
ValidateOptions() = default;
@@ -34,8 +34,8 @@ struct ValidateOptions {
// Perform all checks on the script. It is valid if and only if this function
// succeeds.
-Result ValidateScript(const Script*, ErrorHandler*, const ValidateOptions&);
-Result ValidateModule(const Module*, ErrorHandler*, const ValidateOptions&);
+Result ValidateScript(const Script*, Errors*, const ValidateOptions&);
+Result ValidateModule(const Module*, Errors*, const ValidateOptions&);
// Validate that all functions that have an explicit function signature and a
// function type use match.
@@ -44,9 +44,7 @@ Result ValidateModule(const Module*, ErrorHandler*, const ValidateOptions&);
// be malformed text, not a validation error. We can't handle that error in the
// parser because the parser doesn't resolve names to indexes, which is
// required to perform this check.
-Result ValidateFuncSignatures(const Module*,
- ErrorHandler*,
- const ValidateOptions&);
+Result ValidateFuncSignatures(const Module*, Errors*, const ValidateOptions&);
} // namespace wabt
diff --git a/src/wabt.post.js b/src/wabt.post.js
index 6da65575..c6439a05 100644
--- a/src/wabt.post.js
+++ b/src/wabt.post.js
@@ -119,54 +119,64 @@ OutputBuffer.prototype.destroy = function() {
};
-/// ErrorHandler
-function ErrorHandler(kind) {
- if (kind == 'text') {
- this.addr = Module._wabt_new_text_error_handler_buffer();
- } else if (kind == 'binary') {
- this.addr = Module._wabt_new_binary_error_handler_buffer();
- } else {
- throw new Error('Invalid ErrorHandler kind: ' + kind);
- }
-}
-ErrorHandler.prototype = Object.create(Object.prototype);
-
-ErrorHandler.prototype.getMessage = function() {
- var addr = Module._wabt_error_handler_buffer_get_data(this.addr);
- var size = Module._wabt_error_handler_buffer_get_size(this.addr);
- return Pointer_stringify(addr, size);
+/// Errors
+function Errors(kind, lexer) {
+ this.kind = kind;
+ this.addr = Module._wabt_new_errors();
+ this.lexer = lexer;
}
+Errors.prototype = Object.create(Object.prototype);
+
+Errors.prototype.format = function() {
+ var buffer;
+ switch (this.kind) {
+ case 'text':
+ buffer = new OutputBuffer(
+ Module._wabt_format_text_errors(this.addr, this.lexer.addr));
+ break;
+ case 'binary':
+ buffer = new OutputBuffer(Module._wabt_format_binary_errors(this.addr));
+ break;
+ default:
+ throw new Error('Invalid Errors kind: ' + this.kind);
+ }
+ var message = buffer.toString();
+ buffer.destroy();
+ return message;
+};
-ErrorHandler.prototype.destroy = function() {
- Module._wabt_destroy_error_handler_buffer(this.addr);
+Errors.prototype.destroy = function() {
+ Module._wabt_destroy_errors(this.addr);
+ if (this.lexer) {
+ this.lexer.destroy();
+ }
};
/// parseWat
function parseWat(filename, buffer) {
var lexer = new Lexer(filename, buffer);
- var errorHandler = new ErrorHandler('text');
+ var errors = new Errors('text', lexer);
try {
var parseResult_addr =
- Module._wabt_parse_wat(lexer.addr, errorHandler.addr);
+ Module._wabt_parse_wat(lexer.addr, errors.addr);
var result = Module._wabt_parse_wat_result_get_result(parseResult_addr);
if (result !== WABT_OK) {
- throw new Error('parseWat failed:\n' + errorHandler.getMessage());
+ throw new Error('parseWat failed:\n' + errors.format());
}
var module_addr =
Module._wabt_parse_wat_result_release_module(parseResult_addr);
- var result = new WasmModule(lexer, module_addr);
- // Clear lexer so it isn't destroyed below.
- lexer = null;
+ var result = new WasmModule(module_addr, errors);
+ // Clear errors so it isn't destroyed below.
+ errors = null;
return result;
} finally {
Module._wabt_destroy_parse_wat_result(parseResult_addr);
- errorHandler.destroy();
- if (lexer) {
- lexer.destroy();
+ if (errors) {
+ errors.destroy();
}
}
}
@@ -175,61 +185,55 @@ function parseWat(filename, buffer) {
// readWasm
function readWasm(buffer, options) {
var bufferObj = allocateBuffer(buffer);
- var errorHandler = new ErrorHandler('binary');
+ var errors = new Errors('binary');
var readDebugNames = booleanOrDefault(options.readDebugNames, false);
try {
var readBinaryResult_addr = Module._wabt_read_binary(
- bufferObj.addr, bufferObj.size, readDebugNames, errorHandler.addr);
+ bufferObj.addr, bufferObj.size, readDebugNames, errors.addr);
var result =
Module._wabt_read_binary_result_get_result(readBinaryResult_addr);
if (result !== WABT_OK) {
- throw new Error('readWasm failed:\n' + errorHandler.getMessage());
+ throw new Error('readWasm failed:\n' + errors.format());
}
var module_addr =
Module._wabt_read_binary_result_release_module(readBinaryResult_addr);
- var result = new WasmModule(null, module_addr);
+ var result = new WasmModule(module_addr, errors);
+ // Clear errors so it isn't destroyed below.
+ errors = null;
return result;
} finally {
Module._wabt_destroy_read_binary_result(readBinaryResult_addr);
- errorHandler.destroy();
+ if (errors) {
+ errors.destroy();
+ }
Module._free(bufferObj.addr);
}
}
// WasmModule (can't call it Module because emscripten has claimed it.)
-function WasmModule(lexer, module_addr) {
- this.lexer = lexer;
+function WasmModule(module_addr, errors) {
this.module_addr = module_addr;
+ this.errors = errors;
}
WasmModule.prototype = Object.create(Object.prototype);
WasmModule.prototype.validate = function() {
- var errorHandler = new ErrorHandler('text');
- try {
- var result =
- Module._wabt_validate_module(this.module_addr, errorHandler.addr);
- if (result !== WABT_OK) {
- throw new Error('validate failed:\n' + errorHandler.getMessage());
- }
- } finally {
- errorHandler.destroy();
+ var result =
+ Module._wabt_validate_module(this.module_addr, this.errors.addr);
+ if (result !== WABT_OK) {
+ throw new Error('validate failed:\n' + this.errors.format());
}
};
WasmModule.prototype.resolveNames = function() {
- var errorHandler = new ErrorHandler('text');
- try {
- var result =
- Module._wabt_resolve_names_module(this.module_addr, errorHandler.addr);
- if (result !== WABT_OK) {
- throw new Error('resolveNames failed:\n' + errorHandler.getMessage());
- }
- } finally {
- errorHandler.destroy();
+ var result =
+ Module._wabt_resolve_names_module(this.module_addr, this.errors.addr);
+ if (result !== WABT_OK) {
+ throw new Error('resolveNames failed:\n' + this.errors.format());
}
};
@@ -318,8 +322,8 @@ WasmModule.prototype.toBinary = function(options) {
WasmModule.prototype.destroy = function() {
Module._wabt_destroy_module(this.module_addr);
- if (this.lexer) {
- this.lexer.destroy();
+ if (this.errors) {
+ this.errors.destroy();
}
};
diff --git a/src/wast-lexer.cc b/src/wast-lexer.cc
index f41d2f4d..d8abcce5 100644
--- a/src/wast-lexer.cc
+++ b/src/wast-lexer.cc
@@ -21,7 +21,6 @@
#include "config.h"
-#include "src/error-handler.h"
#include "src/lexer-source.h"
#include "src/wast-parser.h"
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index 20d5d44a..3b707848 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -19,7 +19,6 @@
#include "src/binary-reader-ir.h"
#include "src/binary-reader.h"
#include "src/cast.h"
-#include "src/error-handler.h"
#include "src/expr-visitor.h"
#include "src/make-unique.h"
#include "src/utf8.h"
@@ -104,42 +103,6 @@ void RemoveEscapes(const TextVector& texts, OutputIter out) {
RemoveEscapes(text, out);
}
-class BinaryErrorHandlerModule : public ErrorHandler {
- public:
- BinaryErrorHandlerModule(Location* loc, WastParser* parser);
- bool OnError(ErrorLevel,
- const Location&,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset) override;
-
- // Unused.
- size_t source_line_max_length() const override { return 0; }
-
- private:
- Location* loc_;
- WastParser* parser_;
-};
-
-BinaryErrorHandlerModule::BinaryErrorHandlerModule(Location* loc,
- WastParser* parser)
- : ErrorHandler(Location::Type::Binary), loc_(loc), parser_(parser) {}
-
-bool BinaryErrorHandlerModule::OnError(ErrorLevel error_level,
- const Location& binary_loc,
- const std::string& error,
- const std::string& source_line,
- size_t source_line_column_offset) {
- assert(error_level == ErrorLevel::Error);
- if (binary_loc.offset == kInvalidOffset) {
- parser_->Error(*loc_, "error in binary module: %s", error.c_str());
- } else {
- parser_->Error(*loc_, "error in binary module: @0x%08" PRIzx ": %s",
- binary_loc.offset, error.c_str());
- }
- return true;
-}
-
bool IsPlainInstr(TokenType token_type) {
switch (token_type) {
case TokenType::Unreachable:
@@ -375,16 +338,13 @@ void AppendInlineExportFields(Module* module,
} // End of anonymous namespace
WastParser::WastParser(WastLexer* lexer,
- ErrorHandler* error_handler,
+ Errors* errors,
WastParseOptions* options)
- : lexer_(lexer), error_handler_(error_handler), options_(options) {}
+ : lexer_(lexer), errors_(errors), options_(options) {}
void WastParser::Error(Location loc, const char* format, ...) {
- errors_++;
- va_list args;
- va_start(args, format);
- error_handler_->OnError(ErrorLevel::Error, loc, format, args);
- va_end(args);
+ WABT_SNPRINTF_ALLOCA(buffer, length, format);
+ errors_->emplace_back(ErrorLevel::Error, loc, buffer);
}
Token WastParser::GetToken() {
@@ -747,7 +707,7 @@ Result WastParser::ParseModule(std::unique_ptr<Module>* out_module) {
}
EXPECT(Eof);
- if (errors_ == 0) {
+ if (errors_->size() == 0) {
*out_module = std::move(module);
return Result::Ok;
} else {
@@ -776,7 +736,7 @@ Result WastParser::ParseScript(std::unique_ptr<Script>* out_script) {
}
EXPECT(Eof);
- if (errors_ == 0) {
+ if (errors_->size() == 0) {
*out_script = std::move(script);
return Result::Ok;
} else {
@@ -2205,12 +2165,21 @@ Result WastParser::ParseModuleCommand(Script* script, CommandPtr* out_command) {
case ScriptModuleType::Binary: {
auto* bsm = cast<BinaryScriptModule>(script_module.get());
ReadBinaryOptions options;
- BinaryErrorHandlerModule error_handler(&bsm->loc, this);
+ Errors errors;
const char* filename = "<text>";
ReadBinaryIr(filename, bsm->data.data(), bsm->data.size(), options,
- &error_handler, &module);
+ &errors, &module);
module.name = bsm->name;
module.loc = bsm->loc;
+ for (const auto& error: errors) {
+ assert(error.error_level == ErrorLevel::Error);
+ if (error.loc.offset == kInvalidOffset) {
+ Error(bsm->loc, "error in binary module: %s", error.message.c_str());
+ } else {
+ Error(bsm->loc, "error in binary module: @0x%08" PRIzx ": %s",
+ error.loc.offset, error.message.c_str());
+ }
+ }
break;
}
@@ -2389,19 +2358,19 @@ void WastParser::CheckImportOrdering(Module* module) {
Result ParseWatModule(WastLexer* lexer,
std::unique_ptr<Module>* out_module,
- ErrorHandler* error_handler,
+ Errors* errors,
WastParseOptions* options) {
assert(out_module != nullptr);
- WastParser parser(lexer, error_handler, options);
+ WastParser parser(lexer, errors, options);
return parser.ParseModule(out_module);
}
Result ParseWastScript(WastLexer* lexer,
std::unique_ptr<Script>* out_script,
- ErrorHandler* error_handler,
+ Errors* errors,
WastParseOptions* options) {
assert(out_script != nullptr);
- WastParser parser(lexer, error_handler, options);
+ WastParser parser(lexer, errors, options);
return parser.ParseScript(out_script);
}
diff --git a/src/wast-parser.h b/src/wast-parser.h
index 3a9f0413..8a1b0a69 100644
--- a/src/wast-parser.h
+++ b/src/wast-parser.h
@@ -20,6 +20,7 @@
#include <array>
#include "src/circular-array.h"
+#include "src/error.h"
#include "src/feature.h"
#include "src/intrusive-list.h"
#include "src/ir.h"
@@ -27,8 +28,6 @@
namespace wabt {
-class ErrorHandler;
-
struct WastParseOptions {
WastParseOptions(const Features& features) : features(features) {}
@@ -40,7 +39,7 @@ typedef std::array<TokenType, 2> TokenTypePair;
class WastParser {
public:
- WastParser(WastLexer*, ErrorHandler*, WastParseOptions*);
+ WastParser(WastLexer*, Errors*, WastParseOptions*);
void WABT_PRINTF_FORMAT(3, 4) Error(Location, const char* format, ...);
Result ParseModule(std::unique_ptr<Module>* out_module);
@@ -206,8 +205,7 @@ class WastParser {
WastLexer* lexer_;
Index last_module_index_ = kInvalidIndex;
- ErrorHandler* error_handler_;
- int errors_ = 0;
+ Errors* errors_;
WastParseOptions* options_;
CircularArray<Token, 2> tokens_;
@@ -215,12 +213,12 @@ class WastParser {
Result ParseWatModule(WastLexer* lexer,
std::unique_ptr<Module>* out_module,
- ErrorHandler*,
+ Errors*,
WastParseOptions* options = nullptr);
Result ParseWastScript(WastLexer* lexer,
std::unique_ptr<Script>* out_script,
- ErrorHandler*,
+ Errors*,
WastParseOptions* options = nullptr);
} // namespace wabt