Go to the documentation of this file. 1 package com.cliffc.aa.type;
7 import java.util.HashMap;
8 import java.util.function.Predicate;
38 @Override
public boolean equals( Object o ) {
39 if(
this==o )
return true;
45 if(
this==o )
return true;
60 to.
str(sb,dups,mem,debug);
111 int alias1 = x.
abit();
197 if( nil==
NIL )
return NIL;
206 if( nil==
NIL )
return NIL;
219 HashMap<Type,Integer> ds =
new HashMap<>();
226 if( ds.putIfAbsent(ts,d) ==
null )
228 if( ds.putIfAbsent(fld._t,d) ==
null &&
243 static int max(
int alias, HashMap<Type,Integer> ds) {
245 for(
Type t : ds.keySet() )
247 max = Math.max(
max,ds.get(t));
259 return (
byte)(t instanceof
TypeMemPtr ? 0 : 99);
261 @SuppressWarnings(
"unchecked")
262 @Override
public void walk( Predicate<Type> p ) {
if( p.test(
this) )
_obj.
walk(p); }
276 if( bs==
null )
return this;
286 if( pubs[alias]==
null )
287 { mapped=
false;
break; }
295 return obj ==
null ? this :
make_from(obj);
static final TypeMemPtr ABC0
static final Type[] TYPES
static final Type NO_DISP
static BitsAlias RECORD_BITS0
void walk(Predicate< Type > p)
static final byte TMEMPTR
TypeObj ld(TypeMemPtr ptr)
static final TypeMemPtr STRUCT0
static final TypeMemPtr DISPLAY_PTR
RuntimeException typerr(Type t)
static final TypeMemPtr ABCPTR
Memory type; the state of all of memory; memory edges order memory ops.
static final TypeMemPtr OOP
static final TypeFld DISP_FLD
Type make_from(Type head, TypeMem mem, VBitSet visit)
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
an implementation of language AA
static final TypeStruct ALLSTRUCT
TypeStruct install_cyclic(Ary< Type > reachs)
Type oop_deep_impl(Type t)
A memory-based collection of optionally named fields.
static boolean test(long[] bits, int i)
static final byte TFUNPTR
static BitsAlias ALL_DISPLAYS
static final TypeMemPtr EMTPTR
static Type[] ts(Type t0)
static final TypeMemPtr DISP_SIMPLE
static final TypeMemPtr STR0
void walk(Predicate< Type > p)
static final byte TSTRUCT
static final TypeStruct DISPLAY
static BitsAlias RECORD_BITS
static final TypeObj XOBJ
static BitsAlias STRBITS0
TypeMemPtr init(BitsAlias aliases, TypeObj obj)
final Type cross_nil(Type t)
static final TypeObj UNUSED
Type make_from(Type head, TypeMem map, VBitSet visit)
static BitsAlias ARYBITS0
static final TypeObj ISUSED
static final TypeMemPtr ARYPTR
static final TypeMemPtr STRUCT
static TypeFld[] flds(Type t1)
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
Tight/tiny StringBuilder wrapper.
boolean cycle_equals(Type o)
static TypeFld malloc(String fld, Type t, Access access, int order)
Type oop_deep_impl(Type t)
boolean cycle_equals(Type o)
static BitsAlias make0(int bit)
static final TypeMemPtr NILPTR
static final TypeMemPtr ARY0
static final TypeMemPtr ISUSED
static final Pool[] POOLS
HashMap< Type, Integer > depth()
static TypeStruct malloc(String name, boolean any, TypeFld[] flds, boolean open)
static final TypeMemPtr STRPTR
static final TypeMemPtr OOP0
Type ax_meet_nil(Type nil)
static int max(int alias, HashMap< Type, Integer > ds)
static TypeMemPtr make_nil(int alias, TypeObj obj)
static TypeFld[] ts(TypeFld t0)
static TypeMemPtr make(int alias, TypeObj obj)
TypeMemPtr make_from(TypeObj obj)
static final byte TFUNSIG
static TypeMemPtr make(BitsAlias aliases, TypeObj obj)
static final TypeMemPtr ISUSED0