Go to the documentation of this file. 1 package com.cliffc.aa.HM;
5 import org.jetbrains.annotations.
NotNull;
86 static final HashMap<String,PrimSyn>
PRIMSYNS =
new HashMap<>();
91 static final boolean DO_HM =
true;
94 public static Root hm( String sprog ) {
98 for(
PrimSyn prim :
new PrimSyn[]{
new If(),
new Pair1(),
new Pair(),
new EQ(),
new EQ0(),
new Mul(),
new Add(),
new Dec(),
new Str(),
new Triple(),
new Factor(),
new IsEmpty(),
new NotNil()} )
105 int cnt_syns = prog.
prep_tree(
null,
null,work);
106 int init_T2s =
T2.
CNT;
108 while( work.
len()>0 ) {
110 assert work.
_cnt<2000;
127 if( syn.
_par!=
null ) {
139 System.out.println(
"Initial T2s: "+init_T2s+
", Prog size: "+cnt_syns+
", worklist iters: "+work.
_cnt+
", T2s: "+
T2.
CNT);
155 private static int X;
156 private static byte[]
BUF;
162 if(
skipWS() != -1 )
throw unimpl(
"Junk at end of program: "+
new String(
BUF,
X,
BUF.length-
X));
164 return new Root(prog);
167 if(
skipWS()==-1 )
return null;
178 if( fun instanceof
If &&
179 args.
at(0) instanceof
Ident ) {
201 return prim==
null ?
new Ident(
id) : prim.
make();
219 if( fld==
null )
throw unimpl(
"Missing term for field "+
id);
228 throw unimpl(
"Unknown syntax");
240 private static String
id() {
245 if( s.length()==0 )
throw unimpl(
"Missing id");
252 sum = sum*10+
BUF[
X++]-
'0';
259 float f = (float)sum;
260 f = f + (
BUF[
X++]-
'0')/10.0f;
265 while(
X<
BUF.length &&
BUF[
X]!=
'"' )
X++;
272 private static boolean isWS (
byte c) {
return c ==
' ' || c ==
'\t' || c ==
'\n' || c ==
'\r'; }
273 private static boolean isDigit (
byte c) {
return '0' <= c && c <=
'9'; }
274 private static boolean isAlpha0(
byte c) {
return (
'a'<=c && c <=
'z') || (
'A'<=c && c <=
'Z') || (c==
'_') || (c==
'*') || (c==
'?') || (c==
'+'); }
275 private static boolean isAlpha1(
byte c) {
return isAlpha0(c) || (
'0'<=c && c <=
'9') || (c==
'/'); }
276 private static void require(
char c) {
if(
skipWS()!=c )
throw unimpl(
"Missing '"+c+
"'");
X++; }
280 for(
int i=0; i<s.length(); i++ )
281 if(
X+i >=
BUF.length ||
BUF[
X+i]!=s.charAt(i) )
282 throw unimpl(
"Missing '"+s+
"'");
291 private final HashSet<Syntax>
_work =
new HashSet<>();
320 for(
VStack vs =
this; vs!=
null; vs = vs.
_par )
321 vs._nongen.get_dups(dups);
330 @NotNull @Override
public Iterator<T2>
iterator() {
return new Iter(); }
331 private class Iter implements Iterator<T2> {
382 if( work.
has(
this) )
return true;
401 return p2(sb.
ii(1),dups).
di(1);
456 syn.prep_lookup_deps(
this);
460 if( syn instanceof
Lambda ) {
464 }
else if( syn instanceof
Let ) {
470 throw new RuntimeException(
"Parse error, "+
_name+
" is undefined in "+
_par);
502 for( String arg :
_args ) sb.
p(arg).
p(
' ');
507 for(
int i=0; i<
_args.length; i++ ) {
513 return sb.
p(
" -> ... } ");
518 boolean progress =
false;
521 if( old.
is_err() )
return false;
523 for(
int i=0; i<
_targs.length; i++ )
525 { progress=
true;
break; }
533 return old.
unify(fun,work);
538 for(
int i=0; i<
_targs.length; i++ )
555 for(
int i=0; i<
_args.length; i++ )
612 @Override
SB p1(
SB sb) {
return sb.
p(
"(...)"); }
622 boolean progress =
false;
631 if( work==
null )
return true;
633 for(
int i=0; i<
_args.length; i++ )
637 progress = tfun.
unify(nfun,work);
644 for(
int i=0; i<
_args.length; i++ ) {
646 if( progress && work==
null )
return true;
647 if( (tfun=tfun.
find()).is_err() )
return find().
unify(tfun,work);
651 if( (tfun=tfun.
find()).is_err() )
return find().
unify(tfun,work);
659 static private final HashMap<T2,Type>
T2MAP =
new HashMap<>();
670 for(
int fidx : tfp.
_fidxs )
684 {
WDUPS.
clear(); arg.find().walk_types_in(arg._flow); }
687 rez = rez2.
join(rez);
705 for(
int i=0; i<fun.
_types.length; i++ ) {
709 if( formal != rez ) {
713 if( i==0 && fun instanceof
If ) work.
push(fun);
723 for(
Syntax arg :
_args ) cnt += arg.prep_tree(
this,nongen,work);
729 for(
Syntax arg :
_args )
if( !arg.more_work(work) )
return false;
752 for(
int fidx : fidxs ) {
758 for(
int i=0; i<fun.
_types.length; i++ ) {
762 if( formal != rez ) {
780 for(
int fidx : fun.
_fidxs )
804 for(
int i=0; i<
_ids.length; i++ ) {
807 if( i <
_ids.length-1 ) sb.
p(
',');
813 for(
int i=0; i<
_ids.length; i++ )
818 boolean progress =
false, must_alloc=
false;
823 if( rec.
is_err() )
return false;
824 for( String
id :
_ids )
826 { must_alloc =
true;
break; }
828 if( work==
null )
return true;
830 for(
int i=0; i<
_ids.length; i++ )
839 for(
int i=0; i<rec.
_ids.length; i++ ) {
841 if( work==
null )
return true;
847 for(
int i=0; i<
_ids.length; i++ ) {
850 if( work==
null && progress )
return true;
863 for(
int i=0; i<
_flds.length; i++ )
874 for(
int i=0; i<
_flds.length; i++ ) {
883 if( !fld.more_work(work) )
898 if(
find().is_err() )
return false;
907 if( work==
null )
return true;
930 if( idx!=-1 )
return tstr.
at(idx);
961 private static final String[][]
IDS =
new String[][] {
968 super(
null,
IDS[t2s.length-1]);
970 for(
int i=0; i<
_targs.length; i++ )
980 if( old.
is_err() )
return false;
982 for(
int i=0; i<
_targs.length; i++ )
983 if(
targ(i).is_err() )
1001 @Override String
name() {
return "pair1"; }
1003 static HashMap<Type,Pair1X>
PAIR1S =
new HashMap<>();
1035 @Override String
name() {
return "pair"; }
1052 @Override String
name() {
return "triple"; }
1067 @Override String
name() {
return "if"; }
1105 @Override String
name() {
return "eq"; }
1122 @Override String
name() {
return "eq0"; }
1138 @Override String
name() {
return "isempty"; }
1153 @Override String
name() {
return " notnil"; }
1157 int cnt = super.prep_tree(par,nongen,work);
1163 if( arg.
is_err() )
return false;
1167 if( arg==ret )
return false;
1173 if( work==
null )
return true;
1185 boolean progress=
false;
1186 for(
int i=0; i<arg.
_ids.length; i++ )
1189 { progress=
true;
break; }
1190 if( !progress )
return false;
1192 if( work==
null )
return true;
1195 return arg.
unify(ret,work);
1208 @Override String
name() {
return "*"; }
1228 @Override String
name() {
return "+"; }
1246 @Override String
name() {
return "dec"; }
1260 @Override String
name() {
return "str"; }
1275 @Override String
name() {
return "factor"; }
1327 T2 tstr =
new T2(
"@{}",flds);
1349 private T2(@NotNull String name,
T2 @NotNull ...
args) {
1366 if(
_args==
null )
return this;
1368 if( u.
no_uf() )
return u;
1381 if( u==
this || u==
_args[0] )
return u;
1391 if( n.
is_leaf() )
return this;
1408 if( n.
_deps!=
null ) {
1418 return u==uu ? uu : (
_args[i]=uu);
1428 assert
ADUPS.isEmpty();
1447 for(
int i=0; i<
_ids.length; i++ )
1452 for(
int i=0; i<
_ids.length; i++ )
1478 if( this._flow==
null )
return that.
_flow;
1483 if( this._fidxs==
null )
return that.
_fidxs;
1488 if( this._alias==
null )
return that.
_alias;
1493 String[] ids = that.
_ids;
1494 if(
_ids==ids )
return ids;
1495 if(
_ids==
null )
return ids;
1496 if( ids==
null )
return _ids;
1497 if(
_ids.length!=ids.length )
throw unimpl();
1498 for( String
id : ids )
1510 if( this._err==
null )
return that.
_err;
1511 if( that.
_err==
null )
return this.
_err;
1517 if(
_flow !=
null ) cnt++;
1518 if(
_fidxs!=
null ) cnt++;
1519 if(
_err !=
null ) cnt++;
1520 if(
_alias!=
null ) { cnt++; assert
_ids!=
null; }
1521 else assert
_ids==
null;
1528 assert
no_uf() && that.no_uf();
1530 if(
this==that )
return false;
1531 if( work==
null )
return true;
1533 if(
_flow !=that._flow ||
1537 _open !=that._open ||
1539 work.addAll(that._deps);
1542 return union_err(that,work,
"Cannot unify "+this.
p()+
" and "+that.p());
1550 if( that._err!=
null ) {
1551 that._flow=
null; that._fidxs=
null; that._alias=
null; that._ids=
null;
1554 return _union(that,work);
1561 if( work==
null )
return true;
1579 assert that.
no_uf();
1582 if(
_deps !=
null ) {
1603 static private final HashMap<Long,T2>
DUPS =
new HashMap<>();
1605 if(
this==that )
return false;
1606 assert
DUPS.isEmpty();
1607 boolean progress =
_unify(that,work);
1617 if(
this==that )
return false;
1620 if( this._args==
null && that.
_args==
null ) {
1621 T2 lhs=
this, rhs=that;
1624 { rhs=
this; lhs=that; }
1627 return lhs.
union(rhs,work);
1630 if( this.
is_leaf() || that.
is_err() )
return this.
union(that,work);
1639 assert rez==
null || rez==that;
1640 if( rez!=
null )
return false;
1641 DUPS.put(luid,that);
1643 if( work==
null )
return true;
1646 return union_err(that,work,
"Cannot unify "+this.
p()+
" and "+that.
p());
1656 for(
int i=0; i<
_args.length; i++ ) {
1658 if( (that=that.
find()).is_err() )
break;
1675 for(
int i=0; i<thsi.
_ids.length; i++ ) {
1680 if( (that=that.
find()).is_err() )
return;
1688 for(
int i=0; i<that.
_ids.length; i++ )
1699 int len =
_ids.length;
1701 int idx = Arrays.binarySearch(
_ids,
id);
1707 System.arraycopy(
_ids,idx,
_ids,idx+1,len-idx);
1708 System.arraycopy(
_args,idx,
_args,idx+1,len-idx);
1721 boolean progress=
false;
1725 String[] ids =
meet_ids (that); progress |= ids != that.
_ids;
1728 if( !progress )
return false;
1729 if( work==
null )
return true;
1739 that.
_flow = that_flow;
1740 String msg =
"Cannot unify "+this.
p()+
" and "+that.
p();
1751 if(
_flow==
null || that_flow==
null )
return true;
1754 if( wthisflow==wthatflow )
return true;
1755 return wthisflow.
isa(wthatflow);
1768 static private final HashMap<T2,T2>
VARS =
new HashMap<>();
1770 assert
VARS.isEmpty() &&
DUPS.isEmpty();
1775 throw unimpl(
"busted, made T2s but just testing");
1782 T2 prior =
VARS.get(
this);
1802 if( mt==that.
_flow )
return false;
1803 if( work!=
null ) that.
_flow = mt;
1814 if( that.
is_nilable() && !
this.is_nilable() ) {
1831 return work ==
null ||
vput(that,that.
_unify(
make_err(
"Cannot unify "+this.
p()+
" and "+that.
p()),work));
1835 boolean progress =
false;
1839 for(
int i=0; i<
_args.length; i++ ) {
1841 if( progress && work==
null )
return true;
1842 if( (that=that.
find()).is_err() )
return true;
1846 if( fidxs!=that.
_fidxs ) progress=
true;
1847 if( progress && work==
null )
return true;
1857 boolean progress =
false;
1863 for(
int i=0; i<
_ids.length; i++ ) {
1866 if( work==
null )
return true;
1872 if( (that=that.
find()).is_err() )
return true;
1873 if( progress && work==
null )
return true;
1880 for(
int i=0; i<that.
_ids.length; i++ )
1883 if( work ==
null )
return true;
1889 if( alias!=that.
_alias ) progress=
true;
1890 if( progress && work==
null )
return true;
1895 private boolean vput(
T2 that,
boolean progress) {
VARS.put(
this,that);
return progress; }
1899 assert
VARS.isEmpty();
1907 if( rez!=
null )
return rez;
1913 VARS.put(
this,
this);
1926 for(
int i=0; i<
_args.length; i++ )
1936 if( x==
this )
return true;
1939 for(
int i=0; i<x.
_args.length; i++ )
1951 if( vs==
null )
return false;
1961 static private final HashMap<T2,T2>
CDUPS =
new HashMap<>();
1963 assert
CDUPS.isEmpty();
1970 if(
this==t )
return true;
1982 if( tc!=
null )
return tc==t;
1986 for(
int i=0; i<
_args.length; i++ )
1994 for(
int i=0; i<
_args.length; i++ ) {
2032 : (lambda.
_body ==
null
2046 for(
int i=0; i<
_args.length; i++ ) {
2065 if( tmap !=
null )
return tmap;
2066 if(
is_err() )
throw unimpl();
2070 if( !(t instanceof
TypeMemPtr) )
throw unimpl();
2074 boolean progress=
false;
2075 for(
int i=0; i<
_args.length; i++ ) {
2077 if( idx==-1 )
continue;
2080 progress |= targ != rez;
2082 if( !progress )
return t;
2085 for(
int i=0; i<
_args.length; i++ ) {
2087 if( idx==-1 )
continue;
2126 for(
int i=0; i<
_args.length; i++ )
2127 if(
_args[i]!=
null )
2139 for(
int i=0; i<
_args.length; i++ )
2156 t._get_dups(visit,dups);
2167 boolean dup = dups.get(
_uid);
2172 if( dup ) sb.
p(
"$V").
p(
_uid);
2173 if( visit.
tset(
_uid) && dup )
return sb;
2174 if( dup ) sb.
p(
':');
2181 for(
int i=0; i<
_args.length-1; i++ )
2191 if(
_ids==
null ) sb.
p(
"_ ");
2192 else for(
int i=0; i<
_ids.length; i++ )
2207 private static final HashMap<T2,Integer>
VNAMES =
new HashMap<>();
2213 Integer ii =
VNAMES.get(
this);
2219 char c = (char)(
'A'+ii);
2220 if( c<
'V' ) sb.
p(c);
else sb.
p(
"V"+ii);
2221 if( later )
return sb;
2230 for(
int i=0; i<
_args.length-1; i++ )
2231 args(i).
_p(sb,visit,dups).
p(
" ");
2232 return args(
_args.length-1).
_p(sb.
p(
"-> "),visit,dups).
p(
" }");
2238 if(
_ids.length == 0 )
return sb.
p(
"()");
2240 for(
int i=0; i<
_ids.length; i++ ) {
2241 int idx =
Util.
find(
_ids,
new String(
new char[]{(char)(
'0'+i)}).intern());
2242 args(idx).
_p(sb.
p(
' '),visit,dups).
p(
',');
2248 TreeMap<String,Integer> map =
new TreeMap<>();
2249 for(
int i=0; i<
_ids.length; i++ )
2250 map.put(
_ids[i], i );
2251 for(
int i : map.values() )
2261 return args(0).
_p(sb,visit,dups).
p(
'?');
2265 for(
int i=0; i<
_args.length; i++ )
args(i).
_p(sb,visit,dups).
p(
" ");
2270 if(
_ids==
null )
return false;
2271 for( String
id :
_ids )
2272 if( !
isDigit((
byte)
id.charAt(0)) )
2280 if( visit.
tset(
_uid) )
return null;
2281 if(
_uid==uid )
return this;
2282 if(
_args==
null )
return null;
2284 if( (arg=arg._find(uid,visit)) !=
null )
void add_hm_work(Worklist work)
boolean hm(Worklist work)
Iterator< T2 > iterator()
int prep_tree(Syntax par, VStack nongen, Worklist work)
boolean fresh_unify(T2 that, VStack nongen, Worklist work)
void add_hm_work(Worklist work)
static final BitsFun EMPTY
static boolean isDigit(byte c)
static TypeFld make_tup(Type t, int order)
boolean occurs_in_type(T2 x)
static Root parse(String s)
boolean meet_opens(T2 that)
E push(E e)
Add element in amortized constant time.
static TypeTuple make_args(Type[] ts)
boolean add_fld(String id, T2 fld, Worklist work)
static BitsFun make0(int bit)
static int find(int[] es, int e)
static final VBitSet ODUPS
Type apply(Syntax[] args)
static TypeTuple make_ret(Type trez)
static boolean eq(String s0, String s1)
Type apply(Syntax[] args)
void add_val_work(Syntax child, Worklist work)
Type apply(Syntax[] args)
static final HashMap< T2, T2 > CDUPS
boolean vput(T2 that, boolean progress)
void add_val_work(Syntax child, Worklist work)
static final HashMap< T2, T2 > VARS
String[] meet_ids(T2 that)
SB _p(SB sb, VBitSet visit, VBitSet dups)
static T2 make_fun(BitsFun fidxs, T2... args)
abstract boolean hm(Worklist work)
static final NonBlockingHashMapLong< Type > UF
VStack(VStack par, T2 nongen)
boolean _cycle_equals(T2 t)
static final Type XSCALAR
boolean union_err(T2 that, Worklist work, String msg)
abstract Type val(Worklist work)
an implementation of language AA
void clear()
Removes all of the mappings from this map.
static TypeFunSig make(String[] args, TypeTuple formals, TypeTuple ret)
static final VBitSet UPDATE_VISIT
Type apply(Syntax[] args)
static final BitsFun FULL
Type apply(Syntax[] args)
boolean unify_nil(T2 that, Worklist work)
static boolean isAlpha0(byte c)
abstract SB p2(SB sb, VBitSet dups)
static final TypeFld NO_DISP
Lambda(Syntax body, String... args)
boolean fresh_base(T2 that, Worklist work)
static TypeInt con(long con)
static final Syntax[] NARGS
void add_hm_work(Worklist work)
void prep_lookup_deps(Ident id)
Type walk_types_out(Type t)
void prep_lookup_deps(Ident id)
boolean _occurs_in_type(T2 x)
void prep_lookup_deps(Ident id)
TypeStruct install_cyclic(Ary< Type > reachs)
static int new_alias(int par)
void add_deps_work_impl(Worklist work)
boolean hm(Worklist work)
A memory-based collection of optionally named fields.
static TypeFld make(String fld, Type t, int order)
static RuntimeException unimpl()
static boolean test(long[] bits, int i)
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
static final boolean DO_HM
static boolean intern_check()
boolean more_work(Worklist work)
static T2 make_struct(BitsAlias aliases, String[] ids, T2[] flds, boolean open)
static final VBitSet FIDX_VISIT
static boolean isAlpha1(byte c)
T2 push_update(Ary< Syntax > as)
SB p2(SB sb, VBitSet dups)
void add_hm_work(Worklist work)
boolean hm(Worklist work)
static T2 make_base(Type flow)
void add_val_work(Syntax child, Worklist work)
Type apply(Syntax[] args)
SB p2(SB sb, VBitSet dups)
static final NonBlockingHashMapLong< Lambda > FUNS
void push_update_impl(Syntax a)
int prep_tree(Syntax par, VStack nongen, Worklist work)
boolean more_work(Worklist work)
T2(@NotNull String name, T2 @NotNull ... args)
static final TypeInt INT64
Let(String arg0, Syntax def, Syntax body)
static Type con(double con)
final SB p0(SB sb, VBitSet dups)
Type walk_types_in(Type t)
void add_val_work(Syntax child, Worklist work)
Type apply(Syntax[] args)
final TypeV get(long key)
Returns the value to which the specified key is mapped, or.
Struct(String[] ids, Syntax[] flds)
boolean cycle_equals(T2 t)
boolean more_work(Worklist work)
static int RECURSIVE_MEET
TypeV putIfAbsent(long key, TypeV val)
Atomically, do a put if-and-only-if the key is not mapped.
boolean more_work(Worklist work)
abstract void add_hm_work(Worklist work)
static void require(String s)
SB p2(SB sb, VBitSet dups)
abstract boolean more_work(Worklist work)
boolean more_work(Worklist work)
SB p2(SB sb, VBitSet dups)
int prep_tree(Syntax par, VStack nongen, Worklist work)
boolean more_work(Worklist work)
static boolean isWS(byte c)
static TypeStr con(String con)
static TypeFunPtr make(BitsFun fidxs, int nargs, Type disp)
final boolean more_work_impl(Worklist work)
static void require(char c)
void add_hm_work(Worklist work)
Type apply(Syntax[] args)
BitsFun meet_fidxs(T2 that)
final void prep_tree_impl(Syntax par, VStack nongen, Worklist work, T2 t)
T2 _find(int uid, VBitSet visit)
boolean unify(T2 that, Worklist work)
static final HashMap< Long, T2 > DUPS
static TypeFld[] tups(Type t1, Type t2)
boolean more_work(Worklist work)
Type apply(Syntax[] args)
static< T > T require(char c, T t)
SB str(SB sb, VBitSet dups)
static final boolean DEBUG_LEAKS
boolean _cycle_equals_struct(T2 t)
Tight/tiny StringBuilder wrapper.
static HashMap< Type, Pair1X > PAIR1S
void addAll(Ary<? extends Syntax > ss)
boolean hm(Worklist work)
boolean more_work(Worklist work)
boolean hm(Worklist work)
static final NonBlockingHashMapLong< String > WDUPS
static final HashMap< String, PrimSyn > PRIMSYNS
VBitSet _get_dups(VBitSet visit, VBitSet dups)
int prep_tree(Syntax par, VStack nongen, Worklist work)
static Type add_sig(Type t)
final HashSet< Syntax > _work
static TypeFld malloc(String fld, Type t, Access access, int order)
boolean _can_be_HM_base(T2 that, Type that_flow)
static Root hm(String sprog)
an implementation of language AA
SB p2(SB sb, VBitSet dups)
TypeStruct approx(int cutoff, int alias)
boolean hm(Worklist work)
SB p2(SB sb, VBitSet dups)
static BitsAlias make0(int bit)
boolean _fresh_unify_struct(T2 that, VStack nongen, Worklist work)
static T2 make_err(String s)
TypeStruct make_from(String name)
static SB str(SB sb, VBitSet visit, T2 t, VBitSet dups)
boolean hm(Worklist work)
void add_hm_work(Worklist work)
abstract int prep_tree(Syntax par, VStack nongen, Worklist work)
boolean nongen_in(VStack vs)
Type apply(Syntax[] args)
static void reset_to_init0()
static final boolean DO_GCP
void add_hm_work(Worklist work)
static T2 make_struct(BitsAlias aliases, String[] ids, T2[] flds)
int prep_tree(Syntax par, VStack nongen, Worklist work)
int prep_tree(Syntax par, VStack nongen, Worklist work)
static TypeStruct make(String fld_name, Type t)
A lock-free alternate implementation of java.util.concurrent.ConcurrentHashMap with primitive long ke...
void _unify_struct(T2 that, Worklist work)
static TypeStruct shrink(Ary< Type > reaches, TypeStruct tstart)
void add_hm_work(Worklist work)
static final HashMap< T2, Integer > VNAMES
Type apply(Syntax[] args)
Type apply(Syntax[] args)
static final TypeInt ZERO
TypeV put(long key, TypeV val)
Maps the specified key to the specified value in the table.
void add_val_work(Syntax child, Worklist work)
E set(int i, E e)
Set existing element.
boolean hm(Worklist work)
boolean hm(Worklist work)
static TypeStruct malloc(String name, boolean any, TypeFld[] flds, boolean open)
static final TypeMemPtr STRPTR
int _init(Syntax def, T2 idt)
static T2 make_nil(T2 leaf)
BitsAlias meet_alias(T2 that)
boolean _union(T2 that, Worklist work)
static final TypeInt TRUE
boolean hm(Worklist work)
int prep_tree(Syntax par, VStack nongen, Worklist work)
VBitSet get_dups(VBitSet dups)
Field(String id, Syntax str)
SB p2(SB sb, VBitSet dups)
SB str(SB sb, VBitSet visit, VBitSet dups)
SB p2(SB sb, VBitSet dups)
Type apply(Syntax[] args)
Apply(Syntax fun, Syntax... args)
static final NonBlockingHashMapLong< TypeStruct > ADUPS
static int new_fidx(int par)
TypeFld make_from(Type t)
Type apply(Syntax[] args)
static final HashMap< T2, Type > T2MAP
void add_deps_work(Worklist work)
TypeMemPtr make_from(TypeObj obj)
static final TypeInt BOOL
static final String[][] IDS
boolean union(T2 that, Worklist work)
boolean _fresh_unify(T2 that, VStack nongen, Worklist work)
int prep_tree(Syntax par, VStack nongen, Worklist work)
boolean hm(Worklist work)
boolean _unify(T2 that, Worklist work)
static final TypeFlt FLT64
void add_hm_work(Worklist work)
int prep_tree(Syntax par, VStack nongen, Worklist work)
Type apply(Syntax[] args)
static void reset_to_init0()
static TypeMemPtr make(BitsAlias aliases, TypeObj obj)