aa
com.cliffc.aa.type.TypeTuple Class Reference
Inheritance diagram for com.cliffc.aa.type.TypeTuple:
[legend]
Collaboration diagram for com.cliffc.aa.type.TypeTuple:
[legend]

Public Member Functions

boolean above (Type t)
 
boolean above_center ()
 
Type at (int idx)
 
int compute_hash ()
 
final boolean contains (Type t)
 
boolean cycle_equals (Type o)
 
final T dual ()
 
boolean equals (Object o)
 
double getd ()
 
long getl ()
 
String getstr ()
 
boolean has_name ()
 
final int hashCode ()
 
Type high ()
 
boolean is_con ()
 
boolean is_display_ptr ()
 
boolean is_forward_ref ()
 
boolean isa (Type t)
 
final boolean isa_scalar ()
 
byte isBitShape (Type t)
 
Type join (Type t)
 
int len ()
 
Type make_from (Type head, TypeMem map, VBitSet visit)
 
TypeTuple make_from_arg (int idx, Type arg)
 
boolean may_be_con ()
 
boolean may_nil ()
 
final Type meet (Type t)
 
Type meet_loop (Type t2)
 
Type meet_nil (Type t)
 
boolean must_nil ()
 
Type oob ()
 
Type oob (Type e)
 
TypeMem oob (TypeMem e)
 
TypeMemPtr oob (TypeMemPtr e)
 
TypeObj oob (TypeObj e)
 
TypeStruct oob (TypeStruct e)
 
Type oob_deep (Type t)
 
Type oop_deep_impl (Type t)
 
final T remove_name ()
 
TypeTuple set (int idx, Type t)
 
final T set_name (String name)
 
Type sharptr (Type ptr)
 
TypeTuple sharptr (TypeMem mem)
 
Type simple_ptr ()
 
SB str (SB sb, VBitSet dups, TypeMem mem, boolean debug)
 
final String toString ()
 
void walk (Predicate< Type > p)
 
TypeTuple widen ()
 

Static Public Member Functions

static Ary< TypeALL_TYPES ()
 
static boolean eq (Type[] t0, Type[] t1)
 
static void init0 (HashMap< String, Type > types)
 
static boolean intern_check ()
 
static TypeTuple make ()
 
static TypeTuple make (Type t0, Type t1)
 
static TypeTuple make (Type t0, Type t1, Type t2)
 
static TypeTuple make (Type t0, Type t1, Type t2, Type t3)
 
static TypeTuple make (Type t0, Type t1, Type t2, Type t3, Type t4)
 
static TypeTuple make (Type t0, Type t1, Type t2, Type t3, Type t4, Type t5)
 
static TypeTuple make (Type[] ts)
 
static TypeTuple make (TypeStruct ts)
 
static TypeTuple make0 (boolean any, Type[] ts)
 
static TypeTuple make_args ()
 
static TypeTuple make_args (Type t2)
 
static TypeTuple make_args (Type t2, Type t3)
 
static TypeTuple make_args (Type t2, Type t3, Type t4)
 
static TypeTuple make_args (Type[] ts)
 
static TypeTuple make_ret (Type trez)
 

Public Attributes

int _hash
 
String _name
 
Type[] _ts
 
int _uid
 

Static Public Attributes

static final Type ALL
 
static final Type ANY
 
static final TypeTuple CALLE = make(CTRL, TypeMem.ALLMEM, ALL)
 
static final Type CTRL
 
static final TypeTuple FLT64 = make_args(TypeFlt.FLT64)
 
static final TypeTuple FLT64_FLT64 = make_args(TypeFlt.FLT64,TypeFlt.FLT64)
 
static final TypeTuple IF_ALL = make(CTRL ,CTRL )
 
static final TypeTuple IF_ANY = IF_ALL.dual()
 
static final TypeTuple IF_FALSE = make(CTRL ,XCTRL)
 
static final TypeTuple IF_TRUE = make(XCTRL,CTRL )
 
static final TypeTuple INT64 = make_args(TypeInt.INT64)
 
static final TypeTuple INT64_INT64 = make_args(TypeInt.INT64,TypeInt.INT64)
 
static final TypeTuple LVAL_LEN = make_args(TypeMemPtr.ARYPTR)
 
static final TypeTuple LVAL_RD = make_args(TypeMemPtr.ARYPTR,TypeInt.INT64)
 
static final TypeTuple LVAL_WR = make_args(TypeMemPtr.ARYPTR,TypeInt.INT64,Type.SCALAR)
 
static final Type NIL
 
static final TypeTuple NO_ARGS = make_args()
 
static final Type NSCALR
 
static final TypeTuple OOP_OOP = make_args(TypeMemPtr.ISUSED0,TypeMemPtr.ISUSED0)
 
static final Type REAL
 
static int RECURSIVE_MEET
 
static final TypeTuple RET = make(CTRL, TypeMem.ALLMEM, ALL)
 
static final Type SCALAR
 
static final TypeTuple SCALAR1 = make_args(SCALAR)
 
static final TypeTuple START_STATE = make(CTRL, TypeMem.EMPTY)
 
static final TypeTuple STRPTR = make_args(TypeMemPtr.STRPTR)
 
static final TypeTuple TEST0 = make(CTRL, TypeMem.MEM , TypeFunPtr.GENERIC_FUNPTR, SCALAR)
 
static final TypeTuple TEST1 = make(CTRL, TypeMem.EMPTY, TypeFunPtr.GENERIC_FUNPTR, SCALAR)
 
static final Type XCTRL
 
static final Type XNIL
 
static final Type XNSCALR
 
static final Type XSCALAR
 

Protected Member Functions

Type clone ()
 
TypeTuple init (boolean any, Type[] ts)
 
init (byte type, String name)
 
TypeTuple xdual ()
 
Type xmeet (Type t)
 

Package Functions

boolean contains (Type t, VBitSet bs)
 
final Type cross_nil (Type t)
 
final T hashcons_free ()
 
boolean intern_check1 ()
 
Type intern_lookup ()
 
boolean interned ()
 
boolean is_display ()
 
final String mtname (Type t, Type mt)
 
Type not_nil ()
 
rdual ()
 
TypeStruct repeats_in_cycles (TypeStruct head, VBitSet bs)
 
final T retern ()
 
RuntimeException typerr (Type t)
 
final T untern ()
 

Static Package Functions

 [static initializer]
 
static boolean check_name (String n)
 
static boolean check_startup ()
 
static void concat (Ary< Type > ts, Type[] ts1)
 
static Type intern_find (int uid)
 
static int intern_size ()
 
static Type make (byte type)
 

Package Attributes

boolean _any
 
_dual
 
byte _type
 

Static Package Attributes

static final Type NREAL
 
static final Pool[] POOLS
 
static final byte TALL
 
static final byte TANY
 
static final byte TARY
 
static final byte TCTRL
 
static final byte TFLD
 
static final byte TFLT
 
static final byte TFUNPTR
 
static final byte TFUNSIG
 
static final byte TINT
 
static final byte TLAST
 
static final byte TLIVE
 
static final byte TMEM
 
static final byte TMEMPTR
 
static final byte TNIL
 
static final byte TNREAL
 
static final byte TNSCALR
 
static final byte TOBJ
 
static final byte TREAL
 
static final byte TRPC
 
static final byte TSCALAR
 
static final byte TSIMPLE
 
static final byte TSTR
 
static final byte TSTRUCT
 
static final byte TTUPLE
 
static final byte TXCTRL
 
static final byte TXNIL
 
static final byte TXNREAL
 
static final byte TXNSCALR
 
static final byte TXREAL
 
static final byte TXSCALAR
 
static final TypeTuple[] TYPES
 

Private Member Functions

_set_name (String name)
 
int _uid ()
 
boolean check_commute (Type t, Type mt)
 
boolean check_symmetric (Type t, Type mt)
 
hashcons ()
 
boolean intern_check0 (Type v)
 
boolean is_num ()
 
boolean is_ptr ()
 
boolean is_simple ()
 
TypeTuple xmeet1 (TypeTuple tmax)
 
Type xmt_name (Type t, Type mt)
 

Static Private Member Functions

static TypeTuple make (boolean any, Type[] ts)
 
static int rot (int x, int k)
 

Static Private Attributes

static Ary< TypeALL_TYPES
 
static int CNT
 
static final ConcurrentHashMap< Type, TypeINTERN
 
static final byte[] ISA_SCALAR
 
static Type[] SCALAR_PRIMS
 
static final String[] STRS
 
static final Type XNREAL
 
static final Type XREAL
 

Detailed Description

Definition at line 11 of file TypeTuple.java.

Member Function Documentation

◆ [static initializer]()

com.cliffc.aa.type.TypeTuple.[static initializer]
staticpackage

◆ _set_name()

T com.cliffc.aa.type.Type< T extends Type< T >._set_name ( String  name)
privateinherited

Definition at line 558 of file Type.java.

558  {
559  POOLS[_type]._clone++;
560  T t1 = (T)clone();
561  t1._name = name;
562  return t1.hashcons_free();
563  }

◆ _uid()

int com.cliffc.aa.type.Type< T extends Type< T >._uid
privateinherited

Definition at line 103 of file Type.java.

103 { return CNT++; }

◆ above()

boolean com.cliffc.aa.type.Type< T extends Type< T >.above ( Type< TypeTuple t)
inherited

Definition at line 625 of file Type.java.

625 { return t != this && meet(t)==t; }

◆ above_center()

boolean com.cliffc.aa.type.TypeTuple.above_center ( )

Definition at line 193 of file TypeTuple.java.

193 { return _any; }

References com.cliffc.aa.type.TypeTuple._any.

Referenced by com.cliffc.aa.type.TypeFunSig.above_center().

Here is the caller graph for this function:

◆ ALL_TYPES()

static Ary<Type> com.cliffc.aa.type.Type< T extends Type< T >.ALL_TYPES
staticinherited

Definition at line 651 of file Type.java.

