aa
com.cliffc.aa.HM.HM8.T2 Class Reference
Collaboration diagram for com.cliffc.aa.HM.HM8.T2:
[legend]

Public Member Functions

String p ()
 
String toString ()
 

Package Functions

boolean _cycle_equals (T2 t)
 
VBitSet _get_dups (VBitSet visit, VBitSet dups)
 
boolean _nongen_in (VStack nongen)
 
boolean _occurs_in (Syntax syn)
 
boolean _occurs_in_type (T2 x)
 
void add_deps_work (Worklist work)
 
T2 args (int i)
 
T2 copy ()
 
boolean cycle_equals (T2 t)
 
T2 debug_find ()
 
T2 find ()
 
boolean fresh_unify (T2 that, VStack nongen, Worklist work)
 
VBitSet get_dups (VBitSet dups)
 
T2 getrec (int alias)
 
boolean is_base ()
 
boolean is_err ()
 
boolean is_fun ()
 
boolean is_leaf ()
 
boolean is_mem ()
 
boolean is_nil ()
 
boolean is_struct ()
 
boolean isa (String name)
 
boolean no_uf ()
 
boolean nongen_in (VStack syn)
 
boolean occurs_in (Syntax syn)
 
boolean occurs_in_type (T2 x)
 
boolean or0 (T2 that, Worklist work)
 
String p (VBitSet dups)
 
T2 push_update (Ary< Syntax > as)
 
void push_update (Syntax a)
 
SB str (SB sb, VBitSet visit, VBitSet dups)
 
boolean unify (T2 that, Worklist work)
 
boolean unify_rec (int alias, T2 str, Worklist work)
 
boolean union (T2 that, Worklist work)
 

Static Package Functions

static T2 make_base (Type con)
 
static T2 make_err (String s)
 
static T2 make_fun (T2... args)
 
static T2 make_leaf ()
 
static T2 make_mem ()
 
static T2 make_nil ()
 
static T2 make_struct (String[] ids, BitsAlias aliases, T2[] flds)
 
static T2 prim (String name, T2... args)
 
static void reset ()
 

Package Attributes

BitsAlias _aliases
 
T2[] _args
 
Type _con
 
Ary< Syntax_deps
 
String[] _ids
 
String _name
 
final int _uid
 

Static Package Attributes

static final VBitSet UPDATE_VISIT = new VBitSet()
 

Private Member Functions

 T2 (@NotNull String name, Type con, String[] ids, BitsAlias aliases, T2 @NotNull ... args)
 
boolean _cycle_equals_struct (T2 t)
 
T2 _fresh (VStack nongen)
 
boolean _fresh_unify (T2 that, VStack nongen, Worklist work)
 
boolean _fresh_unify_struct (T2 that, VStack nongen, Worklist work)
 
SB _p (SB sb, VBitSet visit, VBitSet dups)
 
boolean _unify (T2 that, Worklist work)
 
void add_deps_work_impl (Worklist work)
 
void add_fld (String id, T2 fld, Worklist work)
 
long dbl_uid (T2 t)
 
boolean fresh_base (T2 that, Worklist work)
 
void push_update_impl (Syntax a)
 
boolean unify_base (T2 that, Worklist work)
 
boolean union_err (T2 that, Worklist work, String msg)
 
boolean vput (T2 that, boolean progress)
 

Static Private Member Functions

static SB str (SB sb, VBitSet visit, T2 t, VBitSet dups)
 

Static Private Attributes

static final HashMap< T2, T2CDUPS = new HashMap<>()
 
static int CNT =0
 
static final HashMap< Long, T2DUPS = new HashMap<>()
 
static final VBitSet ODUPS = new VBitSet()
 
static final HashMap< T2, T2VARS = new HashMap<>()
 
static int VCNT
 
static final HashMap< T2, Integer > VNAMES = new HashMap<>()
 

Detailed Description

Definition at line 721 of file HM8.java.

Constructor & Destructor Documentation

◆ T2()

com.cliffc.aa.HM.HM8.T2.T2 ( @NotNull String  name,
Type  con,
String[]  ids,
BitsAlias  aliases,
T2 @NotNull ...  args 
)
private

Definition at line 756 of file HM8.java.

756  {
757  _uid = CNT++;
758  _name= name;
759  _con = con;
760  _ids = ids;
761  _aliases = aliases;
762  _args= args;
763  _deps = null;
764  }

References com.cliffc.aa.HM.HM8.T2._aliases, com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2._deps, com.cliffc.aa.HM.HM8.T2._ids, com.cliffc.aa.HM.HM8.T2._name, com.cliffc.aa.HM.HM8.T2._uid, com.cliffc.aa.HM.HM8.T2.args(), and com.cliffc.aa.HM.HM8.T2.CNT.

Referenced by com.cliffc.aa.HM.HM8.T2.copy(), com.cliffc.aa.HM.HM8.T2.make_base(), com.cliffc.aa.HM.HM8.T2.make_err(), com.cliffc.aa.HM.HM8.T2.make_fun(), com.cliffc.aa.HM.HM8.T2.make_leaf(), com.cliffc.aa.HM.HM8.T2.make_mem(), com.cliffc.aa.HM.HM8.T2.make_nil(), com.cliffc.aa.HM.HM8.T2.make_struct(), and com.cliffc.aa.HM.HM8.T2.prim().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ _cycle_equals()

boolean com.cliffc.aa.HM.HM8.T2._cycle_equals ( T2  t)
package

Definition at line 1111 of file HM8.java.

