summaryrefslogtreecommitdiff
path: root/src/tools/spectest-interp.cc
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2020-02-20 14:06:20 -0800
committerGitHub <noreply@github.com>2020-02-20 14:06:19 -0800
commit94ad3e84817c546b1313e161da565d181b1a470c (patch)
tree77b94ab9dd8a06fbad94e2931e489950eecd2155 /src/tools/spectest-interp.cc
parent09d712be32398d2ab4174f36228dcac5fbb5f672 (diff)
downloadwabt-94ad3e84817c546b1313e161da565d181b1a470c.tar.gz
wabt-94ad3e84817c546b1313e161da565d181b1a470c.tar.bz2
wabt-94ad3e84817c546b1313e161da565d181b1a470c.zip
Always run ResolveNames after parsing .wast/.wat (#1337)
Resolving names (i.e. remapping variable names to indexes) is meant to be part of the parsing process. The spec even considers an unmapped variable name to be "malformed" text. This PR moves in that direction, by always running ResolveNames after parsing text. The next step would be to integrate this more closely with the parser itself.
Diffstat (limited to 'src/tools/spectest-interp.cc')
-rw-r--r--src/tools/spectest-interp.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/tools/spectest-interp.cc b/src/tools/spectest-interp.cc
index 4e310d68..f29bb0ab 100644
--- a/src/tools/spectest-interp.cc
+++ b/src/tools/spectest-interp.cc
@@ -32,7 +32,6 @@
#include "src/interp/interp.h"
#include "src/literal.h"
#include "src/option-parser.h"
-#include "src/resolve-names.h"
#include "src/stream.h"
#include "src/validator.h"
#include "src/wast-lexer.h"
@@ -1073,12 +1072,9 @@ wabt::Result CommandRunner::ReadInvalidTextModule(string_view module_filename,
result = ParseWastScript(lexer.get(), &script, &errors, &options);
if (Succeeded(result)) {
wabt::Module* module = script->GetFirstModule();
- 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, &errors, options);
- }
+ ValidateOptions options(s_features);
+ // Don't do a full validation, just validate the function signatures.
+ result = ValidateFuncSignatures(module, &errors, options);
}
}