651  {
652  if( ALL_TYPES != null ) return ALL_TYPES;
653  Ary<Type> ts = new Ary<>(new Type[1],0);
654  concat(ts,Type .TYPES);
655  concat(ts,TypeFlt .TYPES);
656  concat(ts,TypeFunPtr.TYPES);
657  concat(ts,TypeFunSig.TYPES);
658  concat(ts,TypeInt .TYPES);
659  concat(ts,TypeLive .TYPES);
660  concat(ts,TypeMem .TYPES);
661  concat(ts,TypeMemPtr.TYPES);
662  concat(ts,TypeObj .TYPES);
663  concat(ts,TypeRPC .TYPES);
664  concat(ts,TypeStr .TYPES);
665  concat(ts,TypeStruct.TYPES);
666  concat(ts,TypeTuple .TYPES);
667  concat(ts,TypeAry .TYPES);
668  // Partial order Sort, makes for easier tests later. Arrays.sort requires
669  // a total order (i.e., the obvious Comparator breaks the sort contract),
670  // so we hand-roll a simple bubble sort.
671  for( int i=0; i<ts._len; i++ )
672  for( int j=i+1; j<ts._len; j++ )
673  if( ts._es[j].isa(ts._es[i]) ) { Type tmp = ts._es[i]; ts._es[i] = ts._es[j]; ts._es[j] = tmp; }
674  return (ALL_TYPES = ts); // Preserve for tests
675  }

◆ at()

◆ check_commute()

boolean com.cliffc.aa.type.Type< T extends Type< T >.check_commute ( Type< TypeTuple t,
Type< TypeTuple mt 
)
privateinherited

Definition at line 593 of file Type.java.

593  {
594  if( t==this ) return true;
595  if( is_simple() && !t.is_simple() ) return true; // By design, flipped the only allowed order
596  Type mt2 = t.xmeet(this); // Reverse args and try again
597 
598  // Also reverse names.
599  Type nmt2 = t.xmt_name(this,mt2);
600 
601  if( mt==nmt2 ) return true;
602  System.out.println("Meet not commutative: "+this+".meet("+t+")="+mt+",\n but "+t+".meet("+this+")="+nmt2);
603  return false;
604  }

◆ check_name()

static boolean com.cliffc.aa.type.Type< T extends Type< T >.check_name ( String  n)
staticpackageinherited

Definition at line 548 of file Type.java.

548 { return n.isEmpty() || n.charAt(n.length()-1)==':'; }

◆ check_startup()

static boolean com.cliffc.aa.type.Type< T extends Type< T >.check_startup
staticpackageinherited

Definition at line 684 of file Type.java.

684  {
685  Type[] ts = ALL_TYPES().asAry();
686 
687  // Confirm commutative & complete
688  for( Type t0 : ts )
689  for( Type t1 : ts ) {
690  Type mt = t0.meet(t1);
691  assert t0.check_commute (t1,mt);
692  assert t0.check_symmetric(t1,mt);
693  }
694 
695  // Confirm associative
696  int errs=0;
697  for( Type t0 : ts )
698  for( Type t1 : ts )
699  for( Type t2 : ts ) {
700  Type t01 = t0 .meet(t1 );
701  Type t12 = t1 .meet(t2 );
702  Type t01_2 = t01.meet(t2 );
703  Type t0_12 = t0 .meet(t12);
704  if( t01_2 != t0_12 && errs++ < 10 )
705  System.err.println("("+t0+"&"+t1+") & "+t2+" == "+t0+" & ("+t1+" & "+t2+"); "+
706  "("+t01 +") & "+t2+" == "+t0+" & ("+t12 +"); "+
707  t01_2 +" == "+t0_12);
708  }
709  assert errs==0 : "Found "+errs+" associative errors";
710 
711 
712  // Confirm symmetry. If A isa B, then A.join(C) isa B.join(C)
713  for( Type t0 : ts )
714  for( Type t1 : ts ) {
715  if( t0.isa(t1) ) {
716  for( Type t2 : ts ) {
717  Type t02 = t0.join(t2);
718  Type t12 = t1.join(t2);
719  Type mt = t02.meet(t12);
720  if( mt != t12 && errs++ < 10 ) {
721  System.err.println("("+t0+" ^ "+t2+") = "+t02+"; "+
722  "("+t1+" ^ "+t2+") = "+t12+"; "+
723  "their meet = "+mt+" which is not "+t12);
724  }
725  }
726  }
727  }
728  assert errs==0 : "Found "+errs+" non-join-type errors";
729 
730  // Check scalar primitives; all are SCALARS and none sub-type each other.
731  SCALAR_PRIMS = new Type[] { TypeInt.INT64, TypeFlt.FLT64, TypeMemPtr.OOP0, TypeFunPtr.GENERIC_FUNPTR, TypeRPC.ALL_CALL };
732  for( Type t : SCALAR_PRIMS ) assert t.isa(SCALAR);
733  for( int i=0; i<SCALAR_PRIMS.length; i++ )
734  for( int j=i+1; j<SCALAR_PRIMS.length; j++ )
735  assert !SCALAR_PRIMS[i].isa(SCALAR_PRIMS[j]);
736 
737  return true;
738  }

◆ check_symmetric()

boolean com.cliffc.aa.type.Type< T extends Type< T >.check_symmetric ( Type< TypeTuple t,
Type< TypeTuple mt 
)
privateinherited

Definition at line 608 of file Type.java.

608  {
609  if( t==this ) return true;
610  Type ta = mt._dual.meet(t._dual);
611  Type tb = mt._dual.meet( _dual);
612  if( ta==t._dual && tb==_dual ) return true;
613  System.err.print("("+this+" & "+t+")=="+mt+" but \n("+mt._dual+" & ");
614  if( ta!=t._dual ) System.err.println(t._dual+")=="+ta+" \nwhich is not "+t._dual);
615  else System.err.println( _dual+")=="+tb+" \nwhich is not "+ _dual);
616  return false;
617  }

◆ clone()

Type com.cliffc.aa.type.Type< T extends Type< T >.clone
protectedinherited

Definition at line 304 of file Type.java.

304  {
305  try {
306  POOLS[_type]._clone++;
307  Type t = (Type)super.clone();
308  t._uid = _uid();
309  t._dual = null;
310  t._hash = 0;
311  if( t instanceof TypeStruct )
312  ((TypeStruct)t)._cyclic = false;
313  return t;
314  }
315  catch( CloneNotSupportedException cns ) { throw new RuntimeException(cns); }
316  }

◆ compute_hash()

int com.cliffc.aa.type.TypeTuple.compute_hash ( )

Definition at line 25 of file TypeTuple.java.

25  {
26  int hash = TTUPLE+(_any?0:1);
27  // Copied from http://burtleburtle.net/bob/c/lookup3.c
28  int i,a,b,c;
29  a = b = c = 0xdeadbeef + (_ts.length<<2) + hash;
30  for( i=0; i+2<_ts.length; i+=3 ) {
31  a += _ts[i+0]._hash;
32  b += _ts[i+1]._hash;
33  c += _ts[i+2]._hash;
34  a -= c; a ^= rot(c, 4); c += b;
35  b -= a; b ^= rot(a, 6); a += c;
36  c -= b; c ^= rot(b, 8); b += a;
37  a -= c; a ^= rot(c,16); c += b;
38  b -= a; b ^= rot(a,19); a += c;
39  c -= b; c ^= rot(b, 4); b += a;
40  }
41  switch(_ts.length-i) {
42  case 3: c += _ts[i+2]._hash;
43  case 2: b += _ts[i+1]._hash;
44  case 1: a += _ts[i+0]._hash;
45  c ^= b; c -= rot(b,14);
46  a ^= c; a -= rot(c,11);
47  b ^= a; b -= rot(a,25);
48  c ^= b; c -= rot(b,16);
49  a ^= c; a -= rot(c, 4);
50  b ^= a; b -= rot(a,14);
51  c ^= b; c -= rot(b,24);
52  case 0:
53  break;
54  }
55  return c;
56  }

References com.cliffc.aa.type.TypeTuple._any, com.cliffc.aa.type.Type< T extends Type< T >._hash, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.TypeTuple.rot(), and com.cliffc.aa.type.Type< TypeTuple >.TTUPLE.

Here is the call graph for this function:

◆ concat()

static void com.cliffc.aa.type.Type< T extends Type< T >.concat ( Ary< Type< TypeTuple > >  ts,
Type< TypeTuple >[]  ts1 
)
staticpackageinherited

Definition at line 676 of file Type.java.

676  {
677  for( Type t1 : ts1 ) {
678  assert !t1.above_center(); // Always below-center or equal, because we'll dual anyways
679  ts.push(t1);
680  if( t1!=t1.dual() ) ts.push(t1.dual());
681  }
682  }

◆ contains() [1/2]

final boolean com.cliffc.aa.type.Type< T extends Type< T >.contains ( Type< TypeTuple t)
inherited

Definition at line 926 of file Type.java.

926 { return contains(t,null); }

◆ contains() [2/2]

boolean com.cliffc.aa.type.Type< T extends Type< T >.contains ( Type< TypeTuple t,
VBitSet  bs 
)
packageinherited

Definition at line 927 of file Type.java.

927 { return this==t; }

◆ cross_nil()

final Type com.cliffc.aa.type.Type< T extends Type< T >.cross_nil ( Type< TypeTuple t)
packageinherited

Definition at line 865 of file Type.java.

865 { return must_nil() || t.must_nil() ? SCALAR : NSCALR; }

◆ cycle_equals()

boolean com.cliffc.aa.type.TypeTuple.cycle_equals ( Type  o)

Definition at line 64 of file TypeTuple.java.

64 { return equals(o); }

References com.cliffc.aa.type.TypeTuple.equals().

Here is the call graph for this function:

◆ dual()

final T com.cliffc.aa.type.Type< T extends Type< T >.dual
inherited

Definition at line 361 of file Type.java.

361 { return _dual; }

◆ eq()

static boolean com.cliffc.aa.type.Type< T extends Type< T >.eq ( Type< TypeTuple >[]  t0,
Type< TypeTuple >[]  t1 
)
staticinherited

Definition at line 136 of file Type.java.

136  {
137  if( t0==t1 ) return true;
138  if( t0==null || t1==null ) return false;
139  if( t0.length != t1.length ) return false;
140  for( int i=0; i<t0.length; i++ )
141  if( t0[i] != t1[i] )
142  return false;
143  return true;
144  }

◆ equals()

boolean com.cliffc.aa.type.TypeTuple.equals ( Object  o)

Definition at line 57 of file TypeTuple.java.

57  {
58  if( this==o ) return true;
59  if( !(o instanceof TypeTuple) ) return false;
60  TypeTuple t = (TypeTuple)o;
61  return _any==t._any && _hash == t._hash && Types.eq(_ts,t._ts);
62  }

References com.cliffc.aa.type.TypeTuple._any, com.cliffc.aa.type.Type< TypeTuple >._hash, com.cliffc.aa.type.Type< T extends Type< T >._hash, com.cliffc.aa.type.TypeTuple._ts, and com.cliffc.aa.type.Types.eq().

