| 129 | |
| 130 | // ---------------------------------------------------------- |
| 131 | public final Type meet(Type t) { |
| 132 | // Shortcut for the self case |
| 133 | if( t == this ) return this; |
| 134 | // Same-type is always safe in the subclasses |
| 135 | if( _type==t._type ) return xmeet(t); |
| 136 | // Reverse; xmeet 2nd arg is never "is_simple" and never equal to "this". |
| 137 | if( is_simple() ) return this.xmeet(t ); |
| 138 | if( t.is_simple() ) return t .xmeet(this); |
| 139 | return Type.BOTTOM; // Mixing 2 unrelated types |
| 140 | } |
| 141 | |
| 142 | // Compute meet right now. Overridden in subclasses. |
| 143 | // Handle cases where 'this.is_simple()' and unequal to 't'. |