From 6759371b5239efa3daa9d988455abdd14a8b18ca Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Thu, 4 Aug 2022 17:05:54 -0700 Subject: 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. --- src/passes/StackIR.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/passes/StackIR.cpp') diff --git a/src/passes/StackIR.cpp b/src/passes/StackIR.cpp index a3d9442bf..84e19428d 100644 --- a/src/passes/StackIR.cpp +++ b/src/passes/StackIR.cpp @@ -72,7 +72,7 @@ public: // Removing unneeded blocks is dangerous with GC, as if we do this: // // (call - // (rtt) + // (struct.new) // (block // (nop) // (i32) @@ -80,7 +80,7 @@ public: // ) // === remove inner block ==> // (call - // (rtt) + // (struct.new) // (nop) // (i32) // ) @@ -90,7 +90,7 @@ public: // (call // (block // (local.set - // (rtt) + // (struct.new) // ) // (nop) // (local.get) @@ -98,7 +98,9 @@ public: // (i32) // ) // - // However, that is not valid as an rtt cannot be set to a local. + // However, that is not valid as an non-nullable reference cannot be set to + // a local. TODO: double check that this is still true now that we don't + // have RTTs. if (!features.hasGC()) { removeUnneededBlocks(); } -- cgit v1.2.3