MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / meet

Method meet

chapter07/src/main/java/com/seaofnodes/simple/type/Type.java:48–57  ·  view source on GitHub ↗
(Type t)

Source from the content-addressed store, hash-verified

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'.

Callers 8

computeMethod · 0.95
computeMethod · 0.95
xmeetMethod · 0.45
computeMethod · 0.45
computeMethod · 0.45
computeMethod · 0.45
computeMethod · 0.45
computeMethod · 0.45

Calls 2

xmeetMethod · 0.95
is_simpleMethod · 0.95

Tested by

no test coverage detected