Referenced by com.cliffc.aa.type.TypeTuple.cycle_equals().

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

◆ getd()

double com.cliffc.aa.type.Type< T extends Type< T >.getd
inherited

Definition at line 804 of file Type.java.

804 { if( _type==TNIL || _type==TXNIL ) return 0.0; throw typerr(null); }

◆ getl()

long com.cliffc.aa.type.Type< T extends Type< T >.getl
inherited

Definition at line 802 of file Type.java.

802 { if( _type==TNIL || _type==TXNIL ) return 0; throw typerr(null); }

◆ getstr()

String com.cliffc.aa.type.Type< T extends Type< T >.getstr
inherited

Definition at line 806 of file Type.java.

806 { throw typerr(null); }

◆ has_name()

boolean com.cliffc.aa.type.Type< T extends Type< T >.has_name
inherited

Definition at line 549 of file Type.java.

549 { return !_name.isEmpty(); }

◆ hashCode()

final int com.cliffc.aa.type.Type< T extends Type< T >.hashCode
inherited

Definition at line 106 of file Type.java.

106 { assert _hash!=0; return _hash; }

◆ hashcons()

T com.cliffc.aa.type.Type< T extends Type< T >.hashcons
privateinherited

Definition at line 165 of file Type.java.

165  {
166  _hash = compute_hash(); // Set hash
167  T t2 = (T)INTERN.get(this); // Lookup
168  if( t2!=null ) { // Found prior
169  assert t2._dual != null; // Prior is complete with dual
170  assert this != t2; // Do not hashcons twice, should not get self back
171  return t2; // Return prior
172  }
173  if( RECURSIVE_MEET > 0 ) // Mid-building recursive types; do not intern
174  return (T)this;
175  // Not in type table
176  _dual = null; // No dual yet
177  INTERN.put(this,this); // Put in table without dual
178  T d = xdual(); // Compute dual without requiring table lookup, and not setting name
179  d._name = _name; // xdual does not set name either
180  d._hash = d.compute_hash(); // Set dual hash
181  _dual = d;
182  if( this==d ) return d; // Self-symmetric? Dual is self
183  assert !equals(d); // Self-symmetric is handled by caller
184  assert d._dual==null; // Else dual-dual not computed yet
185  assert INTERN.get(d)==null;
186  d._dual = (T)this;
187  INTERN.put(d,d);
188  return (T)this;
189  }

◆ hashcons_free()

final T com.cliffc.aa.type.Type< T extends Type< T >.hashcons_free
packageinherited

Definition at line 153 of file Type.java.

153  {
154  T t2 = hashcons();
155  return this==t2 ? t2 : (T)POOLS[_type].free(this,t2);
156  }

◆ high()

Type com.cliffc.aa.type.Type< T extends Type< T >.high
inherited

Definition at line 796 of file Type.java.

796 { return above_center() ? this : dual(); }

◆ init() [1/2]

TypeTuple com.cliffc.aa.type.TypeTuple.init ( boolean  any,
Type[]  ts 
)
protected

Definition at line 14 of file TypeTuple.java.

14  {
15  super.init(TTUPLE,"");
16  _any = any;
17  _ts = ts;
18  return this;
19  }

References com.cliffc.aa.type.TypeTuple._any, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.TypeTuple.init(), and com.cliffc.aa.type.Type< TypeTuple >.TTUPLE.

Referenced by com.cliffc.aa.type.TypeTuple.init(), com.cliffc.aa.type.TypeTuple.make(), and com.cliffc.aa.type.TypeTuple.xdual().

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

◆ init() [2/2]

T com.cliffc.aa.type.Type< T extends Type< T >.init ( byte  type,
String  name 
)
protectedinherited

Definition at line 105 of file Type.java.

105 { _type=type; _name=name; return (T)this; }

◆ init0()

static void com.cliffc.aa.type.Type< T extends Type< T >.init0 ( HashMap< String, Type< TypeTuple > >  types)
staticinherited

Definition at line 642 of file Type.java.

642  {
643  types.put("real",REAL);
644  types.put("scalar",SCALAR);
645  TypeInt.init1(types);
646  TypeFlt.init1(types);
647  TypeStr.init1(types);
648  }

◆ intern_check()

static boolean com.cliffc.aa.type.Type< T extends Type< T >.intern_check
staticinherited

Definition at line 212 of file Type.java.

212  {
213  int errs=0;
214  for( Type k : INTERN.keySet() ) {
215  Type v = INTERN.get(k);
216  if( !k.intern_check0(v) ) {
217  System.out.println("INTERN_CHECK FAIL: "+k._uid+":"+k+" vs "+v._uid+":"+v);
218  errs++;
219  }
220  }
221  return errs==0;
222  }

◆ intern_check0()

boolean com.cliffc.aa.type.Type< T extends Type< T >.intern_check0 ( Type< TypeTuple v)
privateinherited

Definition at line 223 of file Type.java.

223  {
224  if( this != v || _dual==null || _dual._dual!=this || compute_hash()!=_hash ) return false;
225  return intern_check1();
226  }

◆ intern_check1()

boolean com.cliffc.aa.type.Type< T extends Type< T >.intern_check1
packageinherited

Definition at line 227 of file Type.java.

227 { return true; }

◆ intern_find()

static Type com.cliffc.aa.type.Type< T extends Type< T >.intern_find ( int  uid)
staticpackageinherited

Definition at line 229 of file Type.java.

229  {
230  for( Type k : INTERN.keySet() )
231  if( k._uid==uid )
232  return k;
233  return null;
234  }

◆ intern_lookup()

Type com.cliffc.aa.type.Type< T extends Type< T >.intern_lookup
packageinherited

Definition at line 210 of file Type.java.

210 { return INTERN.get(this); }

◆ intern_size()

static int com.cliffc.aa.type.Type< T extends Type< T >.intern_size
staticpackageinherited

Definition at line 211 of file Type.java.

211 { return INTERN.size(); }

◆ interned()

boolean com.cliffc.aa.type.Type< T extends Type< T >.interned
packageinherited

Definition at line 209 of file Type.java.

209 { return INTERN.get(this)==this; }

◆ is_con()

boolean com.cliffc.aa.type.TypeTuple.is_con ( )

Definition at line 200 of file TypeTuple.java.

200  {
201  for( Type _t : _ts ) if( !_t.is_con() ) return false;
202  return true;
203  }

References com.cliffc.aa.type.TypeTuple._ts.

◆ is_display()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_display
packageinherited

Definition at line 942 of file Type.java.

942 { return false; }

◆ is_display_ptr()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_display_ptr
inherited

Definition at line 941 of file Type.java.

941 { return _type==TSCALAR || _type==TXSCALAR || _type==TNIL || _type==TXNIL || _type==TANY || _type==TALL; }

◆ is_forward_ref()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_forward_ref
inherited

Definition at line 799 of file Type.java.

799 { return false; }

◆ is_num()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_num
privateinherited

Definition at line 353 of file Type.java.

353 { byte t = _type; return t == TREAL || t == TXREAL || t == TNREAL || t == TXNREAL || t == TINT || t == TFLT; }

◆ is_ptr()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_ptr
privateinherited

Definition at line 352 of file Type.java.

352 { byte t = _type; return t == TFUNPTR || t == TMEMPTR; }

◆ is_simple()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_simple
privateinherited

Definition at line 351 of file Type.java.

351 { return _type < TSIMPLE; }

◆ isa()

boolean com.cliffc.aa.type.Type< T extends Type< T >.isa ( Type< TypeTuple t)
inherited

Definition at line 623 of file Type.java.

623 { return meet(t)==t; }

◆ isa_scalar()

final boolean com.cliffc.aa.type.Type< T extends Type< T >.isa_scalar
inherited

Definition at line 356 of file Type.java.

356 { assert ISA_SCALAR.length==TLAST; return ISA_SCALAR[_type]!=0; }

◆ isBitShape()

byte com.cliffc.aa.type.TypeTuple.isBitShape ( Type  t)

Definition at line 229 of file TypeTuple.java.

229  {
230  if( isa(t) ) return 0; // Can choose compatible format
231  if( t instanceof TypeTuple ) {
232  TypeTuple tt = (TypeTuple)t;
233  if( tt._ts.length != _ts.length ) return 99;
234  byte x;
235  for( int i=0; i<_ts.length; i++ )
236  if( (x=_ts[i].isBitShape(tt._ts[i])) != 0 )
237  return x;
238  return 0;
239  }
240  return 99;
241  }

References com.cliffc.aa.type.TypeTuple._ts, and com.cliffc.aa.type.Type< TypeTuple >.isa().

Here is the call graph for this function:

◆ join()

Type com.cliffc.aa.type.Type< T extends Type< T >.join ( Type< TypeTuple t)
inherited

Definition at line 619 of file Type.java.

619 { return dual().meet(t.dual()).dual(); }

◆ len()

int com.cliffc.aa.type.TypeTuple.len ( )

Definition at line 183 of file TypeTuple.java.

183 { return _ts.length; }

References com.cliffc.aa.type.TypeTuple._ts.

Referenced by com.cliffc.aa.tvar.TV2._find_tvar(), com.cliffc.aa.node.CEProjNode.good_call(), com.cliffc.aa.type.TypeFunSig.init(), com.cliffc.aa.node.CallNode.set_ttfp(), com.cliffc.aa.node.CallNode.tesc(), com.cliffc.aa.node.CallNode.ttfp(), com.cliffc.aa.node.CallNode.ttfpx(), and com.cliffc.aa.type.TypeTuple.xmeet1().

Here is the caller graph for this function:

◆ make() [1/10]

static TypeTuple com.cliffc.aa.type.TypeTuple.make ( )
static

Definition at line 89 of file TypeTuple.java.

89 { return make0(false,Types.get(0)); }

References com.cliffc.aa.type.Types.get(), and com.cliffc.aa.type.TypeTuple.make0().

Referenced by com.cliffc.aa.type.TypeTuple.make(), com.cliffc.aa.type.TypeTuple.make0(), com.cliffc.aa.type.TypeTuple.make_args(), com.cliffc.aa.type.TypeTuple.make_ret(), com.cliffc.aa.type.TypeTuple.set(), and com.cliffc.aa.type.TypeTuple.widen().

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

◆ make() [2/10]

static TypeTuple com.cliffc.aa.type.TypeTuple.make ( boolean  any,
Type[]  ts 
)
staticprivate

Definition at line 82 of file TypeTuple.java.