1111  {
1112  assert no_uf() && t.no_uf();
1113  if( this==t ) return true;
1114  if( is_base() && t.is_base() )
1115  return _con==t._con; // Base-cases have to be completely identical
1116  if( !Util.eq(_name,t._name) || // Wrong type-var names
1117  _args.length != t._args.length ) // Mismatched sizes
1118  return false;
1119  if( _args==t._args ) return true;
1120  // Cycles stall the equal/unequal decision until we see a difference.
1121  T2 tc = CDUPS.get(this);
1122  if( tc!=null )
1123  return tc==t; // Cycle check; true if both cycling the same
1124  CDUPS.put(this,t);
1125  if( is_struct() ) // Struct equality honors field names without regard to order
1126  return _cycle_equals_struct(t);
1127  for( int i=0; i<_args.length; i++ )
1128  if( !args(i)._cycle_equals(t.args(i)) )
1129  return false;
1130  return true;
1131  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2._cycle_equals_struct(), com.cliffc.aa.HM.HM8.T2._name, com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.T2.CDUPS, com.cliffc.aa.util.Util.eq(), com.cliffc.aa.HM.HM8.T2.is_base(), com.cliffc.aa.HM.HM8.T2.is_struct(), and com.cliffc.aa.HM.HM8.T2.no_uf().

Referenced by com.cliffc.aa.HM.HM8.T2._cycle_equals_struct(), and com.cliffc.aa.HM.HM8.T2.cycle_equals().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _cycle_equals_struct()

boolean com.cliffc.aa.HM.HM8.T2._cycle_equals_struct ( T2  t)
private

Definition at line 1133 of file HM8.java.

1133  {
1134  assert is_struct() && t.is_struct();
1135  if( _con != t._con ) return false;
1136  for( int i=0; i<_args.length; i++ ) {
1137  int idx = Util.find(t._ids,_ids[i]);
1138  if( idx==-1 || !args(i)._cycle_equals(t.args(idx)) )
1139  return false;
1140  }
1141  return true;
1142  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2._cycle_equals(), com.cliffc.aa.HM.HM8.T2._ids, com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.util.Util.find(), and com.cliffc.aa.HM.HM8.T2.is_struct().

Referenced by com.cliffc.aa.HM.HM8.T2._cycle_equals().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _fresh()

T2 com.cliffc.aa.HM.HM8.T2._fresh ( VStack  nongen)
private

Definition at line 1035 of file HM8.java.

1035  {
1036  assert no_uf();
1037  T2 rez = VARS.get(this);
1038  if( rez!=null ) return rez; // Been there, done that
1039 
1040  if( is_leaf() ) {
1041  // If occurs_in lexical scope, keep same variable, else make a new leaf
1042  T2 t = nongen_in(nongen) ? this : T2.make_leaf();
1043  VARS.put(this,t);
1044  return t;
1045  } else { // Structure is deep-replicated
1046  T2 t = copy();
1047  VARS.put(this,t); // Stop cyclic structure looping
1048  for( int i=0; i<_args.length; i++ )
1049  t._args[i] = args(i)._fresh(nongen);
1050  return t;
1051  }
1052  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._fresh(), com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.T2.copy(), com.cliffc.aa.HM.HM8.T2.is_leaf(), com.cliffc.aa.HM.HM8.T2.make_leaf(), com.cliffc.aa.HM.HM8.T2.no_uf(), com.cliffc.aa.HM.HM8.T2.nongen_in(), and com.cliffc.aa.HM.HM8.T2.VARS.

Referenced by com.cliffc.aa.HM.HM8.T2._fresh(), com.cliffc.aa.HM.HM8.T2._fresh_unify(), and com.cliffc.aa.HM.HM8.T2._fresh_unify_struct().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _fresh_unify()

boolean com.cliffc.aa.HM.HM8.T2._fresh_unify ( T2  that,
VStack  nongen,
Worklist  work 
)
private

Definition at line 968 of file HM8.java.

968  {
969  assert no_uf() && that.no_uf();
970  T2 prior = VARS.get(this);
971  if( prior!=null ) // Been there, done that
972  return prior.find()._unify(that,work); // Also 'prior' needs unification with 'that'
973  if( cycle_equals(that) ) return vput(that,false);
974 
975  if( that.is_err() ) return vput(that,false); // That is an error, ignore 'this' and no progress
976  if( this.is_err() ) return vput(that,_unify(that,work));
977 
978  // Attempting to pre-compute occurs_in, by computing 'is_fresh' in the
979  // Ident.hm() call does NOT work. The 'is_fresh' is for the top-layer
980  // only, not the internal layers. As soon as we structural recurse down
981  // a layer, 'is_fresh' does not correlate with an occurs_in check.
982  if( nongen_in(nongen) ) return vput(that,_unify(that,work)); // Famous 'occurs-check', switch to normal unify
983  if( this.is_leaf() ) return vput(that,false); // Lazy map LHS tvar to RHS
984  if( that.is_leaf() ) // RHS is a tvar; union with a deep copy of LHS
985  return work==null || vput(that,that.union(_fresh(nongen),work));
986  // Bases MEET cons in RHS
987  if( is_base() && that.is_base() ) return vput(that,fresh_base(that,work));
988  // Unify struct with nil
989  if( is_nil() && that.is_struct() ) return vput(that,or0(that,work));
990  if( that.is_nil() && is_struct() )
991  return work==null || vput(that,that.or0(_fresh(nongen),work));
992 
993  if( !Util.eq(_name,that._name) ||
994  (!is_struct() && _args.length != that._args.length) )
995  return work == null || vput(that,that._unify(make_err("Cannot unify "+this+" and "+that),work));
996 
997  // Structural recursion unification, lazy on LHS
998  vput(that,false); // Early set, to stop cycles
999  boolean progress = false;
1000  if( is_struct() )
1001  progress = _fresh_unify_struct(that,nongen,work);
1002  else {
1003  for( int i=0; i<_args.length; i++ ) {
1004  progress |= args(i)._fresh_unify(that.args(i),nongen,work);
1005  if( progress && work==null ) return true;
1006  }
1007  }
1008  return progress;
1009  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._fresh(), com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._fresh_unify_struct(), com.cliffc.aa.HM.HM8.T2._name, com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.T2.cycle_equals(), com.cliffc.aa.util.Util.eq(), com.cliffc.aa.HM.HM8.T2.find(), com.cliffc.aa.HM.HM8.T2.fresh_base(), com.cliffc.aa.HM.HM8.T2.is_base(), com.cliffc.aa.HM.HM8.T2.is_err(), com.cliffc.aa.HM.HM8.T2.is_leaf(), com.cliffc.aa.HM.HM8.T2.is_nil(), com.cliffc.aa.HM.HM8.T2.is_struct(), com.cliffc.aa.HM.HM8.T2.make_err(), com.cliffc.aa.HM.HM8.T2.no_uf(), com.cliffc.aa.HM.HM8.T2.nongen_in(), com.cliffc.aa.HM.HM8.T2.or0(), com.cliffc.aa.HM.HM8.T2.union(), com.cliffc.aa.HM.HM8.T2.VARS, and com.cliffc.aa.HM.HM8.T2.vput().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._fresh_unify_struct(), and com.cliffc.aa.HM.HM8.T2.fresh_unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _fresh_unify_struct()

boolean com.cliffc.aa.HM.HM8.T2._fresh_unify_struct ( T2  that,
VStack  nongen,
Worklist  work 
)
private

Definition at line 1012 of file HM8.java.

1012  {
1013  assert is_struct() && that.is_struct();
1014  if( _con!=null && that._con==null ) {
1015  if( work==null ) return true; // Will progress
1016  that._con = Type.NIL; // Allow nil
1017  }
1018  boolean progress = false;
1019  for( int i=0; i<_args.length; i++ ) {
1020  int idx = Util.find(that._ids,_ids[i]);
1021  if( idx == -1 ) { // Missing field on RHS
1022  if( work==null ) return true; // Will definitely make progress
1023  progress = true;
1024  that.add_fld(_ids[i],args(i)._fresh(nongen), work);
1025  } else
1026  progress |= args(i)._fresh_unify(that.args(idx),nongen,work);
1027  if( progress && work==null ) return true;
1028  }
1029  return progress;
1030  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2._fresh(), com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._ids, com.cliffc.aa.HM.HM8.T2.add_fld(), com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.util.Util.find(), com.cliffc.aa.HM.HM8.T2.is_struct(), and com.cliffc.aa.type.Type< T extends Type< T >.NIL.

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _get_dups()

VBitSet com.cliffc.aa.HM.HM8.T2._get_dups ( VBitSet  visit,
VBitSet  dups 
)
package

Definition at line 1197 of file HM8.java.

1197  {
1198  if( visit.tset(_uid) && no_uf() ) dups.set(_uid);
1199  else
1200  for( T2 t : _args )
1201  if( t!=null )
1202  t._get_dups(visit,dups);
1203  return dups;
1204  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._uid, com.cliffc.aa.HM.HM8.T2.no_uf(), and com.cliffc.aa.util.VBitSet.tset().

Referenced by com.cliffc.aa.HM.HM8.T2.get_dups().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _nongen_in()

boolean com.cliffc.aa.HM.HM8.T2._nongen_in ( VStack  nongen)
package

Definition at line 1095 of file HM8.java.

1095  {
1096  for( T2 t2 : nongen )
1097  if( _occurs_in_type(t2.find()) )
1098  return true;
1099  return false;
1100  }

References com.cliffc.aa.HM.HM8.T2._occurs_in_type().

Referenced by com.cliffc.aa.HM.HM8.T2.nongen_in().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _occurs_in()

boolean com.cliffc.aa.HM.HM8.T2._occurs_in ( Syntax  syn)
package

Definition at line 1070 of file HM8.java.

1070  {
1071  for( ; syn!=null; syn=syn._par )
1072  if( _occurs_in_type(syn.find()) )
1073  return true;
1074  return false;
1075  }

References com.cliffc.aa.HM.HM8.T2._occurs_in_type(), com.cliffc.aa.HM.HM8.Syntax._par, and com.cliffc.aa.HM.HM8.Syntax.find().

Referenced by com.cliffc.aa.HM.HM8.T2.occurs_in().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _occurs_in_type()

boolean com.cliffc.aa.HM.HM8.T2._occurs_in_type ( T2  x)
package

Definition at line 1077 of file HM8.java.

1077  {
1078  assert no_uf() && x.no_uf();
1079  if( x==this ) return true;
1080  if( ODUPS.tset(x._uid) ) return false; // Been there, done that
1081  if( !x.is_leaf() )
1082  for( int i=0; i<x._args.length; i++ )
1083  if( _occurs_in_type(x.args(i)) )
1084  return true;
1085  return false;
1086  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._uid, com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.T2.is_leaf(), com.cliffc.aa.HM.HM8.T2.no_uf(), com.cliffc.aa.HM.HM8.T2.ODUPS, and com.cliffc.aa.util.VBitSet.tset().

Referenced by com.cliffc.aa.HM.HM8.T2._nongen_in(), com.cliffc.aa.HM.HM8.T2._occurs_in(), and com.cliffc.aa.HM.HM8.T2.occurs_in_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _p()

SB com.cliffc.aa.HM.HM8.T2._p ( SB  sb,
VBitSet  visit,
VBitSet  dups 
)
private

Definition at line 1259 of file HM8.java.

1259  {
1260  assert no_uf();
1261  if( is_err () ) return sb.p( _con.getstr() );
1262  if( is_base() ) return sb.p(_con instanceof TypeMemPtr ? "str" : _con.toString() );
1263  if( is_leaf() || dups.get(_uid) ) { // Leafs or Duplicates? Take some effort to pretty-print cycles
1264  Integer ii = VNAMES.get(this);
1265  if( ii==null ) VNAMES.put(this,ii=VCNT++);
1266  // 2nd and later visits use the short form
1267  boolean later = !is_leaf() && visit.tset(_uid);
1268  if( later ) sb.p('$');
1269  char c = (char)('A'+ii);
1270  if( c<'V' ) sb.p(c); else sb.p("V"+ii);
1271  if( is_leaf() || later ) return sb;
1272  // First visit prints the V._uid and the type
1273  sb.p(':');
1274  }
1275 
1276  // Special printing for functions: { arg -> body }
1277  if( is_fun() ) {
1278  sb.p("{ ");
1279  for( int i=0; i<_args.length-1; i++ )
1280  args(i)._p(sb,visit,dups).p(" ");
1281  return args(_args.length-1)._p(sb.p("-> "),visit,dups).p(" }");
1282  }
1283 
1284  // Special printing for structures: @{ fld0 = body, fld1 = body, ... }
1285  if( is_struct() ) {
1286  _aliases.str(sb.p('*')).p("@{");
1287  for( int i=0; i<_ids.length; i++ )
1288  args(i)._p(sb.p(' ').p(_ids[i]).p(" = "),visit,dups).p(',');
1289  sb.unchar().p("}");
1290  if( _con==Type.NIL ) sb.p('?');
1291  return sb;
1292  }
1293 
1294  // Special printing for memory
1295  if( is_mem() ) {
1296  sb.p("[ ");
1297  for( int i=0; i<_args.length; i++ )
1298  if( _args[i] != null )
1299  args(i)._p(sb.p(i).p(':'),visit,dups).p(", ");
1300  return sb.unchar(2).p("]");
1301  }
1302 
1303  // Generic structural T2: (fun arg0 arg1...)
1304  sb.p("(").p(_name).p(" ");
1305  for( int i=0; i<_args.length; i++ ) args(i)._p(sb,visit,dups).p(" ");
1306  return sb.unchar().p(")");
1307  }

References com.cliffc.aa.HM.HM8.T2._aliases, com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2._ids, com.cliffc.aa.HM.HM8.T2._name, com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM8.T2._uid, com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.type.Type< T extends Type< T >.getstr(), com.cliffc.aa.HM.HM8.T2.is_base(), com.cliffc.aa.HM.HM8.T2.is_err(), com.cliffc.aa.HM.HM8.T2.is_fun(), com.cliffc.aa.HM.HM8.T2.is_leaf(), com.cliffc.aa.HM.HM8.T2.is_mem(), com.cliffc.aa.HM.HM8.T2.is_struct(), com.cliffc.aa.type.Type< T extends Type< T >.NIL, com.cliffc.aa.HM.HM8.T2.no_uf(), com.cliffc.aa.util.SB.p(), com.cliffc.aa.type.Bits< B extends Bits< B >.str(), com.cliffc.aa.type.Type< T extends Type< T >.toString(), com.cliffc.aa.util.VBitSet.tset(), com.cliffc.aa.util.SB.unchar(), com.cliffc.aa.HM.HM8.T2.VCNT, and com.cliffc.aa.HM.HM8.T2.VNAMES.

Referenced by com.cliffc.aa.HM.HM8.T2._p(), and com.cliffc.aa.HM.HM8.T2.p().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _unify()

boolean com.cliffc.aa.HM.HM8.T2._unify ( T2  that,
Worklist  work 
)
private

Definition at line 852 of file HM8.java.

852  {
853  assert no_uf() && that.no_uf();
854  if( this==that ) return false;
855 
856  // two errs union in either order, so keep lower uid (actually should merge error strings)
857  if( is_err() && that.is_err() && _uid<that._uid ) return that.union(this,work);
858  if( is_err() ) return that.union(this,work);
859  if( that.is_err() ) return union(that,work);
860 
861  // two leafs union in either order, so keep lower uid
862  if( is_leaf() && that.is_leaf() && _uid<that._uid ) return that.union(this,work);
863  if( is_leaf() ) return union(that,work);
864  if( that.is_leaf() ) return that.union(this,work);
865  if( is_base() && that.is_base() ) return unify_base(that,work);
866  // Unify struct with nil
867  if( is_nil() && that.is_struct() ) return or0(that,work);
868  if( that.is_nil() && is_struct() ) return that.or0(this,work);
869 
870  // Cycle check
871  long luid = dbl_uid(that); // long-unique-id formed from this and that
872  T2 rez = DUPS.get(luid);
873  assert rez==null || rez==that;
874  if( rez!=null ) return false; // Been there, done that
875  DUPS.put(luid,that); // Close cycles
876 
877  if( work==null ) return true; // Here we definitely make progress; bail out early if just testing
878 
879  if( !Util.eq(_name,that._name) )
880  return union_err(that,work,"Cannot unify "+this+" and "+that);
881  assert _args!=that._args; // Not expecting to share _args and not 'this'
882  if( !is_struct() && !is_mem() && _args.length != that._args.length )
883  return union_err(that,work,"Cannot unify "+this+" and "+that);
884 
885  // Structural recursion unification.
886 
887  // Structs unify only on matching fields, and add missing fields.
888  if( is_struct() ) {
889  // Unification for structs is more complicated; args are aligned via
890  // field names and not by position.
891  for( int i=0; i<_ids.length; i++ ) { // For all fields in LHS
892  int idx = Util.find(that._ids,_ids[i]);
893  if( idx==-1 ) that.add_fld(_ids[i],args(i), work); // Extend 'that' with matching field from 'this'
894  else args(i)._unify(that.args(idx),work); // Unify matching field
895  that = that.find(); // Recursively, might have already rolled this up
896  }
897  if( _con!=null && that._con==null ) that._con=Type.NIL;
898  that._aliases = that._aliases.meet(this._aliases);
899  if( this==that ) return true; // Might have unioned this-into-that recursively, exit now with progress
900 
901  // Memory add missing fields
902  } else if( is_mem() ) {
903  for( int i=0; i<_args.length; i++ ) // For all fields in LHS
904  if( _args[i]!=null )
905  that.unify_rec(i,args(i),work);
906 
907  // Normal structural unification
908  } else {
909  for( int i=0; i<_args.length; i++ ) // For all fields in LHS
910  args(i)._unify(that.args(i),work);
911  }
912  if( find().is_err() && !that.find().is_err() ) return that.find().union(find(),work); // Preserve errors
913  return find().union(that,work);
914  }

References com.cliffc.aa.HM.HM8.T2._aliases, com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2._ids, com.cliffc.aa.HM.HM8.T2._name, com.cliffc.aa.HM.HM8.T2._uid, com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM8.T2.add_fld(), com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.T2.dbl_uid(), com.cliffc.aa.HM.HM8.T2.DUPS, com.cliffc.aa.util.Util.eq(), com.cliffc.aa.util.Util.find(), com.cliffc.aa.HM.HM8.T2.find(), com.cliffc.aa.HM.HM8.T2.is_base(), com.cliffc.aa.HM.HM8.T2.is_err(), com.cliffc.aa.HM.HM8.T2.is_leaf(), com.cliffc.aa.HM.HM8.T2.is_mem(), com.cliffc.aa.HM.HM8.T2.is_nil(), com.cliffc.aa.HM.HM8.T2.is_struct(), com.cliffc.aa.type.Bits< B extends Bits< B >.meet(), com.cliffc.aa.type.Type< T extends Type< T >.NIL, com.cliffc.aa.HM.HM8.T2.no_uf(), com.cliffc.aa.HM.HM8.T2.or0(), com.cliffc.aa.HM.HM8.T2.unify_base(), com.cliffc.aa.HM.HM8.T2.unify_rec(), com.cliffc.aa.HM.HM8.T2.union(), and com.cliffc.aa.HM.HM8.T2.union_err().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._unify(), and com.cliffc.aa.HM.HM8.T2.unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_deps_work()

void com.cliffc.aa.HM.HM8.T2.add_deps_work ( Worklist  work)
package

Definition at line 1181 of file HM8.java.

1181 { assert UPDATE_VISIT.isEmpty(); add_deps_work_impl(work); UPDATE_VISIT.clear(); }

References com.cliffc.aa.HM.HM8.T2.add_deps_work_impl(), and com.cliffc.aa.HM.HM8.T2.UPDATE_VISIT.

Referenced by com.cliffc.aa.HM.HM8.Ident.add_work().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_deps_work_impl()

void com.cliffc.aa.HM.HM8.T2.add_deps_work_impl ( Worklist  work)
private

Definition at line 1182 of file HM8.java.

1182  {
1183  if( is_leaf() || _args.length==0 ) {
1184  work.addAll(_deps);
1185  } else {
1186  if( UPDATE_VISIT.tset(_uid) ) return;
1187  for( int i=0; i<_args.length; i++ )
1188  args(i).add_deps_work_impl(work);
1189  }
1190  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._deps, com.cliffc.aa.HM.HM8.T2._uid, com.cliffc.aa.HM.HM8.T2.add_deps_work_impl(), com.cliffc.aa.HM.HM8.Worklist.addAll(), com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.T2.is_leaf(), com.cliffc.aa.util.VBitSet.tset(), and com.cliffc.aa.HM.HM8.T2.UPDATE_VISIT.

Referenced by com.cliffc.aa.HM.HM8.T2.add_deps_work(), and com.cliffc.aa.HM.HM8.T2.add_deps_work_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_fld()

void com.cliffc.aa.HM.HM8.T2.add_fld ( String  id,
T2  fld,
Worklist  work 
)
private

Definition at line 916 of file HM8.java.

916  {
917  assert is_struct();
918  int len = _ids.length;
919  _ids = Arrays.copyOf( _ids,len+1);
920  _args = Arrays.copyOf(_args,len+1);
921  _ids [len] = id ;
922  _args[len] = fld;
923  work.addAll(_deps); //
924  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._deps, com.cliffc.aa.HM.HM8.T2._ids, com.cliffc.aa.HM.HM8.Worklist.addAll(), com.cliffc.aa.HM.HM8.id(), and com.cliffc.aa.HM.HM8.T2.is_struct().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify_struct(), and com.cliffc.aa.HM.HM8.T2._unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ args()

T2 com.cliffc.aa.HM.HM8.T2.args ( int  i)
package

◆ copy()

T2 com.cliffc.aa.HM.HM8.T2.copy ( )
package

Definition at line 754 of file HM8.java.

754 { return new T2(_name,_con,_ids,_aliases,new T2[_args.length]); }

References com.cliffc.aa.HM.HM8.T2._aliases, com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2._ids, com.cliffc.aa.HM.HM8.T2._name, and com.cliffc.aa.HM.HM8.T2.T2().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cycle_equals()

boolean com.cliffc.aa.HM.HM8.T2.cycle_equals ( T2  t)
package

Definition at line 1105 of file HM8.java.

1105  {
1106  assert CDUPS.isEmpty();
1107  boolean rez = _cycle_equals(t);
1108  CDUPS.clear();
1109  return rez;
1110  }

References com.cliffc.aa.HM.HM8.T2._cycle_equals(), and com.cliffc.aa.HM.HM8.T2.CDUPS.

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dbl_uid()

long com.cliffc.aa.HM.HM8.T2.dbl_uid ( T2  t)
private

Definition at line 926 of file HM8.java.

926 { return ((long)_uid<<32)|t._uid; }

References com.cliffc.aa.HM.HM8.T2._uid.

Referenced by com.cliffc.aa.HM.HM8.T2._unify().

Here is the caller graph for this function:

◆ debug_find()

T2 com.cliffc.aa.HM.HM8.T2.debug_find ( )
package

Definition at line 777 of file HM8.java.

777  {// Find, without the roll-up
778  if( !is_leaf() ) return this; // Shortcut
779  T2 u = _args[0];
780  if( u==null ) return this; // Shortcut
781  if( u.no_uf() ) return u; // Shortcut
782  // U-F fixup
783  while( u.is_leaf() && u._args[0]!=null ) u = u._args[0];
784  return u;
785  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2.is_leaf(), and com.cliffc.aa.HM.HM8.T2.no_uf().

Referenced by com.cliffc.aa.HM.HM8.Syntax.debug_find(), and com.cliffc.aa.HM.HM8.T2.find().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find()

T2 com.cliffc.aa.HM.HM8.T2.find ( )
package

Definition at line 788 of file HM8.java.

788  {
789  T2 u = debug_find();
790  if( u==this || u==_args[0] ) return u;
791  T2 v = this, v2;
792  while( v.is_leaf() && (v2=v._args[0])!=u ) { v._args[0]=u; v = v2; }
793  return u;
794  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2.debug_find(), and com.cliffc.aa.HM.HM8.T2.is_leaf().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM8.Ident.add_work(), com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.Syntax.find(), com.cliffc.aa.HM.HM8.hm(), com.cliffc.aa.HM.HM8.Ident.hm(), com.cliffc.aa.HM.HM8.Apply.hm(), com.cliffc.aa.HM.HM8.Field.hm(), com.cliffc.aa.HM.HM8.T2.p(), com.cliffc.aa.HM.HM8.Syntax.post(), com.cliffc.aa.HM.HM8.Syntax.pre(), com.cliffc.aa.HM.HM8.Lambda.targ(), and com.cliffc.aa.HM.HM8.Let.targ().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fresh_base()

boolean com.cliffc.aa.HM.HM8.T2.fresh_base ( T2  that,
Worklist  work 
)
private

Definition at line 937 of file HM8.java.

937  {
938  Type con = _con.meet(that._con);
939  if( con==that._con ) return false; // No progress
940  if( work==null ) return true;
941  that._con = con; // Yes progress, but no update if null work
942  return true;
943  }

References com.cliffc.aa.HM.HM8.T2._con, and com.cliffc.aa.type.Type< T extends Type< T >.meet().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fresh_unify()

boolean com.cliffc.aa.HM.HM8.T2.fresh_unify ( T2  that,
VStack  nongen,
Worklist  work 
)
package

Definition at line 957 of file HM8.java.

957  {
958  assert VARS.isEmpty() && DUPS.isEmpty();
959  int old = CNT;
960  boolean progress = _fresh_unify(that,nongen,work);
961  VARS.clear(); DUPS.clear();
962  if( work==null && old!=CNT && DEBUG_LEAKS )
963  throw unimpl("busted, made T2s but just testing");
964  return progress;
965  }

References com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2.CNT, com.cliffc.aa.HM.HM8.DEBUG_LEAKS, com.cliffc.aa.HM.HM8.T2.DUPS, and com.cliffc.aa.HM.HM8.T2.VARS.

Referenced by com.cliffc.aa.HM.HM8.Ident.hm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_dups()

VBitSet com.cliffc.aa.HM.HM8.T2.get_dups ( VBitSet  dups)
package

Definition at line 1196 of file HM8.java.

1196 { return _get_dups(new VBitSet(),dups); }

References com.cliffc.aa.HM.HM8.T2._get_dups().

Referenced by com.cliffc.aa.HM.HM8.T2.p(), com.cliffc.aa.HM.HM8.Syntax.p0(), and com.cliffc.aa.HM.HM8.T2.toString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getrec()

T2 com.cliffc.aa.HM.HM8.T2.getrec ( int  alias)
package

Definition at line 1145 of file HM8.java.

1145  {
1146  assert is_mem();
1147  if( alias >= _args.length ) return null;
1148  T2 str = args(alias);
1149  assert str==null || str.is_struct();
1150  return str;
1151  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.T2.is_mem(), and com.cliffc.aa.HM.HM8.T2.str().

Here is the call graph for this function:

◆ is_base()

boolean com.cliffc.aa.HM.HM8.T2.is_base ( )
package

Definition at line 770 of file HM8.java.

770 { return isa("Base") && _con!=null; }

References com.cliffc.aa.HM.HM8.T2._con, and com.cliffc.aa.HM.HM8.T2.isa().

Referenced by com.cliffc.aa.HM.HM8.T2._cycle_equals(), com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM8.T2.occurs_in(), and com.cliffc.aa.HM.HM8.T2.str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_err()

boolean com.cliffc.aa.HM.HM8.T2.is_err ( )
package

Definition at line 775 of file HM8.java.

775 { return isa("Err"); }

References com.cliffc.aa.HM.HM8.T2.isa().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM8.Lambda.hm(), com.cliffc.aa.HM.HM8.Apply.hm(), com.cliffc.aa.HM.HM8.Struct.hm(), com.cliffc.aa.HM.HM8.Field.hm(), and com.cliffc.aa.HM.HM8.T2.str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_fun()

boolean com.cliffc.aa.HM.HM8.T2.is_fun ( )
package

Definition at line 772 of file HM8.java.

772 { return isa("->"); }

References com.cliffc.aa.HM.HM8.T2.isa().

Referenced by com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM8.Lambda.hm(), com.cliffc.aa.HM.HM8.Apply.hm(), and com.cliffc.aa.HM.HM8.T2.str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_leaf()

boolean com.cliffc.aa.HM.HM8.T2.is_leaf ( )
package

Definition at line 767 of file HM8.java.

767 { return _name.charAt(0)=='V' || (isa("Base") && _con==null); }

References com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2._name, and com.cliffc.aa.HM.HM8.T2.isa().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh(), com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._occurs_in_type(), com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM8.T2.add_deps_work_impl(), com.cliffc.aa.HM.HM8.T2.debug_find(), com.cliffc.aa.HM.HM8.T2.find(), com.cliffc.aa.HM.HM8.T2.no_uf(), and com.cliffc.aa.HM.HM8.T2.str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_mem()

boolean com.cliffc.aa.HM.HM8.T2.is_mem ( )
package

Definition at line 774 of file HM8.java.

774 { return isa("[]"); }

References com.cliffc.aa.HM.HM8.T2.isa().

Referenced by com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM8.T2.getrec(), com.cliffc.aa.HM.HM8.T2.str(), and com.cliffc.aa.HM.HM8.T2.unify_rec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_nil()

boolean com.cliffc.aa.HM.HM8.T2.is_nil ( )
package

Definition at line 771 of file HM8.java.

771 { return isa("Nil"); }

References com.cliffc.aa.HM.HM8.T2.isa().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._unify(), and com.cliffc.aa.HM.HM8.T2.or0().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_struct()

boolean com.cliffc.aa.HM.HM8.T2.is_struct ( )
package

Definition at line 773 of file HM8.java.

773 { return isa("@{}"); }

References com.cliffc.aa.HM.HM8.T2.isa().

Referenced by com.cliffc.aa.HM.HM8.T2._cycle_equals(), com.cliffc.aa.HM.HM8.T2._cycle_equals_struct(), com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._fresh_unify_struct(), com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM8.T2.add_fld(), com.cliffc.aa.HM.HM8.T2.or0(), and com.cliffc.aa.HM.HM8.T2.str().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isa()

boolean com.cliffc.aa.HM.HM8.T2.isa ( String  name)
package

Definition at line 769 of file HM8.java.

769 { return Util.eq(_name,name); }

References com.cliffc.aa.HM.HM8.T2._name, and com.cliffc.aa.util.Util.eq().

Referenced by com.cliffc.aa.HM.HM8.T2.is_base(), com.cliffc.aa.HM.HM8.T2.is_err(), com.cliffc.aa.HM.HM8.T2.is_fun(), com.cliffc.aa.HM.HM8.T2.is_leaf(), com.cliffc.aa.HM.HM8.T2.is_mem(), com.cliffc.aa.HM.HM8.T2.is_nil(), and com.cliffc.aa.HM.HM8.T2.is_struct().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_base()

static T2 com.cliffc.aa.HM.HM8.T2.make_base ( Type  con)
staticpackage

Definition at line 748 of file HM8.java.

748 { return new T2("Base",con,null,null); }

References com.cliffc.aa.HM.HM8.T2.T2().

Referenced by com.cliffc.aa.HM.HM8.hm(), com.cliffc.aa.HM.HM8.Struct.hm(), and com.cliffc.aa.HM.HM8.Con.prep_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_err()

static T2 com.cliffc.aa.HM.HM8.T2.make_err ( String  s)
staticpackage

Definition at line 752 of file HM8.java.

752 { return new T2("Err",TypeStr.con(s.intern()),null,null); }

References com.cliffc.aa.type.TypeStr.con(), and com.cliffc.aa.HM.HM8.T2.T2().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.Apply.hm(), com.cliffc.aa.HM.HM8.Field.hm(), and com.cliffc.aa.HM.HM8.T2.union_err().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_fun()

static T2 com.cliffc.aa.HM.HM8.T2.make_fun ( T2...  args)
staticpackage

Definition at line 746 of file HM8.java.

746 { return new T2("->",null,null,null,args); }

References com.cliffc.aa.HM.HM8.T2.args(), and com.cliffc.aa.HM.HM8.T2.T2().

Referenced by com.cliffc.aa.HM.HM8.hm(), com.cliffc.aa.HM.HM8.Lambda.hm(), and com.cliffc.aa.HM.HM8.Apply.hm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_leaf()

static T2 com.cliffc.aa.HM.HM8.T2.make_leaf ( )
staticpackage

Definition at line 747 of file HM8.java.

747 { return new T2("V"+CNT,null,null,null,new T2[1]); }

References com.cliffc.aa.HM.HM8.T2.CNT, and com.cliffc.aa.HM.HM8.T2.T2().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh(), com.cliffc.aa.HM.HM8.hm(), com.cliffc.aa.HM.HM8.Lambda.Lambda(), com.cliffc.aa.HM.HM8.Let.Let(), com.cliffc.aa.HM.HM8.Ident.prep_tree(), com.cliffc.aa.HM.HM8.Lambda.prep_tree(), com.cliffc.aa.HM.HM8.Apply.prep_tree(), and com.cliffc.aa.HM.HM8.Field.prep_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_mem()

static T2 com.cliffc.aa.HM.HM8.T2.make_mem ( )
staticpackage

Definition at line 751 of file HM8.java.

751 { return new T2("[]" ,null,null,null,new T2[1]); }

References com.cliffc.aa.HM.HM8.T2.T2().

Referenced by com.cliffc.aa.HM.HM8.Syntax.prep_tree_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_nil()

static T2 com.cliffc.aa.HM.HM8.T2.make_nil ( )
staticpackage

Definition at line 749 of file HM8.java.

749 { return new T2("Nil",null,null,null); }

References com.cliffc.aa.HM.HM8.T2.T2().

Referenced by com.cliffc.aa.HM.HM8.hm(), and com.cliffc.aa.HM.HM8.Con.prep_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_struct()

static T2 com.cliffc.aa.HM.HM8.T2.make_struct ( String[]  ids,
BitsAlias  aliases,
T2[]  flds 
)
staticpackage

Definition at line 750 of file HM8.java.

750 { return new T2("@{}", null,ids,aliases,flds); }

References com.cliffc.aa.HM.HM8.T2.T2().

Referenced by com.cliffc.aa.HM.HM8.Struct.hm(), com.cliffc.aa.HM.HM8.Field.hm(), and com.cliffc.aa.HM.HM8.Struct.prep_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ no_uf()

boolean com.cliffc.aa.HM.HM8.T2.no_uf ( )
package

Definition at line 768 of file HM8.java.

768 { return !is_leaf() || _args[0]==null; }

References com.cliffc.aa.HM.HM8.T2._args, and com.cliffc.aa.HM.HM8.T2.is_leaf().

Referenced by com.cliffc.aa.HM.HM8.T2._cycle_equals(), com.cliffc.aa.HM.HM8.T2._fresh(), com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._get_dups(), com.cliffc.aa.HM.HM8.T2._occurs_in_type(), com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM8.T2.debug_find(), com.cliffc.aa.HM.HM8.T2.push_update_impl(), and com.cliffc.aa.HM.HM8.T2.union().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nongen_in()

boolean com.cliffc.aa.HM.HM8.T2.nongen_in ( VStack  syn)
package

Definition at line 1088 of file HM8.java.

1088  {
1089  if( syn==null ) return false;
1090  assert ODUPS.isEmpty();
1091  boolean found = _nongen_in(syn);
1092  ODUPS.clear();
1093  return found;
1094  }

References com.cliffc.aa.HM.HM8.T2._nongen_in(), and com.cliffc.aa.HM.HM8.T2.ODUPS.

Referenced by com.cliffc.aa.HM.HM8.T2._fresh(), and com.cliffc.aa.HM.HM8.T2._fresh_unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ occurs_in()

boolean com.cliffc.aa.HM.HM8.T2.occurs_in ( Syntax  syn)
package

Definition at line 1056 of file HM8.java.

1056  {
1057  if( syn==null ) return false;
1058  if( is_base() ) return false;
1059  assert ODUPS.isEmpty();
1060  boolean found = _occurs_in(syn);
1061  ODUPS.clear();
1062  return found;
1063  }

References com.cliffc.aa.HM.HM8.T2._occurs_in(), com.cliffc.aa.HM.HM8.T2.is_base(), and com.cliffc.aa.HM.HM8.T2.ODUPS.

Referenced by com.cliffc.aa.HM.HM8.Ident.add_work().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ occurs_in_type()

boolean com.cliffc.aa.HM.HM8.T2.occurs_in_type ( T2  x)
package

Definition at line 1064 of file HM8.java.

1064  {
1065  assert ODUPS.isEmpty();
1066  boolean found = _occurs_in_type(x);
1067  ODUPS.clear();
1068  return found;
1069  }

References com.cliffc.aa.HM.HM8.T2._occurs_in_type(), and com.cliffc.aa.HM.HM8.T2.ODUPS.

Here is the call graph for this function:

◆ or0()

boolean com.cliffc.aa.HM.HM8.T2.or0 ( T2  that,
Worklist  work 
)
package

Definition at line 825 of file HM8.java.

825  {
826  assert is_nil() && that.is_struct();
827  if( work==null ) return that._con==null; // Progress if moving from not-nil to nilable
828  if( that._con == Type.NIL ) return false;// Already nilable
829  _args = new T2[1]; // Room for U-F
830  that._con=Type.NIL;
831  return union(that,work);
832  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2.is_nil(), com.cliffc.aa.HM.HM8.T2.is_struct(), and com.cliffc.aa.type.Type< T extends Type< T >.NIL.

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify(), and com.cliffc.aa.HM.HM8.T2._unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p() [1/2]

String com.cliffc.aa.HM.HM8.T2.p ( )

Definition at line 1255 of file HM8.java.

1255 { return p(get_dups(new VBitSet())); }

References com.cliffc.aa.HM.HM8.T2.get_dups(), and com.cliffc.aa.HM.HM8.T2.p().

Referenced by com.cliffc.aa.HM.HM8.T2.p().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ p() [2/2]

String com.cliffc.aa.HM.HM8.T2.p ( VBitSet  dups)
package

Definition at line 1258 of file HM8.java.

1258 { VCNT=0; VNAMES.clear(); return find()._p(new SB(), new VBitSet(), dups).toString(); }

References com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM8.T2.find(), com.cliffc.aa.util.SB.toString(), com.cliffc.aa.HM.HM8.T2.VCNT, and com.cliffc.aa.HM.HM8.T2.VNAMES.

Here is the call graph for this function:

◆ prim()

static T2 com.cliffc.aa.HM.HM8.T2.prim ( String  name,
T2...  args 
)
staticpackage

Definition at line 753 of file HM8.java.

753 { return new T2(name,null,null,null,args); }

References com.cliffc.aa.HM.HM8.T2.args(), and com.cliffc.aa.HM.HM8.T2.T2().

Referenced by com.cliffc.aa.HM.HM8.hm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_update() [1/2]

T2 com.cliffc.aa.HM.HM8.T2.push_update ( Ary< Syntax as)
package

Definition at line 1169 of file HM8.java.

1169 { if( as != null ) for( Syntax a : as ) push_update(a); return this; }

References com.cliffc.aa.HM.HM8.T2.push_update().

Referenced by com.cliffc.aa.HM.HM8.Field.hm(), com.cliffc.aa.HM.HM8.Lambda.prep_lookup_deps(), com.cliffc.aa.HM.HM8.Let.prep_lookup_deps(), and com.cliffc.aa.HM.HM8.T2.push_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_update() [2/2]

void com.cliffc.aa.HM.HM8.T2.push_update ( Syntax  a)
package

Definition at line 1170 of file HM8.java.

1170 { assert UPDATE_VISIT.isEmpty(); push_update_impl(a); UPDATE_VISIT.clear(); }

References com.cliffc.aa.HM.HM8.T2.push_update_impl(), and com.cliffc.aa.HM.HM8.T2.UPDATE_VISIT.

Here is the call graph for this function:

◆ push_update_impl()

void com.cliffc.aa.HM.HM8.T2.push_update_impl ( Syntax  a)
private

Definition at line 1171 of file HM8.java.

1171  {
1172  assert no_uf();
1173  if( UPDATE_VISIT.tset(_uid) ) return;
1174  if( _deps==null ) _deps = new Ary<>(Syntax.class);
1175  if( _deps.find(a)==-1 ) _deps.push(a);
1176  for( int i=0; i<_args.length; i++ )
1177  if( _args[i]!=null )
1178  args(i).push_update_impl(a);
1179  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._deps, com.cliffc.aa.HM.HM8.T2._uid, com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.T2.no_uf(), com.cliffc.aa.HM.HM8.T2.push_update_impl(), com.cliffc.aa.util.VBitSet.tset(), and com.cliffc.aa.HM.HM8.T2.UPDATE_VISIT.

Referenced by com.cliffc.aa.HM.HM8.T2.push_update(), and com.cliffc.aa.HM.HM8.T2.push_update_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

static void com.cliffc.aa.HM.HM8.T2.reset ( )
staticpackage

Definition at line 1309 of file HM8.java.

1309 { CNT=0; DUPS.clear(); VARS.clear(); ODUPS.clear(); CDUPS.clear(); UPDATE_VISIT.clear(); }

References com.cliffc.aa.HM.HM8.T2.CDUPS, com.cliffc.aa.HM.HM8.T2.CNT, com.cliffc.aa.HM.HM8.T2.DUPS, com.cliffc.aa.HM.HM8.T2.ODUPS, com.cliffc.aa.HM.HM8.T2.UPDATE_VISIT, and com.cliffc.aa.HM.HM8.T2.VARS.

Referenced by com.cliffc.aa.HM.HM8.reset().

Here is the caller graph for this function:

◆ str() [1/2]

static SB com.cliffc.aa.HM.HM8.T2.str ( SB  sb,
VBitSet  visit,
T2  t,
VBitSet  dups 
)
staticprivate

Definition at line 1252 of file HM8.java.

1252 { return t==null ? sb.p("_") : t.str(sb,visit,dups); }

References com.cliffc.aa.util.SB.p(), and com.cliffc.aa.HM.HM8.T2.str().

Here is the call graph for this function:

◆ str() [2/2]

SB com.cliffc.aa.HM.HM8.T2.str ( SB  sb,
VBitSet  visit,
VBitSet  dups 
)
package

Definition at line 1209 of file HM8.java.

1209  {
1210  if( is_err() ) return sb.p(_con.getstr());
1211  if( is_leaf() || is_base() ) {
1212  if( is_base() ) sb.p(_con instanceof TypeMemPtr ? "str" : _con.toString()); else sb.p(_name);
1213  return _args.length==0 || _args[0]==null ? sb : _args[0].str(sb.p(">>"), visit, dups);
1214  }
1215  boolean dup = dups.get(_uid);
1216  if( dup ) sb.p("$V").p(_uid);
1217  if( visit.tset(_uid) && dup ) return sb;
1218  if( dup ) sb.p(':');
1219 
1220  // Special printing for functions
1221  if( is_fun() ) {
1222  sb.p("{ ");
1223  for( int i=0; i<_args.length-1; i++ )
1224  str(sb,visit,_args[i],dups).p(" ");
1225  return str(sb.p("-> "),visit,_args[_args.length-1],dups).p(" }");
1226  }
1227 
1228  // Special printing for structures
1229  if( is_struct() ) {
1230  _aliases.str(sb.p('*')).p("@{");
1231  for( int i=0; i<_ids.length; i++ )
1232  str(sb.p(' ').p(_ids[i]).p(" = "),visit,_args[i],dups).p(',');
1233  sb.unchar().p("}");
1234  if( _con==Type.NIL ) sb.p('?');
1235  return sb;
1236  }
1237 
1238  // Special printing for memory
1239  if( is_mem() ) {
1240  sb.p("[ ");
1241  for( int i=0; i<_args.length; i++ )
1242  if( _args[i] != null )
1243  _args[i].str(sb.p(i).p(':'),visit,dups).p(", ");
1244  return sb.unchar(2).p("]");
1245  }
1246 
1247  // Generic structural T2
1248  sb.p("(").p(_name).p(" ");
1249  for( T2 t : _args ) str(sb,visit,t,dups).p(" ");
1250  return sb.unchar().p(")");
1251  }

References com.cliffc.aa.HM.HM8.T2._aliases, com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, com.cliffc.aa.HM.HM8.T2._ids, com.cliffc.aa.HM.HM8.T2._name, com.cliffc.aa.HM.HM8.T2._uid, com.cliffc.aa.type.Type< T extends Type< T >.getstr(), com.cliffc.aa.HM.HM8.T2.is_base(), com.cliffc.aa.HM.HM8.T2.is_err(), com.cliffc.aa.HM.HM8.T2.is_fun(), com.cliffc.aa.HM.HM8.T2.is_leaf(), com.cliffc.aa.HM.HM8.T2.is_mem(), com.cliffc.aa.HM.HM8.T2.is_struct(), com.cliffc.aa.type.Type< T extends Type< T >.NIL, com.cliffc.aa.util.SB.p(), com.cliffc.aa.type.Bits< B extends Bits< B >.str(), com.cliffc.aa.HM.HM8.T2.str(), com.cliffc.aa.type.Type< T extends Type< T >.toString(), com.cliffc.aa.util.VBitSet.tset(), and com.cliffc.aa.util.SB.unchar().

Referenced by com.cliffc.aa.HM.HM8.T2.getrec(), com.cliffc.aa.HM.HM8.Syntax.p0(), com.cliffc.aa.HM.HM8.VStack.str(), com.cliffc.aa.HM.HM8.T2.str(), com.cliffc.aa.HM.HM8.T2.toString(), and com.cliffc.aa.HM.HM8.T2.unify_rec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

String com.cliffc.aa.HM.HM8.T2.toString ( )

Definition at line 1208 of file HM8.java.

1208 { return str(new SB(), new VBitSet(), get_dups(new VBitSet()) ).toString(); }

References com.cliffc.aa.HM.HM8.T2.get_dups(), com.cliffc.aa.HM.HM8.T2.str(), and com.cliffc.aa.util.SB.toString().

Here is the call graph for this function:

◆ unify()

boolean com.cliffc.aa.HM.HM8.T2.unify ( T2  that,
Worklist  work 
)
package

Definition at line 841 of file HM8.java.

841  {
842  if( this==that ) return false;
843  assert DUPS.isEmpty();
844  boolean progress = _unify(that,work);
845  DUPS.clear();
846  return progress;
847  }

References com.cliffc.aa.HM.HM8.T2._unify(), and com.cliffc.aa.HM.HM8.T2.DUPS.

Referenced by com.cliffc.aa.HM.HM8.hm(), com.cliffc.aa.HM.HM8.Lambda.hm(), com.cliffc.aa.HM.HM8.Let.hm(), com.cliffc.aa.HM.HM8.Apply.hm(), com.cliffc.aa.HM.HM8.Struct.hm(), com.cliffc.aa.HM.HM8.Field.hm(), and com.cliffc.aa.HM.HM8.T2.unify_rec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unify_base()

boolean com.cliffc.aa.HM.HM8.T2.unify_base ( T2  that,
Worklist  work 
)
private

Definition at line 928 of file HM8.java.

928  {
929  Type con = _con.meet(that._con);
930  if( con==that._con ) return false; // No progress
931  if( work==null ) return true;
932  that._con = con; // Yes progress, but no update if null work
933  _args = new T2[1]; // Room for a forwarding pointer
934  _con=null; // Flip from 'Base' to 'Leaf'
935  return union(that,work);
936  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._con, and com.cliffc.aa.type.Type< T extends Type< T >.meet().

Referenced by com.cliffc.aa.HM.HM8.T2._unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unify_rec()

boolean com.cliffc.aa.HM.HM8.T2.unify_rec ( int  alias,
T2  str,
Worklist  work 
)
package

Definition at line 1154 of file HM8.java.

1154  {
1155  assert is_mem() && str.is_struct();
1156  while( alias >= _args.length )
1157  _args = Arrays.copyOf(_args,_args.length<<1);
1158  if( _args[alias] != null ) return args(alias).unify(str,work);
1159  if( work!=null ) _args[alias] = str;
1160  return true;
1161  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2.args(), com.cliffc.aa.HM.HM8.T2.is_mem(), com.cliffc.aa.HM.HM8.T2.str(), and com.cliffc.aa.HM.HM8.T2.unify().

Referenced by com.cliffc.aa.HM.HM8.T2._unify(), and com.cliffc.aa.HM.HM8.Struct.hm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ union()

boolean com.cliffc.aa.HM.HM8.T2.union ( T2  that,
Worklist  work 
)
package

Definition at line 804 of file HM8.java.

804  {
805  assert no_uf(); // Cannot union twice
806  if( this==that ) return false;
807  if( work==null ) return true; // Report progress without changing
808  // Worklist: put updates on the worklist for revisiting
809  if( _deps != null ) {
810  work.addAll(_deps); // Re-Apply
811  // Merge update lists, for future unions
812  if( that._deps==null && that.is_leaf() ) that._deps = _deps;
813  else
814  for( Syntax dep : _deps ) that.push_update(dep);
815  _deps = null;
816  }
817  if( _args.length==0 ) _args = new T2[1];
818  _args[0] = that; // U-F update
819  if( _name.charAt(0)!='V' ) _name = "V"+_uid; // Flag as a leaf & unified
820  assert !no_uf();
821  return true;
822  }

References com.cliffc.aa.HM.HM8.T2._args, com.cliffc.aa.HM.HM8.T2._deps, com.cliffc.aa.HM.HM8.T2._name, com.cliffc.aa.HM.HM8.T2._uid, and com.cliffc.aa.HM.HM8.T2.no_uf().

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify(), com.cliffc.aa.HM.HM8.T2._unify(), and com.cliffc.aa.HM.HM8.T2.union_err().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ union_err()

boolean com.cliffc.aa.HM.HM8.T2.union_err ( T2  that,
Worklist  work,
String  msg 
)
private

Definition at line 944 of file HM8.java.

944  {
945  union(that,work);
946  return that.union(make_err(msg),work);
947  }

References com.cliffc.aa.HM.HM8.T2.make_err(), and com.cliffc.aa.HM.HM8.T2.union().

Referenced by com.cliffc.aa.HM.HM8.T2._unify().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vput()

boolean com.cliffc.aa.HM.HM8.T2.vput ( T2  that,
boolean  progress 
)
private

Definition at line 1032 of file HM8.java.

1032 { VARS.put(this,that); return progress; }

References com.cliffc.aa.HM.HM8.T2.VARS.

Referenced by com.cliffc.aa.HM.HM8.T2._fresh_unify().

Here is the caller graph for this function:

Member Data Documentation

◆ _aliases

◆ _args

◆ _con

◆ _deps

◆ _ids

◆ _name

◆ _uid

◆ CDUPS

final HashMap<T2,T2> com.cliffc.aa.HM.HM8.T2.CDUPS = new HashMap<>()
staticprivate

◆ CNT

◆ DUPS

final HashMap<Long,T2> com.cliffc.aa.HM.HM8.T2.DUPS = new HashMap<>()
staticprivate

◆ ODUPS

◆ UPDATE_VISIT

◆ VARS

final HashMap<T2,T2> com.cliffc.aa.HM.HM8.T2.VARS = new HashMap<>()
staticprivate

◆ VCNT

int com.cliffc.aa.HM.HM8.T2.VCNT
staticprivate

Definition at line 1256 of file HM8.java.

Referenced by com.cliffc.aa.HM.HM8.T2._p(), and com.cliffc.aa.HM.HM8.T2.p().

◆ VNAMES

final HashMap<T2,Integer> com.cliffc.aa.HM.HM8.T2.VNAMES = new HashMap<>()
staticprivate

Definition at line 1257 of file HM8.java.

Referenced by com.cliffc.aa.HM.HM8.T2._p(), and com.cliffc.aa.HM.HM8.T2.p().


The documentation for this class was generated from the following file:
com.cliffc.aa.HM.HM8.T2.union_err
boolean union_err(T2 that, Worklist work, String msg)
Definition: HM8.java:944
com.cliffc.aa.HM.HM8.id
static String id()
Definition: HM8.java:155
com.cliffc.aa.HM.HM8.T2.add_deps_work_impl
void add_deps_work_impl(Worklist work)
Definition: HM8.java:1182
com.cliffc.aa.type.Bits.str
SB str(SB sb)
Definition: Bits.java:134
com.cliffc.aa.HM.HM8.T2._cycle_equals_struct
boolean _cycle_equals_struct(T2 t)
Definition: HM8.java:1133
com.cliffc.aa.HM.HM8.T2.CNT
static int CNT
Definition: HM8.java:722
com.cliffc.aa.util.Util.find
static int find(int[] es, int e)
Definition: Util.java:6
com.cliffc.aa.util.Util.eq
static boolean eq(String s0, String s1)
Definition: Util.java:16
com.cliffc.aa.HM.HM8.T2.is_nil
boolean is_nil()
Definition: HM8.java:771
com.cliffc.aa.HM.HM8.T2.is_fun
boolean is_fun()
Definition: HM8.java:772
com.cliffc.aa.type.Type.toString
final String toString()
Definition: Type.java:127
com.cliffc.aa.HM.HM8.T2.is_mem
boolean is_mem()
Definition: HM8.java:774
com.cliffc.aa.HM.HM8.T2.args
T2 args(int i)
Definition: HM8.java:796
com.cliffc.aa.HM.HM8.T2.DUPS
static final HashMap< Long, T2 > DUPS
Definition: HM8.java:840
com.cliffc.aa.HM.HM8.T2._cycle_equals
boolean _cycle_equals(T2 t)
Definition: HM8.java:1111
com.cliffc.aa.HM.HM8.T2.push_update
T2 push_update(Ary< Syntax > as)
Definition: HM8.java:1169
com.cliffc.aa.HM.HM8.T2.union
boolean union(T2 that, Worklist work)
Definition: HM8.java:804
com.cliffc.aa.HM.HM8.T2.get_dups
VBitSet get_dups(VBitSet dups)
Definition: HM8.java:1196
com.cliffc.aa.HM.HM8.T2.VNAMES
static final HashMap< T2, Integer > VNAMES
Definition: HM8.java:1257
com.cliffc.aa.type.Type
an implementation of language AA
Definition: Type.java:94
com.cliffc.aa.HM.HM8.T2.T2
T2(@NotNull String name, Type con, String[] ids, BitsAlias aliases, T2 @NotNull ... args)
Definition: HM8.java:756
com.cliffc.aa.util.Ary
Definition: Ary.java:11
com.cliffc.aa.HM.HM8.T2._fresh_unify_struct
boolean _fresh_unify_struct(T2 that, VStack nongen, Worklist work)
Definition: HM8.java:1012
com.cliffc.aa.HM.HM8.T2.unify
boolean unify(T2 that, Worklist work)
Definition: HM8.java:841
com.cliffc.aa.HM.HM8.T2.nongen_in
boolean nongen_in(VStack syn)
Definition: HM8.java:1088
com.cliffc.aa.type.Type.meet
final Type meet(Type t)
Definition: Type.java:412
com.cliffc.aa.HM.HM8.T2._args
T2[] _args
Definition: HM8.java:731
com.cliffc.aa.HM.HM8.T2._occurs_in_type
boolean _occurs_in_type(T2 x)
Definition: HM8.java:1077
com.cliffc.aa.HM.HM8.T2._occurs_in
boolean _occurs_in(Syntax syn)
Definition: HM8.java:1070
com.cliffc.aa.util.SB.unchar
SB unchar()
Definition: SB.java:58
com.cliffc.aa.util.VBitSet.tset
boolean tset(int idx)
Definition: VBitSet.java:7
com.cliffc.aa.HM.HM8.T2.debug_find
T2 debug_find()
Definition: HM8.java:777
com.cliffc.aa.HM.HM8.T2.UPDATE_VISIT
static final VBitSet UPDATE_VISIT
Definition: HM8.java:1168
com.cliffc.aa.HM.HM8.T2._fresh
T2 _fresh(VStack nongen)
Definition: HM8.java:1035
com.cliffc.aa.HM.HM8.T2.is_leaf
boolean is_leaf()
Definition: HM8.java:767
com.cliffc.aa.HM.HM8.T2._aliases
BitsAlias _aliases
Definition: HM8.java:740
com.cliffc.aa.HM.HM8.DEBUG_LEAKS
static boolean DEBUG_LEAKS
Definition: HM8.java:26
com.cliffc.aa.HM.HM8.T2.CDUPS
static final HashMap< T2, T2 > CDUPS
Definition: HM8.java:1104
com.cliffc.aa.util.Util
Definition: Util.java:5
com.cliffc.aa.HM.HM8.T2.vput
boolean vput(T2 that, boolean progress)
Definition: HM8.java:1032
com.cliffc.aa.HM.HM8.T2.VARS
static final HashMap< T2, T2 > VARS
Definition: HM8.java:956
com.cliffc.aa.HM.HM8.T2.str
SB str(SB sb, VBitSet visit, VBitSet dups)
Definition: HM8.java:1209
com.cliffc.aa.HM.HM8.T2.dbl_uid
long dbl_uid(T2 t)
Definition: HM8.java:926
com.cliffc.aa.type.TypeStr.con
static TypeStr con(String con)
Definition: TypeStr.java:42
com.cliffc.aa.HM.HM8.T2.copy
T2 copy()
Definition: HM8.java:754
com.cliffc.aa.HM.HM8.T2.unify_base
boolean unify_base(T2 that, Worklist work)
Definition: HM8.java:928
com.cliffc.aa.HM.HM8.T2.no_uf
boolean no_uf()
Definition: HM8.java:768
com.cliffc.aa.HM.HM8.T2._con
Type _con
Definition: HM8.java:734
com.cliffc.aa.HM.HM8.T2.make_err
static T2 make_err(String s)
Definition: HM8.java:752
com.cliffc.aa.type.TypeStr
Definition: TypeStr.java:14
com.cliffc.aa.HM.HM8.T2.p
String p()
Definition: HM8.java:1255
com.cliffc.aa.HM.HM8.T2._p
SB _p(SB sb, VBitSet visit, VBitSet dups)
Definition: HM8.java:1259
com.cliffc.aa.util.VBitSet
Definition: VBitSet.java:5
com.cliffc.aa.util.SB
Tight/tiny StringBuilder wrapper.
Definition: SB.java:8
com.cliffc.aa.type.Type.NIL
static final Type NIL
Definition: Type.java:332
com.cliffc.aa.HM.HM8.T2.is_err
boolean is_err()
Definition: HM8.java:775
com.cliffc.aa.HM.HM8.T2.is_struct
boolean is_struct()
Definition: HM8.java:773
com.cliffc.aa.HM.HM8.T2.isa
boolean isa(String name)
Definition: HM8.java:769
com.cliffc.aa.HM.HM8.T2.VCNT
static int VCNT
Definition: HM8.java:1256
com.cliffc.aa.HM.HM8.T2.fresh_base
boolean fresh_base(T2 that, Worklist work)
Definition: HM8.java:937
com.cliffc.aa.HM.HM8.T2.push_update_impl
void push_update_impl(Syntax a)
Definition: HM8.java:1171
com.cliffc.aa.util.SB.p
SB p(String s)
Definition: SB.java:13
com.cliffc.aa.HM.HM8.T2._get_dups
VBitSet _get_dups(VBitSet visit, VBitSet dups)
Definition: HM8.java:1197
com.cliffc.aa.HM.HM8.T2._unify
boolean _unify(T2 that, Worklist work)
Definition: HM8.java:852
com.cliffc.aa.HM.HM8.T2._deps
Ary< Syntax > _deps
Definition: HM8.java:743
com.cliffc.aa.HM.HM8.T2._name
String _name
Definition: HM8.java:728
com.cliffc.aa.HM.HM8.T2.ODUPS
static final VBitSet ODUPS
Definition: HM8.java:1055
com.cliffc.aa.HM.HM8.T2.find
T2 find()
Definition: HM8.java:788
com.cliffc.aa.HM.HM8.T2._ids
String[] _ids
Definition: HM8.java:737
com.cliffc.aa.HM.HM8.T2.is_base
boolean is_base()
Definition: HM8.java:770
com.cliffc.aa.HM.HM8.T2.or0
boolean or0(T2 that, Worklist work)
Definition: HM8.java:825
com.cliffc.aa.HM.HM8.T2._fresh_unify
boolean _fresh_unify(T2 that, VStack nongen, Worklist work)
Definition: HM8.java:968
com.cliffc.aa.type.Type.getstr
String getstr()
Definition: Type.java:806
com.cliffc.aa.util.SB.toString
String toString()
Definition: SB.java:62
com.cliffc.aa.HM.HM8.T2._nongen_in
boolean _nongen_in(VStack nongen)
Definition: HM8.java:1095
com.cliffc.aa.type.TypeMemPtr
Definition: TypeMemPtr.java:14
com.cliffc.aa.HM.HM8.T2._uid
final int _uid
Definition: HM8.java:723
com.cliffc.aa.HM.HM8.T2.cycle_equals
boolean cycle_equals(T2 t)
Definition: HM8.java:1105