summaryrefslogtreecommitdiff
path: root/src/ir/literal-utils.h
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2022-08-04 17:05:54 -0700
committerGitHub <noreply@github.com>2022-08-05 00:05:54 +0000
commit6759371b5239efa3daa9d988455abdd14a8b18ca (patch)
tree0c3a3e371ed742bdbd790f7344ec86e8536bc167 /src/ir/literal-utils.h
parent9534e6927c41f4a6a5d06d58d00c271c9f066e9a (diff)
downloadbinaryen-6759371b5239efa3daa9d988455abdd14a8b18ca.tar.gz
binaryen-6759371b5239efa3daa9d988455abdd14a8b18ca.tar.bz2
binaryen-6759371b5239efa3daa9d988455abdd14a8b18ca.zip
Remove RTTs (#4848)
RTTs were removed from the GC spec and if they are added back in in the future, they will be heap types rather than value types as in our implementation. Updating our implementation to have RTTs be heap types would have been more work than deleting them for questionable benefit since we don't know how long it will be before they are specced again.
Diffstat (limited to 'src/ir/literal-utils.h')
-rw-r--r--src/ir/literal-utils.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/ir/literal-utils.h b/src/ir/literal-utils.h
index ad022344e..0131ecdc9 100644
--- a/src/ir/literal-utils.h
+++ b/src/ir/literal-utils.h
@@ -33,17 +33,9 @@ inline bool canMakeZero(Type type) {
if (type.isNonNullable()) {
return false;
}
- if (type.isRtt() && type.getRtt().hasDepth()) {
- // An rtt with depth cannot be constructed as a simple zero: we'd need to
- // create not just a zero (an rtt.canon) but also some rtt.subs that add to
- // the depth, so disallow that. Also, there is no practical way to create a
- // zero Literal for such a type, as we'd need to supply the list of super
- // types somehow, and creating a zero Literal is how makeZero works.
- return false;
- }
if (type.isTuple()) {
for (auto t : type) {
- if (!canMakeZero(t)) {
+ if (t.isNonNullable()) {
return false;
}
}