82  {
83  TypeTuple t1 = POOLS[TTUPLE].malloc();
84  return t1.init(any,ts).hashcons_free();
85  }

References com.cliffc.aa.type.Type< T extends Type< T >.hashcons_free(), com.cliffc.aa.type.TypeTuple.init(), com.cliffc.aa.type.Type< TypeTuple >.POOLS, and com.cliffc.aa.type.Type< TypeTuple >.TTUPLE.

Referenced by com.cliffc.aa.node.NewStrNode.AddStrStr._value(), com.cliffc.aa.node.IntrinsicNode.convertTypeNameStruct(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2(), com.cliffc.aa.node.MemSplitNode.value(), com.cliffc.aa.node.NewStrNode.AddStrStr.value(), com.cliffc.aa.node.NewNode< TypeStruct >.value(), com.cliffc.aa.node.RetNode.value(), com.cliffc.aa.node.CallEpiNode.value(), and com.cliffc.aa.node.CallNode.value().

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

◆ make() [3/10]

static Type com.cliffc.aa.type.Type< T extends Type< T >.make ( byte  type)
staticpackageinherited

Definition at line 147 of file Type.java.

147  {
148  Pool P = POOLS[type];
149  Type t1 = P.malloc();
150  return t1.init(type,"").hashcons_free();
151  }

◆ make() [4/10]

static TypeTuple com.cliffc.aa.type.TypeTuple.make ( Type  t0,
Type  t1 
)
static

Definition at line 90 of file TypeTuple.java.

90 { return make0(false,Types.ts(t0,t1)); }

References com.cliffc.aa.type.TypeTuple.make0(), and com.cliffc.aa.type.Types.ts().

Here is the call graph for this function:

◆ make() [5/10]

static TypeTuple com.cliffc.aa.type.TypeTuple.make ( Type  t0,
Type  t1,
Type  t2 
)
static

Definition at line 91 of file TypeTuple.java.

91 { return make0(false,Types.ts(t0,t1,t2)); }

References com.cliffc.aa.type.TypeTuple.make0(), and com.cliffc.aa.type.Types.ts().

Here is the call graph for this function:

◆ make() [6/10]

static TypeTuple com.cliffc.aa.type.TypeTuple.make ( Type  t0,
Type  t1,
Type  t2,
Type  t3 
)
static

Definition at line 92 of file TypeTuple.java.

92 { return make0(false,Types.ts(t0,t1,t2,t3)); }

References com.cliffc.aa.type.TypeTuple.make0(), and com.cliffc.aa.type.Types.ts().

Here is the call graph for this function:

◆ make() [7/10]

static TypeTuple com.cliffc.aa.type.TypeTuple.make ( Type  t0,
Type  t1,
Type  t2,
Type  t3,
Type  t4 
)
static

Definition at line 93 of file TypeTuple.java.

93 { return make0(false,Types.ts(t0,t1,t2,t3,t4)); }

References com.cliffc.aa.type.TypeTuple.make0(), and com.cliffc.aa.type.Types.ts().

Here is the call graph for this function:

◆ make() [8/10]

static TypeTuple com.cliffc.aa.type.TypeTuple.make ( Type  t0,
Type  t1,
Type  t2,
Type  t3,
Type  t4,
Type  t5 
)
static

Definition at line 94 of file TypeTuple.java.

94 { return make0(false,Types.ts(t0,t1,t2,t3,t4,t5)); }

References com.cliffc.aa.type.TypeTuple.make0(), and com.cliffc.aa.type.Types.ts().

Here is the call graph for this function:

◆ make() [9/10]

static TypeTuple com.cliffc.aa.type.TypeTuple.make ( Type[]  ts)
static

Definition at line 88 of file TypeTuple.java.

88 { return make0(false,ts); }

References com.cliffc.aa.type.TypeTuple.make0().

Here is the call graph for this function:

◆ make() [10/10]

static TypeTuple com.cliffc.aa.type.TypeTuple.make ( TypeStruct  ts)
static

Definition at line 97 of file TypeTuple.java.

97  {
98  // TypeStruct includes a display/DSP_IDX, but what comes before
99  Type[] ts2 = Types.get(ts.len()+DSP_IDX);
100  ts2[CTL_IDX] = Type.CTRL;
101  ts2[MEM_IDX] = TypeMem.ALLMEM;
102  for( int i=0; i<ts.len(); i++ )
103  ts2[DSP_IDX+i] = ts.at(i);
104  return make(ts2);
105  }

References com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.type.TypeStruct.at(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.type.Types.get(), com.cliffc.aa.type.TypeStruct.len(), and com.cliffc.aa.type.TypeTuple.make().

Here is the call graph for this function:

◆ make0()

static TypeTuple com.cliffc.aa.type.TypeTuple.make0 ( boolean  any,
Type[]  ts 
)
static

Definition at line 87 of file TypeTuple.java.

87 { return make(any,Types.hash_cons(ts)); }

References com.cliffc.aa.type.Types.hash_cons(), and com.cliffc.aa.type.TypeTuple.make().

Referenced by com.cliffc.aa.type.TypeTuple.make(), com.cliffc.aa.type.TypeTuple.make_from_arg(), com.cliffc.aa.type.TypeTuple.sharptr(), com.cliffc.aa.type.TypeTuple.simple_ptr(), and com.cliffc.aa.type.TypeTuple.xmeet1().

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

◆ make_args() [1/5]

static TypeTuple com.cliffc.aa.type.TypeTuple.make_args ( )
static

Definition at line 116 of file TypeTuple.java.

116 { return make(Type.CTRL,TypeMem.ALLMEM,Type.ALL ); }

References com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.type.Type< T extends Type< T >.CTRL, and com.cliffc.aa.type.TypeTuple.make().

Here is the call graph for this function:

◆ make_args() [2/5]

static TypeTuple com.cliffc.aa.type.TypeTuple.make_args ( Type  t2)
static

Definition at line 117 of file TypeTuple.java.

117 { return make(Type.CTRL,TypeMem.ALLMEM,Type.ALL,t2); }

References com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.type.Type< T extends Type< T >.CTRL, and com.cliffc.aa.type.TypeTuple.make().

Here is the call graph for this function:

◆ make_args() [3/5]

static TypeTuple com.cliffc.aa.type.TypeTuple.make_args ( Type  t2,
Type  t3 
)
static

Definition at line 118 of file TypeTuple.java.

118 { return make(Type.CTRL,TypeMem.ALLMEM,Type.ALL,t2,t3); }

References com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.type.Type< T extends Type< T >.CTRL, and com.cliffc.aa.type.TypeTuple.make().

Here is the call graph for this function:

◆ make_args() [4/5]

static TypeTuple com.cliffc.aa.type.TypeTuple.make_args ( Type  t2,
Type  t3,
Type  t4 
)
static

Definition at line 119 of file TypeTuple.java.

119 { return make(Type.CTRL,TypeMem.ALLMEM,Type.ALL,t2,t3,t4); }

References com.cliffc.aa.type.Type< T extends Type< T >.ALL, com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.type.Type< T extends Type< T >.CTRL, and com.cliffc.aa.type.TypeTuple.make().

Here is the call graph for this function:

◆ make_args() [5/5]

static TypeTuple com.cliffc.aa.type.TypeTuple.make_args ( Type[]  ts)
static

Definition at line 106 of file TypeTuple.java.

106  {
107  assert ts[MEM_IDX] instanceof TypeMem && ts[DSP_IDX].is_display_ptr();
108  return make(ts);
109  }

References com.cliffc.aa.type.Type< T extends Type< T >.is_display_ptr(), and com.cliffc.aa.type.TypeTuple.make().

Referenced by com.cliffc.aa.HM.HM9.Root.add_sig(), com.cliffc.aa.HM.HM.Root.add_sig(), com.cliffc.aa.node.IntrinsicNode.convertTypeName(), com.cliffc.aa.node.PrimNode.ConvertTypeName.ConvertTypeName(), com.cliffc.aa.node.FunNode.FunNode(), com.cliffc.aa.node.PrimNode.Id.Id(), com.cliffc.aa.type.TypeFunSig.make(), com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< TypeAry >.NewPrimNode(), com.cliffc.aa.node.TestNodeSmall.testMemoryArgs(), com.cliffc.aa.node.TestNodeSmall.testRecursiveDisplay(), com.cliffc.aa.HM.TestHM.tfs(), com.cliffc.aa.HM.TestHM9.tfs(), com.cliffc.aa.Parse.type0(), and com.cliffc.aa.node.FunNode.type_special().

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

◆ make_from()

Type com.cliffc.aa.type.Type< T extends Type< T >.make_from ( Type< TypeTuple head,
TypeMem  map,
VBitSet  visit 
)
inherited

Definition at line 945 of file Type.java.

945 { return this; }

◆ make_from_arg()

TypeTuple com.cliffc.aa.type.TypeTuple.make_from_arg ( int  idx,
Type  arg 
)

Definition at line 110 of file TypeTuple.java.

110  {
111  Type[] ts = Types.clone(_ts);
112  ts[idx]=arg;
113  return make0(_any,ts);
114  }

References com.cliffc.aa.type.TypeTuple._any, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.Types.clone(), and com.cliffc.aa.type.TypeTuple.make0().

Referenced by com.cliffc.aa.type.TypeFunSig.make_from_arg().

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

◆ make_ret()

static TypeTuple com.cliffc.aa.type.TypeTuple.make_ret ( Type  trez)
static

Definition at line 120 of file TypeTuple.java.

120 { return make(Type.CTRL,TypeMem.ANYMEM,trez); }

References com.cliffc.aa.type.TypeMem.ANYMEM, com.cliffc.aa.type.Type< T extends Type< T >.CTRL, and com.cliffc.aa.type.TypeTuple.make().

Referenced by com.cliffc.aa.HM.HM9.Root.add_sig(), com.cliffc.aa.HM.HM.Root.add_sig(), com.cliffc.aa.node.IntrinsicNode.convertTypeName(), com.cliffc.aa.node.IntrinsicNode.convertTypeNameStruct(), com.cliffc.aa.node.PrimNode.PrimNode(), com.cliffc.aa.HM.TestHM.tfs(), com.cliffc.aa.HM.TestHM9.tfs(), and com.cliffc.aa.Parse.type0().

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

◆ may_be_con()

boolean com.cliffc.aa.type.TypeTuple.may_be_con ( )

Definition at line 195 of file TypeTuple.java.

195  {
196  for( Type _t : _ts ) if( !_t.may_be_con() ) return false;
197  return true;
198  }

References com.cliffc.aa.type.TypeTuple._ts.

◆ may_nil()

boolean com.cliffc.aa.type.Type< T extends Type< T >.may_nil
inherited

Definition at line 869 of file Type.java.

869  {
870  switch(_type) {
871  case TALL:
872  case TREAL:
873  case TSCALAR:
874  case TXNSCALR: case TNSCALR:
875  case TXNREAL: case TNREAL:
876  case TTUPLE:
877  return false;
878  case TANY:
879  case TXREAL:
880  case TXSCALAR:
881  case TCTRL: // Nonsense, only for IfNode.value test
882  case TXCTRL: // Nonsense, only for IfNode.value test
883  case TMEM: // Nonsense, only for IfNode.value test
884  return true;
885  default: throw typerr(null); // Overridden in subclass
886  }
887  }

◆ meet()

final Type com.cliffc.aa.type.Type< T extends Type< T >.meet ( Type< TypeTuple t)
inherited

Definition at line 412 of file Type.java.

412  {
413  // Short cut for the self case
414  if( t == this ) return this;
415  // Short-cut for seeing this meet before
416  Type mt = Key.get(this,t);
417  if( mt != null ) return mt;
418 
419  // "Triangulate" the matrix and cut in half the number of cases.
420  // Reverse; xmeet 2nd arg is never "is_simple" and never equal to "this".
421  // This meet ignores the _name field, and can return any-old name it wants.
422  mt = !is_simple() && t.is_simple() ? t.xmeet(this) : xmeet(t);
423 
424  // Meet the names. Subclasses basically ignore the names as they have
425  // their own complicated meets to perform, so we meet them here for all.
426  Type nmt = xmt_name(t,mt);
427 
428  // Quick check on NIL: if either argument is NIL the result is allowed to
429  // be NIL... but nobody in the lattice can make a NIL from whole cloth, or
430  // we get the crossing-nil bug.
431  assert (nmt != NIL && nmt!=XNIL) || this==NIL || this==XNIL || t==NIL || t==XNIL;
432 
433  // Record this meet, to short-cut next time
434  if( RECURSIVE_MEET == 0 ) // Only not mid-building recursive types;
435  Key.put(this,t,nmt);
436  return nmt;
437  }

◆ meet_loop()

Type com.cliffc.aa.type.Type< T extends Type< T >.meet_loop ( Type< TypeTuple t2)
inherited

Definition at line 628 of file Type.java.

628 { return meet(t2); }

◆ meet_nil()

Type com.cliffc.aa.type.TypeTuple.meet_nil ( Type  t)

Definition at line 206 of file TypeTuple.java.

206 { throw unimpl(); }

◆ mtname()

final String com.cliffc.aa.type.Type< T extends Type< T >.mtname ( Type< TypeTuple t,
Type< TypeTuple mt 
)
packageinherited

Definition at line 567 of file Type.java.

567  {
568  Type t0 = this, t1 = t;
569  String s0 = t0._name, s1 = t1._name;
570  assert check_name(s0) && check_name(s1);
571  if( Util.eq(s0,s1) ) return s0;
572  // Sort by name length
573  if( s0.length() > s1.length() ) { t1=this; t0=t; s0=t0._name; s1=t1._name; }
574  int x = 0, i; char c; // Last colon separator index
575  // Find split point
576  for( i = 0; i < s0.length(); i++ ) {
577  if( (c=s0.charAt(i)) != s1.charAt(i) )
578  break;
579  if( c==':' ) x=i;
580  }
581  // If s0 is a prefix of s1, and s0 is high then it can cover s1.
582  if( i==s0.length() && t0.above_center() && (!t1.above_center() || mt.above_center()) )
583  return s1;
584  // Keep the common prefix, which might be all of s0
585  String s2 = i==s0.length() ? s0 : s0.substring(0, x).intern();
586  assert check_name(s2);
587  return s2;
588  }

◆ must_nil()

boolean com.cliffc.aa.type.TypeTuple.must_nil ( )

Definition at line 204 of file TypeTuple.java.

204 { return false; }

◆ not_nil()

Type com.cliffc.aa.type.TypeTuple.not_nil ( )
package

Definition at line 205 of file TypeTuple.java.

205 { return this; }

◆ oob() [1/6]

Type com.cliffc.aa.type.Type< T extends Type< T >.oob
inherited

Definition at line 635 of file Type.java.

635 { return oob(ALL); }

◆ oob() [2/6]

Type com.cliffc.aa.type.Type< T extends Type< T >.oob ( Type< TypeTuple e)
inherited

Definition at line 636 of file Type.java.

636 { return above_center() ? e.dual() : e; }

◆ oob() [3/6]

TypeMem com.cliffc.aa.type.Type< T extends Type< T >.oob ( TypeMem  e)
inherited

Definition at line 639 of file Type.java.

639 { return above_center() ? e.dual() : e; }

◆ oob() [4/6]

TypeMemPtr com.cliffc.aa.type.Type< T extends Type< T >.oob ( TypeMemPtr  e)
inherited

Definition at line 640 of file Type.java.

640 { return above_center() ? e.dual() : e; }

◆ oob() [5/6]

TypeObj com.cliffc.aa.type.Type< T extends Type< T >.oob ( TypeObj  e)
inherited

Definition at line 637 of file Type.java.

637 { return above_center() ? (TypeObj)e.dual() : e; }

◆ oob() [6/6]

TypeStruct com.cliffc.aa.type.Type< T extends Type< T >.oob ( TypeStruct  e)
inherited

Definition at line 638 of file Type.java.

638 { return above_center() ? e.dual() : e; }

◆ oob_deep()

Type com.cliffc.aa.type.Type< T extends Type< T >.oob_deep ( Type< TypeTuple t)
inherited

Definition at line 632 of file Type.java.

632 { return oop_deep_impl(t); }

◆ oop_deep_impl()

Type com.cliffc.aa.type.Type< T extends Type< T >.oop_deep_impl ( Type< TypeTuple t)
inherited

Definition at line 634 of file Type.java.

634 { return oob(); }

◆ rdual()

T com.cliffc.aa.type.Type< T extends Type< T >.rdual
packageinherited

Definition at line 366 of file Type.java.

366 { assert _dual!=null; return _dual; }

◆ remove_name()

final T com.cliffc.aa.type.Type< T extends Type< T >.remove_name
inherited

Definition at line 556 of file Type.java.

556 { return has_name() ? _set_name("") : (T)this; }

◆ repeats_in_cycles()

TypeStruct com.cliffc.aa.type.Type< T extends Type< T >.repeats_in_cycles ( TypeStruct  head,
VBitSet  bs 
)
packageinherited

Definition at line 938 of file Type.java.

938 { return null; }

◆ retern()

final T com.cliffc.aa.type.Type< T extends Type< T >.retern
packageinherited

Definition at line 201 of file Type.java.

201  {
202  assert _dual._dual == this;
203  assert _hash != 0;
204  assert INTERN.get(this)==null;
205  INTERN.put(this,this);
206  assert INTERN.get(this)==this;
207  return (T)this;
208  }

◆ rot()

static int com.cliffc.aa.type.TypeTuple.rot ( int  x,
int  k 
)
staticprivate

Definition at line 23 of file TypeTuple.java.

23 { return (x<<k) | (x>>(32-k)); }

Referenced by com.cliffc.aa.type.TypeTuple.compute_hash().

Here is the caller graph for this function:

◆ set()

TypeTuple com.cliffc.aa.type.TypeTuple.set ( int  idx,
Type  t 
)

Definition at line 186 of file TypeTuple.java.

186  {
187  Type[] ts = Types.clone(_ts);
188  ts[idx]=t;
189  return make(ts);
190  }

References com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.Types.clone(), and com.cliffc.aa.type.TypeTuple.make().

Referenced by com.cliffc.aa.node.CallNode.set_ttfp().

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

◆ set_name()

final T com.cliffc.aa.type.Type< T extends Type< T >.set_name ( String  name)
inherited

Definition at line 551 of file Type.java.

551  {
552  assert check_name(name);
553  return _set_name(name);
554  }

◆ sharptr() [1/2]

Type com.cliffc.aa.type.Type< T extends Type< T >.sharptr ( Type< TypeTuple ptr)
inherited

Definition at line 930 of file Type.java.

930 { return this==ANY ? TypeMem.ANYMEM.sharptr(ptr) : ptr; }

◆ sharptr() [2/2]

TypeTuple com.cliffc.aa.type.TypeTuple.sharptr ( TypeMem  mem)

Definition at line 208 of file TypeTuple.java.

208  {
209  Type[] ts = Types.clone(_ts);
210  for( int i=0; i<ts.length; i++ )
211  ts[i] = mem.sharptr(ts[i]);
212  return make0(_any,ts);
213  }

References com.cliffc.aa.type.TypeTuple._any, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.Types.clone(), com.cliffc.aa.type.TypeTuple.make0(), and com.cliffc.aa.type.TypeMem.sharptr().

Referenced by com.cliffc.aa.type.TypeMem.sharptr().

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

◆ simple_ptr()

Type com.cliffc.aa.type.TypeTuple.simple_ptr ( )

Definition at line 214 of file TypeTuple.java.

214  {
215  Type[] ts = Types.clone(_ts);
216  for( int i=0; i<ts.length; i++ )
217  ts[i] = ts[i].simple_ptr();
218  return make0(_any,ts);
219  }

References com.cliffc.aa.type.TypeTuple._any, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.Types.clone(), and com.cliffc.aa.type.TypeTuple.make0().

Here is the call graph for this function:

◆ str()

SB com.cliffc.aa.type.TypeTuple.str ( SB  sb,
VBitSet  dups,
TypeMem  mem,
boolean  debug 
)

Definition at line 65 of file TypeTuple.java.

65  {
66  if( _any ) sb.p('~');
67  sb.p('(');
68  if( _ts!=null && _ts.length>0 ) { // No commas for zero-length
69  int j = _ts.length-1; // Find length of trailing equal parts
70  Type last = _ts[j]; // Last type
71  for( j--; j>0; j-- ) if( _ts[j] != last ) break;
72  _ts[0].str(sb,dups,mem,debug); // First type
73  for( int i=1; i<=j+1; i++ ) // All types up to trailing equal parts
74  _ts[i].str(sb.p(','),dups,mem,debug);
75  if( j+2<_ts.length-1 ) sb.p("..."); // Abbreviate tail
76  if( _ts.length> j+2 ) last.str(sb.p(','),dups,mem,debug);
77  }
78  return sb.p(')');
79  }

References com.cliffc.aa.type.TypeTuple._any, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.util.SB.p(), and com.cliffc.aa.type.Type< T extends Type< T >.str().

Referenced by com.cliffc.aa.type.TypeFunSig.str().

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

◆ toString()

final String com.cliffc.aa.type.Type< T extends Type< T >.toString
inherited

Definition at line 127 of file Type.java.

127 { return str(new SB(),new VBitSet(),null,true).toString(); }

◆ typerr()

RuntimeException com.cliffc.aa.type.Type< T extends Type< T >.typerr ( Type< TypeTuple t)
packageinherited

Definition at line 947 of file Type.java.

947  {
948  throw new RuntimeException("Should not reach here: internal type system error with "+this+(t==null?"":(" and "+t)));
949  }

◆ untern()

final T com.cliffc.aa.type.Type< T extends Type< T >.untern
packageinherited

Definition at line 193 of file Type.java.

193  {
194  assert _hash != 0;
195  assert INTERN.get(this)==this;
196  Type rez = INTERN.remove(this);
197  assert rez == this;
198  return (T)this;
199  }

◆ walk()

void com.cliffc.aa.type.Type< T extends Type< T >.walk ( Predicate< Type< TypeTuple > >  p)
inherited

Definition at line 936 of file Type.java.

936 { assert is_simple(); p.test(this); }

◆ widen()

TypeTuple com.cliffc.aa.type.TypeTuple.widen ( )

Definition at line 221 of file TypeTuple.java.

221  {
222  Type[] ts = Types.get(_ts.length);
223  for( int i=0; i<ts.length; i++ )
224  ts[i] = _ts[i].widen();
225  return make(ts);
226  }

References com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.Types.get(), and com.cliffc.aa.type.TypeTuple.make().

Here is the call graph for this function:

◆ xdual()

TypeTuple com.cliffc.aa.type.TypeTuple.xdual ( )
protected

Definition at line 155 of file TypeTuple.java.

155  {
156  Type[] ts = Types.get(_ts.length);
157  for( int i=0; i<_ts.length; i++ ) ts[i] = _ts[i].dual();
158  ts = Types.hash_cons(ts);
159  return new TypeTuple().init(!_any, ts);
160  }

References com.cliffc.aa.type.TypeTuple._any, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.Type< TypeTuple >.dual(), com.cliffc.aa.type.Types.get(), com.cliffc.aa.type.Types.hash_cons(), and com.cliffc.aa.type.TypeTuple.init().

Here is the call graph for this function:

◆ xmeet()

Type com.cliffc.aa.type.TypeTuple.xmeet ( Type  t)
protected

Definition at line 163 of file TypeTuple.java.

163  {
164  if( t._type != TTUPLE ) return ALL; // Tuples are internal types only, not user exposed
165  TypeTuple tt = (TypeTuple)t;
166  return _ts.length < tt._ts.length ? xmeet1(tt) : tt.xmeet1(this);
167  }

References com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.Type< T extends Type< T >._type, com.cliffc.aa.type.Type< TypeTuple >.ALL, com.cliffc.aa.type.Type< TypeTuple >.TTUPLE, and com.cliffc.aa.type.TypeTuple.xmeet1().

Here is the call graph for this function:

◆ xmeet1()

TypeTuple com.cliffc.aa.type.TypeTuple.xmeet1 ( TypeTuple  tmax)
private

Definition at line 170 of file TypeTuple.java.

170  {
171  // Short is high; short extended by ANY so tail is a copy of long.
172  // Short is low ; short extended by ALL so tail is ALL so trimmed to short.
173  int len = _any ? tmax._ts.length : _ts.length;
174  // Meet of common elements
175  Type[] ts = Types.get(len);
176  for( int i=0; i<_ts.length; i++ ) ts[i] = _ts[i].meet(tmax._ts[i]);
177  // Elements only in the longer tuple.
178  if( len > _ts.length ) System.arraycopy(tmax._ts, _ts.length, ts, _ts.length, len - _ts.length);
179  return make0(_any&tmax._any,ts);
180  }

References com.cliffc.aa.type.TypeTuple._any, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.Types.get(), com.cliffc.aa.type.TypeTuple.len(), com.cliffc.aa.type.TypeTuple.make0(), and com.cliffc.aa.type.Type< TypeTuple >.meet().

Referenced by com.cliffc.aa.type.TypeTuple.xmeet().

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

◆ xmt_name()

Type com.cliffc.aa.type.Type< T extends Type< T >.xmt_name ( Type< TypeTuple t,
Type< TypeTuple mt 
)
privateinherited

Definition at line 441 of file Type.java.

441  {
442  String n = mtname(t,mt); // Meet name strings
443  // If the names are incompatible and the meet remained high then the
444  // mismatched names force a drop.
445  if( n.length() < _name.length() && n.length() < t._name.length() && mt.above_center() ) {
446  if( mt.interned() ) // recursive type creation?
447  mt = mt.dual(); // Force low
448  }
449  if( mt.is_simple() ) n=""; // No named simple types
450  if( mt._type==TOBJ ) n=""; // OBJ splits into strings (arrays) and structs, which can keep their names
451 
452  // Inject the name
453  if( !Util.eq(mt._name,n) ) // Fast path cutout
454  mt = mt.set_name(n);
455  return mt;
456  }

Member Data Documentation

◆ _any

◆ _dual

T com.cliffc.aa.type.Type< T extends Type< T >._dual
packageinherited

Definition at line 100 of file Type.java.

◆ _hash

int com.cliffc.aa.type.Type< T extends Type< T >._hash
inherited

Definition at line 97 of file Type.java.

◆ _name

String com.cliffc.aa.type.Type< T extends Type< T >._name
inherited

Definition at line 99 of file Type.java.

◆ _ts

◆ _type

byte com.cliffc.aa.type.Type< T extends Type< T >._type
packageinherited

Definition at line 98 of file Type.java.

◆ _uid

int com.cliffc.aa.type.Type< T extends Type< T >._uid
inherited

Definition at line 96 of file Type.java.

◆ ALL

final Type com.cliffc.aa.type.Type< T extends Type< T >.ALL
staticinherited

Definition at line 324 of file Type.java.

◆ ALL_TYPES

Ary<Type> com.cliffc.aa.type.Type< T extends Type< T >.ALL_TYPES
staticprivateinherited

Definition at line 650 of file Type.java.

◆ ANY

final Type com.cliffc.aa.type.Type< T extends Type< T >.ANY
staticinherited

Definition at line 325 of file Type.java.

◆ CALLE

◆ CNT

int com.cliffc.aa.type.Type< T extends Type< T >.CNT
staticprivateinherited

Definition at line 95 of file Type.java.

◆ CTRL

final Type com.cliffc.aa.type.Type< T extends Type< T >.CTRL
staticinherited

Definition at line 326 of file Type.java.

◆ FLT64

final TypeTuple com.cliffc.aa.type.TypeTuple.FLT64 = make_args(TypeFlt.FLT64)
static

Definition at line 137 of file TypeTuple.java.

Referenced by com.cliffc.aa.node.PrimNode.Prim1OpF64.Prim1OpF64().

◆ FLT64_FLT64

final TypeTuple com.cliffc.aa.type.TypeTuple.FLT64_FLT64 = make_args(TypeFlt.FLT64,TypeFlt.FLT64)
static

◆ IF_ALL

final TypeTuple com.cliffc.aa.type.TypeTuple.IF_ALL = make(CTRL ,CTRL )
static

Definition at line 123 of file TypeTuple.java.

Referenced by com.cliffc.aa.node.IfNode.value().

◆ IF_ANY

final TypeTuple com.cliffc.aa.type.TypeTuple.IF_ANY = IF_ALL.dual()
static

◆ IF_FALSE

final TypeTuple com.cliffc.aa.type.TypeTuple.IF_FALSE = make(CTRL ,XCTRL)
static

◆ IF_TRUE

final TypeTuple com.cliffc.aa.type.TypeTuple.IF_TRUE = make(XCTRL,CTRL )
static

◆ INT64

◆ INT64_INT64

final TypeTuple com.cliffc.aa.type.TypeTuple.INT64_INT64 = make_args(TypeInt.INT64,TypeInt.INT64)
static

◆ INTERN

final ConcurrentHashMap<Type,Type> com.cliffc.aa.type.Type< T extends Type< T >.INTERN
staticprivateinherited

Definition at line 162 of file Type.java.

◆ ISA_SCALAR

final byte [] com.cliffc.aa.type.Type< T extends Type< T >.ISA_SCALAR
staticprivateinherited

Definition at line 355 of file Type.java.

◆ LVAL_LEN

final TypeTuple com.cliffc.aa.type.TypeTuple.LVAL_LEN = make_args(TypeMemPtr.ARYPTR)
static

◆ LVAL_RD

final TypeTuple com.cliffc.aa.type.TypeTuple.LVAL_RD = make_args(TypeMemPtr.ARYPTR,TypeInt.INT64)
static

◆ LVAL_WR

◆ NIL

final Type com.cliffc.aa.type.Type< T extends Type< T >.NIL
staticinherited

Definition at line 332 of file Type.java.

◆ NO_ARGS

final TypeTuple com.cliffc.aa.type.TypeTuple.NO_ARGS = make_args()
static

Definition at line 135 of file TypeTuple.java.

Referenced by com.cliffc.aa.node.FunNode.FunNode().

◆ NREAL

final Type com.cliffc.aa.type.Type< T extends Type< T >.NREAL
staticpackageinherited

Definition at line 336 of file Type.java.

◆ NSCALR

final Type com.cliffc.aa.type.Type< T extends Type< T >.NSCALR
staticinherited

Definition at line 330 of file Type.java.

◆ OOP_OOP

final TypeTuple com.cliffc.aa.type.TypeTuple.OOP_OOP = make_args(TypeMemPtr.ISUSED0,TypeMemPtr.ISUSED0)
static

◆ POOLS

final Pool [] com.cliffc.aa.type.Type< T extends Type< T >.POOLS
staticpackageinherited

Definition at line 281 of file Type.java.

◆ REAL

final Type com.cliffc.aa.type.Type< T extends Type< T >.REAL
staticinherited

Definition at line 334 of file Type.java.

◆ RECURSIVE_MEET

int com.cliffc.aa.type.Type< T extends Type< T >.RECURSIVE_MEET
staticinherited

Definition at line 163 of file Type.java.

◆ RET

◆ SCALAR

final Type com.cliffc.aa.type.Type< T extends Type< T >.SCALAR
staticinherited

Definition at line 328 of file Type.java.

◆ SCALAR1

final TypeTuple com.cliffc.aa.type.TypeTuple.SCALAR1 = make_args(SCALAR)
static

Definition at line 142 of file TypeTuple.java.

Referenced by com.cliffc.aa.node.PrimNode.Not.Not().

◆ SCALAR_PRIMS

Type [] com.cliffc.aa.type.Type< T extends Type< T >.SCALAR_PRIMS
staticprivateinherited

Definition at line 349 of file Type.java.

◆ START_STATE

final TypeTuple com.cliffc.aa.type.TypeTuple.START_STATE = make(CTRL, TypeMem.EMPTY)
static

Definition at line 129 of file TypeTuple.java.

Referenced by com.cliffc.aa.node.StartNode.value().

◆ STRPTR

final TypeTuple com.cliffc.aa.type.TypeTuple.STRPTR = make_args(TypeMemPtr.STRPTR)
static

◆ STRS

final String [] com.cliffc.aa.type.Type< T extends Type< T >.STRS
staticprivateinherited

Definition at line 262 of file Type.java.

◆ TALL

final byte com.cliffc.aa.type.Type< T extends Type< T >.TALL
staticpackageinherited

Definition at line 239 of file Type.java.

◆ TANY

final byte com.cliffc.aa.type.Type< T extends Type< T >.TANY
staticpackageinherited

Definition at line 240 of file Type.java.

◆ TARY

final byte com.cliffc.aa.type.Type< T extends Type< T >.TARY
staticpackageinherited

Definition at line 269 of file Type.java.

◆ TCTRL

final byte com.cliffc.aa.type.Type< T extends Type< T >.TCTRL
staticpackageinherited

Definition at line 241 of file Type.java.

◆ TEST0

final TypeTuple com.cliffc.aa.type.TypeTuple.TEST0 = make(CTRL, TypeMem.MEM , TypeFunPtr.GENERIC_FUNPTR, SCALAR)
static

Definition at line 132 of file TypeTuple.java.

Referenced by com.cliffc.aa.node.TestNode.testMonotonic().

◆ TEST1

final TypeTuple com.cliffc.aa.type.TypeTuple.TEST1 = make(CTRL, TypeMem.EMPTY, TypeFunPtr.GENERIC_FUNPTR, SCALAR)
static

Definition at line 133 of file TypeTuple.java.

◆ TFLD

final byte com.cliffc.aa.type.Type< T extends Type< T >.TFLD
staticpackageinherited

Definition at line 271 of file Type.java.

◆ TFLT

final byte com.cliffc.aa.type.Type< T extends Type< T >.TFLT
staticpackageinherited

Definition at line 264 of file Type.java.

◆ TFUNPTR

final byte com.cliffc.aa.type.Type< T extends Type< T >.TFUNPTR
staticpackageinherited

Definition at line 274 of file Type.java.

◆ TFUNSIG

final byte com.cliffc.aa.type.Type< T extends Type< T >.TFUNSIG
staticpackageinherited

Definition at line 275 of file Type.java.

◆ TINT

final byte com.cliffc.aa.type.Type< T extends Type< T >.TINT
staticpackageinherited

Definition at line 263 of file Type.java.

◆ TLAST

final byte com.cliffc.aa.type.Type< T extends Type< T >.TLAST
staticpackageinherited

Definition at line 277 of file Type.java.

◆ TLIVE

final byte com.cliffc.aa.type.Type< T extends Type< T >.TLIVE
staticpackageinherited

Definition at line 276 of file Type.java.

◆ TMEM

final byte com.cliffc.aa.type.Type< T extends Type< T >.TMEM
staticpackageinherited

Definition at line 272 of file Type.java.

◆ TMEMPTR

final byte com.cliffc.aa.type.Type< T extends Type< T >.TMEMPTR
staticpackageinherited

Definition at line 273 of file Type.java.

◆ TNIL

final byte com.cliffc.aa.type.Type< T extends Type< T >.TNIL
staticpackageinherited

Definition at line 259 of file Type.java.

◆ TNREAL

final byte com.cliffc.aa.type.Type< T extends Type< T >.TNREAL
staticpackageinherited

Definition at line 257 of file Type.java.

◆ TNSCALR

final byte com.cliffc.aa.type.Type< T extends Type< T >.TNSCALR
staticpackageinherited

Definition at line 253 of file Type.java.

◆ TOBJ

final byte com.cliffc.aa.type.Type< T extends Type< T >.TOBJ
staticpackageinherited

Definition at line 267 of file Type.java.

◆ TREAL

final byte com.cliffc.aa.type.Type< T extends Type< T >.TREAL
staticpackageinherited

Definition at line 255 of file Type.java.

◆ TRPC

final byte com.cliffc.aa.type.Type< T extends Type< T >.TRPC
staticpackageinherited

Definition at line 265 of file Type.java.

◆ TSCALAR

final byte com.cliffc.aa.type.Type< T extends Type< T >.TSCALAR
staticpackageinherited

Definition at line 246 of file Type.java.

◆ TSIMPLE

final byte com.cliffc.aa.type.Type< T extends Type< T >.TSIMPLE
staticpackageinherited

Definition at line 261 of file Type.java.

◆ TSTR

final byte com.cliffc.aa.type.Type< T extends Type< T >.TSTR
staticpackageinherited

Definition at line 270 of file Type.java.

◆ TSTRUCT

final byte com.cliffc.aa.type.Type< T extends Type< T >.TSTRUCT
staticpackageinherited

Definition at line 268 of file Type.java.

◆ TTUPLE

final byte com.cliffc.aa.type.Type< T extends Type< T >.TTUPLE
staticpackageinherited

Definition at line 266 of file Type.java.

◆ TXCTRL

final byte com.cliffc.aa.type.Type< T extends Type< T >.TXCTRL
staticpackageinherited

Definition at line 242 of file Type.java.

◆ TXNIL

final byte com.cliffc.aa.type.Type< T extends Type< T >.TXNIL
staticpackageinherited

Definition at line 260 of file Type.java.

◆ TXNREAL

final byte com.cliffc.aa.type.Type< T extends Type< T >.TXNREAL
staticpackageinherited

Definition at line 258 of file Type.java.

◆ TXNSCALR

final byte com.cliffc.aa.type.Type< T extends Type< T >.TXNSCALR
staticpackageinherited

Definition at line 254 of file Type.java.

◆ TXREAL

final byte com.cliffc.aa.type.Type< T extends Type< T >.TXREAL
staticpackageinherited

Definition at line 256 of file Type.java.

◆ TXSCALAR

final byte com.cliffc.aa.type.Type< T extends Type< T >.TXSCALAR
staticpackageinherited

Definition at line 247 of file Type.java.

◆ TYPES

final TypeTuple [] com.cliffc.aa.type.TypeTuple.TYPES
staticpackage
Initial value:

Definition at line 148 of file TypeTuple.java.

◆ XCTRL

final Type com.cliffc.aa.type.Type< T extends Type< T >.XCTRL
staticinherited

Definition at line 327 of file Type.java.

◆ XNIL

final Type com.cliffc.aa.type.Type< T extends Type< T >.XNIL
staticinherited

Definition at line 333 of file Type.java.

◆ XNREAL

final Type com.cliffc.aa.type.Type< T extends Type< T >.XNREAL
staticprivateinherited

Definition at line 337 of file Type.java.

◆ XNSCALR

final Type com.cliffc.aa.type.Type< T extends Type< T >.XNSCALR
staticinherited

Definition at line 331 of file Type.java.

◆ XREAL

final Type com.cliffc.aa.type.Type< T extends Type< T >.XREAL
staticprivateinherited

Definition at line 335 of file Type.java.

◆ XSCALAR

final Type com.cliffc.aa.type.Type< T extends Type< T >.XSCALAR
staticinherited

Definition at line 329 of file Type.java.


The documentation for this class was generated from the following file:
com.cliffc.aa.type.Type< TypeTuple >::xdual
T xdual()
Definition: Type.java:365
com.cliffc.aa.type.Type< TypeTuple >::NSCALR
static final Type NSCALR
Definition: Type.java:330
com.cliffc.aa.type.Type< TypeTuple >::intern_check1
boolean intern_check1()
Definition: Type.java:227
com.cliffc.aa.type.Type< TypeTuple >::TMEMPTR
static final byte TMEMPTR
Definition: Type.java:273
com.cliffc.aa.type.Type< TypeTuple >::clone
Type clone()
Definition: Type.java:304
com.cliffc.aa.util.Ary.push
E push(E e)
Add element in amortized constant time.
Definition: Ary.java:58
com.cliffc.aa.type.Type< TypeTuple >::TREAL
static final byte TREAL
Definition: Type.java:255
com.cliffc.aa.type.Type.isa
boolean isa(Type t)
Definition: Type.java:623
com.cliffc.aa.type.Type< TypeTuple >::typerr
RuntimeException typerr(Type t)
Definition: Type.java:947
com.cliffc.aa.type.Type< TypeTuple >::_set_name
T _set_name(String name)
Definition: Type.java:558
com.cliffc.aa.util.Util.eq
static boolean eq(String s0, String s1)
Definition: Util.java:16
com.cliffc.aa.type.Type.join
Type join(Type t)
Definition: Type.java:619
com.cliffc.aa.type.Type.interned
boolean interned()
Definition: Type.java:209
com.cliffc.aa.type.Type< TypeTuple >::SCALAR
static final Type SCALAR
Definition: Type.java:328
com.cliffc.aa.type.Type._hash
int _hash
Definition: Type.java:97
com.cliffc.aa.type.TypeTuple.START_STATE
static final TypeTuple START_STATE
Definition: TypeTuple.java:129
com.cliffc.aa.type.Type< TypeTuple >::Type
Type()
Definition: Type.java:102
com.cliffc.aa.type.Type.check_commute
boolean check_commute(Type t, Type mt)
Definition: Type.java:593
com.cliffc.aa.type.Type
an implementation of language AA
Definition: Type.java:94
com.cliffc.aa.type.Type< TypeTuple >::CNT
static int CNT
Definition: Type.java:95
com.cliffc.aa.util.Ary
Definition: Ary.java:11
com.cliffc.aa.type.Type< TypeTuple >::compute_hash
int compute_hash()
Definition: Type.java:109
com.cliffc.aa.type.TypeTuple.simple_ptr
Type simple_ptr()
Definition: TypeTuple.java:214
com.cliffc.aa.type.TypeTuple.str
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
Definition: TypeTuple.java:65
com.cliffc.aa.type.Type< TypeTuple >::_type
byte _type
Definition: Type.java:98
com.cliffc.aa.type.Type.xmt_name
Type xmt_name(Type t, Type mt)
Definition: Type.java:441
com.cliffc.aa.util.Ary._len
int _len
Definition: Ary.java:13
com.cliffc.aa.util.Ary._es
E[] _es
Definition: Ary.java:12
com.cliffc.aa.type.Type< TypeTuple >::TXNIL
static final byte TXNIL
Definition: Type.java:260
com.cliffc.aa.type.Type< TypeTuple >::TLAST
static final byte TLAST
Definition: Type.java:277
com.cliffc.aa.type.Type< TypeTuple >::ANY
static final Type ANY
Definition: Type.java:325
com.cliffc.aa.type.Type< TypeTuple >::check_name
static boolean check_name(String n)
Definition: Type.java:548
com.cliffc.aa.type.Type< TypeTuple >::meet
final Type meet(Type t)
Definition: Type.java:412
com.cliffc.aa.type.Type< TypeTuple >::TANY
static final byte TANY
Definition: Type.java:240
com.cliffc.aa.type.Type.str
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
Definition: Type.java:131
com.cliffc.aa.type.Type< TypeTuple >::TFUNPTR
static final byte TFUNPTR
Definition: Type.java:274
com.cliffc.aa.type.Type< TypeTuple >::TINT
static final byte TINT
Definition: Type.java:263
com.cliffc.aa.type.TypeTuple.IF_TRUE
static final TypeTuple IF_TRUE
Definition: TypeTuple.java:125
com.cliffc.aa.type.Type< TypeTuple >::ISA_SCALAR
static final byte[] ISA_SCALAR
Definition: Type.java:355
com.cliffc.aa.type.Type< TypeTuple >::ALL
static final Type ALL
Definition: Type.java:324
com.cliffc.aa.type.Type< TypeTuple >::ALL_TYPES
static Ary< Type > ALL_TYPES
Definition: Type.java:650
com.cliffc.aa.type.Type< TypeTuple >::TMEM
static final byte TMEM
Definition: Type.java:272
com.cliffc.aa.type.Type< TypeTuple >::TXNREAL
static final byte TXNREAL
Definition: Type.java:258
com.cliffc.aa.type.Type< TypeTuple >::TTUPLE
static final byte TTUPLE
Definition: Type.java:266
com.cliffc.aa.type.TypeTuple.xmeet1
TypeTuple xmeet1(TypeTuple tmax)
Definition: TypeTuple.java:170
com.cliffc.aa.type.Type.set_name
final T set_name(String name)
Definition: Type.java:551
com.cliffc.aa.type.Type._dual
T _dual
Definition: Type.java:100
com.cliffc.aa.type.Type< TypeTuple >::above_center
boolean above_center()
Definition: Type.java:741
com.cliffc.aa.type.Type< TypeTuple >::TALL
static final byte TALL
Definition: Type.java:239
com.cliffc.aa.type.Type< TypeTuple >::RECURSIVE_MEET
static int RECURSIVE_MEET
Definition: Type.java:163
com.cliffc.aa.type.Type< TypeTuple >::has_name
boolean has_name()
Definition: Type.java:549
com.cliffc.aa.type.Type< TypeTuple >::contains
final boolean contains(Type t)
Definition: Type.java:926
com.cliffc.aa.util.Util
Definition: Util.java:5
com.cliffc.aa.type.TypeTuple.make
static TypeTuple make()
Definition: TypeTuple.java:89
com.cliffc.aa.type.TypeTuple.len
int len()
Definition: TypeTuple.java:183
com.cliffc.aa.type.Type.xmeet
Type xmeet(Type t)
Definition: Type.java:461
com.cliffc.aa.type.TypeTuple.make0
static TypeTuple make0(boolean any, Type[] ts)
Definition: TypeTuple.java:87
com.cliffc.aa.type.TypeTuple.FLT64
static final TypeTuple FLT64
Definition: TypeTuple.java:137
com.cliffc.aa.type.TypeTuple.IF_ALL
static final TypeTuple IF_ALL
Definition: TypeTuple.java:123
com.cliffc.aa.type.Type< TypeTuple >::must_nil
boolean must_nil()
Definition: Type.java:845
com.cliffc.aa.type.Type< TypeTuple >::INTERN
static final ConcurrentHashMap< Type, Type > INTERN
Definition: Type.java:162
com.cliffc.aa.type.Type< TypeTuple >::mtname
final String mtname(Type t, Type mt)
Definition: Type.java:567
com.cliffc.aa.type.TypeTuple._any
boolean _any
Definition: TypeTuple.java:12
com.cliffc.aa.type.Type.sharptr
Type sharptr(Type ptr)
Definition: Type.java:930
com.cliffc.aa.type.Type.init
T init(byte type, String name)
Definition: Type.java:105
com.cliffc.aa.type.TypeTuple.equals
boolean equals(Object o)
Definition: TypeTuple.java:57
com.cliffc.aa.type.Type< TypeTuple >::TSCALAR
static final byte TSCALAR
Definition: Type.java:246
com.cliffc.aa.type.Type< TypeTuple >::TYPES
static final Type[] TYPES
Definition: Type.java:340
com.cliffc.aa.type.Type< TypeTuple >::TXSCALAR
static final byte TXSCALAR
Definition: Type.java:247
com.cliffc.aa.type.Type< TypeTuple >::TNIL
static final byte TNIL
Definition: Type.java:259
com.cliffc.aa.util.VBitSet
Definition: VBitSet.java:5
com.cliffc.aa.type.Type< TypeTuple >::is_simple
boolean is_simple()
Definition: Type.java:351
com.cliffc.aa.util.SB
Tight/tiny StringBuilder wrapper.
Definition: SB.java:8
com.cliffc.aa.type.TypeTuple.widen
TypeTuple widen()
Definition: TypeTuple.java:221
com.cliffc.aa.type.Type< TypeTuple >::NIL
static final Type NIL
Definition: Type.java:332
com.cliffc.aa.type.Type< TypeTuple >::TSIMPLE
static final byte TSIMPLE
Definition: Type.java:261
com.cliffc.aa.type.TypeTuple.isBitShape
byte isBitShape(Type t)
Definition: TypeTuple.java:229
com.cliffc.aa.type.Type< TypeTuple >::oop_deep_impl
Type oop_deep_impl(Type t)
Definition: Type.java:634
com.cliffc.aa.type.Type< TypeTuple >::equals
boolean equals(Object o)
Definition: Type.java:112
com.cliffc.aa.type.Type< TypeTuple >::SCALAR_PRIMS
static Type[] SCALAR_PRIMS
Definition: Type.java:349
com.cliffc.aa.type.Type< TypeTuple >::TCTRL
static final byte TCTRL
Definition: Type.java:241
com.cliffc.aa.type.Type< TypeTuple >::TNREAL
static final byte TNREAL
Definition: Type.java:257
com.cliffc.aa.type.Type._uid
int _uid
Definition: Type.java:96
com.cliffc.aa.type.TypeTuple.STRPTR
static final TypeTuple STRPTR
Definition: TypeTuple.java:138
com.cliffc.aa.type.TypeTuple.INT64_INT64
static final TypeTuple INT64_INT64
Definition: TypeTuple.java:139
com.cliffc.aa.util.SB.p
SB p(String s)
Definition: SB.java:13
com.cliffc.aa.type.Type._name
String _name
Definition: Type.java:99
com.cliffc.aa.type.TypeTuple.CALLE
static final TypeTuple CALLE
Definition: TypeTuple.java:131
com.cliffc.aa.type.TypeTuple.OOP_OOP
static final TypeTuple OOP_OOP
Definition: TypeTuple.java:141
com.cliffc.aa.type.Type< TypeTuple >::REAL
static final Type REAL
Definition: Type.java:334
com.cliffc.aa.type.Type< TypeTuple >::dual
final T dual()
Definition: Type.java:361
com.cliffc.aa.type.Type< TypeTuple >::oob
Type oob()
Definition: Type.java:635
com.cliffc.aa.type.TypeTuple._ts
Type[] _ts
Definition: TypeTuple.java:13
com.cliffc.aa.type.Type< TypeTuple >::XNIL
static final Type XNIL
Definition: Type.java:333
com.cliffc.aa.type.Type< TypeTuple >::POOLS
static final Pool[] POOLS
Definition: Type.java:281
com.cliffc.aa.type.Type< TypeTuple >::TOBJ
static final byte TOBJ
Definition: Type.java:267
com.cliffc.aa.type.TypeTuple.FLT64_FLT64
static final TypeTuple FLT64_FLT64
Definition: TypeTuple.java:140
com.cliffc.aa.type.Type< TypeTuple >::concat
static void concat(Ary< Type > ts, Type[] ts1)
Definition: Type.java:676
com.cliffc.aa.type.Type< TypeTuple >::TNSCALR
static final byte TNSCALR
Definition: Type.java:253
com.cliffc.aa.type.TypeTuple.INT64
static final TypeTuple INT64
Definition: TypeTuple.java:136
com.cliffc.aa.type.TypeTuple.rot
static int rot(int x, int k)
Definition: TypeTuple.java:23
com.cliffc.aa.type.TypeTuple.NO_ARGS
static final TypeTuple NO_ARGS
Definition: TypeTuple.java:135
com.cliffc.aa.util.SB.toString
String toString()
Definition: SB.java:62
com.cliffc.aa.type.Type< TypeTuple >::TXNSCALR
static final byte TXNSCALR
Definition: Type.java:254
com.cliffc.aa.type.TypeTuple.IF_FALSE
static final TypeTuple IF_FALSE
Definition: TypeTuple.java:126
com.cliffc.aa.type.Type< TypeTuple >::hashcons
T hashcons()
Definition: Type.java:165
com.cliffc.aa.type.Type< TypeTuple >::TXCTRL
static final byte TXCTRL
Definition: Type.java:242
com.cliffc.aa.type.Type< TypeTuple >::TXREAL
static final byte TXREAL
Definition: Type.java:256
com.cliffc.aa.type.Type< TypeTuple >::TFLT
static final byte TFLT
Definition: Type.java:264
com.cliffc.aa.type.TypeTuple.TEST1
static final TypeTuple TEST1
Definition: TypeTuple.java:133
com.cliffc.aa.type.TypeTuple.TEST0
static final TypeTuple TEST0
Definition: TypeTuple.java:132