| 46 | public StringBuilder print(StringBuilder sb) {return is_simple() ? sb.append(STRS[_type]) : sb;} |
| 47 | |
| 48 | public final Type meet(Type t) { |
| 49 | // Shortcut for the self case |
| 50 | if( t == this ) return this; |
| 51 | // Same-type is always safe in the subclasses |
| 52 | if( _type==t._type ) return xmeet(t); |
| 53 | // Reverse; xmeet 2nd arg is never "is_simple" and never equal to "this". |
| 54 | if( is_simple() ) return this.xmeet(t ); |
| 55 | if( t.is_simple() ) return t .xmeet(this); |
| 56 | return BOTTOM; // Mixing 2 unrelated types |
| 57 | } |
| 58 | |
| 59 | // Compute meet right now. Overridden in subclasses. |
| 60 | // Handle cases where 'this.is_simple()' and unequal to 't'. |