From 0b0581a2db2ea0f28e820957504e431881cb1f70 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 26 Apr 2022 16:53:48 -0700 Subject: Fix some outdated comments (#4617) * We implemented specialization of field types (the TypeRefining pass). * LUBFinder now handles nulls, so we need nothing extra for it in TypeRefining. --- src/passes/GlobalTypeOptimization.cpp | 2 -- src/passes/TypeRefining.cpp | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/passes/GlobalTypeOptimization.cpp b/src/passes/GlobalTypeOptimization.cpp index 53c76ca6f..9b2a1f269 100644 --- a/src/passes/GlobalTypeOptimization.cpp +++ b/src/passes/GlobalTypeOptimization.cpp @@ -21,8 +21,6 @@ // * Immutability: If a field has no struct.set, it can become immutable. // * Fields that are never read from can be removed entirely. // -// TODO: Specialize field types. -// #include "ir/effects.h" #include "ir/localize.h" diff --git a/src/passes/TypeRefining.cpp b/src/passes/TypeRefining.cpp index 74b23bb26..a2a37f750 100644 --- a/src/passes/TypeRefining.cpp +++ b/src/passes/TypeRefining.cpp @@ -32,10 +32,8 @@ namespace wasm { namespace { -// We use a LUBFinder to track field info. A LUBFinder keeps track of the best -// possible LUB so far. The only extra functionality we need here is whether -// there is a default null value (which would force us to keep the type -// nullable). +// We use a LUBFinder to track field info, which includes the best LUB possible +// as well as relevant nulls (nulls force us to keep the type nullable). using FieldInfo = LUBFinder; struct FieldInfoScanner -- cgit v1.2.3