summaryrefslogtreecommitdiff
path: root/src/tools/execution-results.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/execution-results.h')
-rw-r--r--src/tools/execution-results.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/execution-results.h b/src/tools/execution-results.h
index a183ad93b..50f627baf 100644
--- a/src/tools/execution-results.h
+++ b/src/tools/execution-results.h
@@ -90,6 +90,9 @@ struct ExecutionResults {
std::map<Name, Literals> results;
Loggings loggings;
+ // If set, we should ignore this and not compare it to anything.
+ bool ignore = false;
+
// get results of execution
void get(Module& wasm) {
LoggingExternalInterface interface(loggings);
@@ -176,6 +179,10 @@ struct ExecutionResults {
}
bool operator==(ExecutionResults& other) {
+ if (ignore || other.ignore) {
+ std::cout << "ignoring comparison of ExecutionResults!\n";
+ return true;
+ }
for (auto& iter : other.results) {
auto name = iter.first;
if (results.find(name) == results.end()) {
@@ -231,6 +238,11 @@ struct ExecutionResults {
return instance.callFunction(func->name, arguments);
} catch (const TrapException&) {
return {};
+ } catch (const HostLimitException&) {
+ // This should be ignored and not compared with, as optimizations can
+ // change whether a host limit is reached.
+ ignore = true;
+ return {};
}
}
};