diff options
Diffstat (limited to 'src/tools/execution-results.h')
-rw-r--r-- | src/tools/execution-results.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/execution-results.h b/src/tools/execution-results.h index d9fa5cd9b..31c572e65 100644 --- a/src/tools/execution-results.h +++ b/src/tools/execution-results.h @@ -148,7 +148,8 @@ struct ExecutionResults { // simple and stable internal structures that optimizations will not alter. auto type = value.type; if (type.isRef()) { - if (type.isString() || type.getHeapType() == HeapType::i31) { + if (type.getHeapType().isMaybeShared(HeapType::string) || + type.getHeapType().isMaybeShared(HeapType::i31)) { std::cout << value << '\n'; } else if (value.isNull()) { std::cout << "null\n"; @@ -189,7 +190,9 @@ struct ExecutionResults { // TODO: Once we support optimizing under some form of open-world // assumption, we should be able to check that the types and/or structure of // GC data passed out of the module does not change. - if (a.type.isRef() && !a.type.isString()) { + if (a.type.isRef() && + !a.type.getHeapType().isMaybeShared(HeapType::string) && + !a.type.getHeapType().isMaybeShared(HeapType::i31)) { return true; } if (a != b) { |