| 102 | // Handle cases where 'this.is_simple()' and unequal to 't'. |
| 103 | // Subclassed xmeet calls can assert that '!t.is_simple()'. |
| 104 | protected Type xmeet(Type t) { |
| 105 | assert is_simple(); // Should be overridden in subclass |
| 106 | // ANY meet anything is thing; thing meet ALL is ALL |
| 107 | if( _type==TBOT || t._type==TTOP ) return this; |
| 108 | if( _type==TTOP || t._type==TBOT ) return t; |
| 109 | // 'this' is {TCTRL,TXCTRL} |
| 110 | if( !t.is_simple() ) return BOTTOM; |
| 111 | // 't' is {TCTRL,TXCTRL} |
| 112 | return _type==TCTRL || t._type==TCTRL ? CONTROL : XCONTROL; |
| 113 | } |
| 114 | |
| 115 | // True if this "isa" t; e.g. 17 isa TypeInteger.BOT |
| 116 | public boolean isa( Type t ) { return meet(t)==t; } |