Skip to content

Commit

Permalink
Fix some outdated comments (#4617)
Browse files Browse the repository at this point in the history
* We implemented specialization of field types (the TypeRefining pass).
* LUBFinder now handles nulls, so we need nothing extra for it in TypeRefining.
  • Loading branch information
kripken authored Apr 26, 2022
1 parent b337a11 commit 0b0581a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/passes/GlobalTypeOptimization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 2 additions & 4 deletions src/passes/TypeRefining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0b0581a

Please sign in to comment.