File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,25 @@ namespace wasm {
6161// not track what they might be, so we must assume the worst
6262// in the calling code.
6363//
64+ // This is a lattice, but it is not a distributive lattice
65+ // (https://en.wikipedia.org/wiki/Lattice_(order)#Distributivity):
66+ //
67+ // Cone(ref func) ^ [(ref.func $foo) u (ref.null func)] =
68+ // Cone(ref func) ^ Cone(ref null func) = ;; best shape that can
69+ // ;; hold both a ref.func
70+ // ;; and a null
71+ // Cone(ref func)
72+ //
73+ // while
74+ //
75+ // [Cone(ref func) ^ (ref.func $foo)] u [Cone(ref func) ^ (ref.null func)] =
76+ // (ref.func $foo) u none =
77+ // (ref.func $foo)
78+ //
79+ // "Fixing" this would require us to support a shape that includes both a
80+ // ref.func and a null, and does not "forget" the ref.func as Cone does. It is
81+ // not clear if that would be worth the complexity and overhead.
82+ //
6483class PossibleContents {
6584 struct None : public std ::monostate {};
6685
You can’t perform that action at this time.
0 commit comments