summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-04-26 16:53:48 -0700
committerGitHub <noreply@github.com>2022-04-26 16:53:48 -0700
commit0b0581a2db2ea0f28e820957504e431881cb1f70 (patch)
treefae2c1d43b6681beccce2fb274448ad56bd12f9a /src
parentb337a11b0d2ac2af1b8c0241854e600be480792a (diff)
downloadbinaryen-0b0581a2db2ea0f28e820957504e431881cb1f70.tar.gz
binaryen-0b0581a2db2ea0f28e820957504e431881cb1f70.tar.bz2
binaryen-0b0581a2db2ea0f28e820957504e431881cb1f70.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/passes/GlobalTypeOptimization.cpp2
-rw-r--r--src/passes/TypeRefining.cpp6
2 files changed, 2 insertions, 6 deletions
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