aa
com.cliffc.aa.type.Type< T extends Type< T > Class Template Reference

an implementation of language AA More...

Inheritance diagram for com.cliffc.aa.type.Type< T extends Type< T >:
[legend]
Collaboration diagram for com.cliffc.aa.type.Type< T extends Type< T >:
[legend]

Classes

class  Key
 
class  Pool
 

Public Member Functions

boolean above (Type t)
 
boolean above_center ()
 
final boolean contains (Type t)
 
boolean cycle_equals (Type t)
 
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)
 
Type make_from (Type head, TypeMem map, VBitSet visit)
 
boolean may_be_con ()
 
boolean may_nil ()
 
final Type meet (Type t)
 
Type meet_loop (Type t2)
 
Type meet_nil (Type nil)
 
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 ()
 
final T set_name (String name)
 
Type sharptr (Type ptr)
 
Type simple_ptr ()
 
SB str (SB sb, VBitSet dups, TypeMem mem, boolean debug)
 
final String toString ()
 
void walk (Predicate< Type > p)
 
Type 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 ()
 

Public Attributes

int _hash
 
String _name
 
int _uid
 

Static Public Attributes

static final Type ALL = make( TALL )
 
static final Type ANY = make( TANY )
 
static final Type CTRL = make( TCTRL )
 
static final Type NIL = make( TNIL )
 
static final Type NSCALR = make( TNSCALR)
 
static final Type REAL = make( TREAL )
 
static int RECURSIVE_MEET
 
static final Type SCALAR = make( TSCALAR)
 
static final Type XCTRL = make(TXCTRL )
 
static final Type XNIL = make(TXNIL )
 
static final Type XNSCALR = make(TXNSCALR)
 
static final Type XSCALAR = make(TXSCALAR)
 

Protected Member Functions

 Type ()
 
Type clone ()
 
init (byte type, String name)
 
Type xmeet (Type t)
 

Package Functions

int compute_hash ()
 
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 ()
 
xdual ()
 

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

_dual
 
byte _type
 

Static Package Attributes

static final Type NREAL = make( TNREAL )
 
static final Pool[] POOLS = new Pool[TLAST]
 
static final byte TALL = 0
 
static final byte TANY = 1
 
static final byte TARY =21
 
static final byte TCTRL = 2
 
static final byte TFLD =23
 
static final byte TFLT =16
 
static final byte TFUNPTR =26
 
static final byte TFUNSIG =27
 
static final byte TINT =15
 
static final byte TLAST =29
 
static final byte TLIVE =28
 
static final byte TMEM =24
 
static final byte TMEMPTR =25
 
static final byte TNIL =12
 
static final byte TNREAL =10
 
static final byte TNSCALR = 6
 
static final byte TOBJ =19
 
static final byte TREAL = 8
 
static final byte TRPC =17
 
static final byte TSCALAR = 4
 
static final byte TSIMPLE =14
 
static final byte TSTR =22
 
static final byte TSTRUCT =20
 
static final byte TTUPLE =18
 
static final byte TXCTRL = 3
 
static final byte TXNIL =13
 
static final byte TXNREAL =11
 
static final byte TXNSCALR = 7
 
static final byte TXREAL = 9
 
static final byte TXSCALAR = 5
 

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 ()
 
Type xmt_name (Type t, Type mt)
 

Static Private Attributes

static Ary< TypeALL_TYPES
 
static int CNT =1
 
static final ConcurrentHashMap< Type, TypeINTERN = new ConcurrentHashMap<>()
 
static final byte[] ISA_SCALAR = new byte[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1,0, 1,1,1,0,0,0,0,0,0,0,1,1,0,0}
 
static Type[] SCALAR_PRIMS
 
static final String[] STRS = new String[]{"all","any","Ctrl","~Ctrl","Scalar","~Scalar","nScalar","~nScalar","Real","~Real","nReal","~nReal","nil","0"}
 
static final Type[] TYPES = new Type[]{ALL,CTRL,SCALAR,NSCALR,REAL,NREAL}
 
static final Type XNREAL = make(TXNREAL )
 
static final Type XREAL = make(TXREAL )
 

Detailed Description

an implementation of language AA

Definition at line 94 of file Type.java.

Constructor & Destructor Documentation

◆ Type()

com.cliffc.aa.type.Type< T extends Type< T >.Type ( )
protected

Definition at line 102 of file Type.java.

102 { _uid = _uid(); }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.clone(), com.cliffc.aa.type.Type< TypeFlt >.equals(), and com.cliffc.aa.type.Type< TypeFlt >.xdual().

Here is the caller graph for this function:

Member Function Documentation

◆ [static initializer]()

com.cliffc.aa.type.Type< T extends Type< T >.[static initializer]
staticpackage

◆ _set_name()

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

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  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.remove_name(), and com.cliffc.aa.type.Type< TypeFlt >.set_name().

Here is the caller graph for this function:

◆ _uid()

int com.cliffc.aa.type.Type< T extends Type< T >._uid ( )
private

Definition at line 103 of file Type.java.

103 { return CNT++; }

◆ above()

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

Definition at line 625 of file Type.java.

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

◆ above_center()

boolean com.cliffc.aa.type.Type< T extends Type< T >.above_center ( )

Definition at line 741 of file Type.java.

741  {
742  switch( _type ) {
743  case TALL:
744  case TCTRL:
745  case TREAL: case TNREAL:
746  case TSCALAR: case TNSCALR:
747  case TNIL:
748  return false; // These are all below center
749  case TANY:
750  case TXCTRL:
751  case TXREAL: case TXNREAL:
752  case TXSCALAR: case TXNSCALR:
753  case TXNIL:
754  return true; // These are all above center
755  default: throw typerr(null);// Overridden in subclass
756  }
757  }

Referenced by com.cliffc.aa.node.MemPrimNode.LValueLength._live_use(), com.cliffc.aa.node.LoadNode._live_use(), com.cliffc.aa.type.TypeFunPtr.above_center(), com.cliffc.aa.HM.HM9.Apply.add_val_work(), com.cliffc.aa.HM.HM.Apply.add_val_work(), com.cliffc.aa.HM.HM9.If.apply(), com.cliffc.aa.HM.HM.If.apply(), com.cliffc.aa.HM.HM9.EQ.apply(), com.cliffc.aa.HM.HM9.EQ0.apply(), com.cliffc.aa.HM.HM.EQ.apply(), com.cliffc.aa.HM.HM9.IsEmpty.apply(), com.cliffc.aa.HM.HM.EQ0.apply(), com.cliffc.aa.HM.HM.IsEmpty.apply(), com.cliffc.aa.HM.HM9.Mul.apply(), com.cliffc.aa.HM.HM.Mul.apply(), com.cliffc.aa.HM.HM.Add.apply(), com.cliffc.aa.HM.HM9.Dec.apply(), com.cliffc.aa.HM.HM9.Str.apply(), com.cliffc.aa.HM.HM.Dec.apply(), com.cliffc.aa.HM.HM9.Factor.apply(), com.cliffc.aa.HM.HM.Str.apply(), com.cliffc.aa.HM.HM.Factor.apply(), com.cliffc.aa.node.ScopeNode.compute_live_mem(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.node.CEProjNode.good_call(), com.cliffc.aa.type.Type< TypeFlt >.high(), com.cliffc.aa.HM.HM9.If.hm(), com.cliffc.aa.HM.HM.If.hm(), com.cliffc.aa.node.StoreNode.ideal_reduce(), com.cliffc.aa.type.Type< TypeFlt >.isBitShape(), com.cliffc.aa.node.PhiNode.live_use(), com.cliffc.aa.node.NewObjNode.live_use(), com.cliffc.aa.node.CallEpiNode.live_use(), com.cliffc.aa.node.CallNode.live_use(), com.cliffc.aa.node.CallNode.live_use_call(), com.cliffc.aa.type.Type< TypeFlt >.mtname(), com.cliffc.aa.type.Type< TypeFlt >.oob(), com.cliffc.aa.HM.HM9.Apply.val(), com.cliffc.aa.HM.HM.Apply.val(), com.cliffc.aa.HM.HM.Root.val(), com.cliffc.aa.HM.HM9.Field.val(), com.cliffc.aa.HM.HM.Field.val(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.NewStrNode.AddStrStr.value(), com.cliffc.aa.node.StoreNode.value(), com.cliffc.aa.node.PrimNode.value(), com.cliffc.aa.node.PrimNode.AndI64.value(), com.cliffc.aa.node.PrimNode.OrI64.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.value(), com.cliffc.aa.node.PrimNode.NE_OOP.value(), com.cliffc.aa.node.PrimNode.RandI64.value(), com.cliffc.aa.node.NewStrNode.ConvertI64Str.valueobj(), com.cliffc.aa.node.NewStrNode.ConvertF64Str.valueobj(), com.cliffc.aa.node.PrimNode.EQ_OOP.vs_nil(), and com.cliffc.aa.type.Type< TypeFlt >.xmt_name().

Here is the caller graph for this function:

◆ ALL_TYPES()

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

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  }

◆ check_commute()

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

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  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.check_startup().

Here is the caller graph for this function:

◆ check_name()

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

Definition at line 548 of file Type.java.

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

Referenced by com.cliffc.aa.type.Type< TypeFlt >.mtname(), and com.cliffc.aa.type.Type< TypeFlt >.set_name().

Here is the caller graph for this function:

◆ check_startup()

static boolean com.cliffc.aa.type.Type< T extends Type< T >.check_startup ( )
staticpackage

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  }

Referenced by com.cliffc.aa.type.TestType.testCommuteSymmetricAssociative().

Here is the caller graph for this function:

◆ check_symmetric()

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

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 ( )
protected

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  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >._set_name(), com.cliffc.aa.type.TypeStruct._sharp(), com.cliffc.aa.type.TypeStruct.ax_impl_fptr(), com.cliffc.aa.type.TypeStruct.ax_impl_ptr(), com.cliffc.aa.type.Type< TypeFlt >.clone(), com.cliffc.aa.type.TypeMem.crush(), com.cliffc.aa.type.TypeMem.flatten_fields(), com.cliffc.aa.type.Type< T extends Type< T >.Pool.malloc(), com.cliffc.aa.type.TypeMem.remove(), and com.cliffc.aa.type.TypeMem.widen().

Here is the caller graph for this function:

◆ compute_hash()

int com.cliffc.aa.type.Type< T extends Type< T >.compute_hash ( )
package

Definition at line 109 of file Type.java.

109 { return (_type<<1)|1|_name.hashCode(); }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.hashcons(), com.cliffc.aa.type.Type< TypeFlt >.intern_check0(), com.cliffc.aa.type.TypeStruct.post_mod(), and com.cliffc.aa.type.TypeStruct.shrink().

Here is the caller graph for this function:

◆ concat()

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

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  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.ALL_TYPES().

Here is the caller graph for this function:

◆ contains() [1/2]

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

Definition at line 926 of file Type.java.

926 { return contains(t,null); }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.contains(), com.cliffc.aa.type.TypeStruct.contains(), and com.cliffc.aa.node.PhiNode.err().

Here is the caller graph for this function:

◆ contains() [2/2]

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

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< T extends Type< T >  t)
package

Definition at line 865 of file Type.java.

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

Referenced by com.cliffc.aa.type.Type< TypeFlt >.xmeet().

Here is the caller graph for this function:

◆ cycle_equals()

boolean com.cliffc.aa.type.Type< T extends Type< T >.cycle_equals ( Type< T extends Type< T >  t)

Definition at line 118 of file Type.java.

118  {
119  assert is_simple(); // Overridden in subclasses
120  return _type==t._type && Util.eq(_name,t._name);
121  }

Referenced by com.cliffc.aa.type.TypeFld.cycle_equals(), com.cliffc.aa.type.TypeFunPtr.cycle_equals(), and com.cliffc.aa.type.TypeStruct.cycle_equals0().

Here is the caller graph for this function:

◆ dual()

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

Definition at line 361 of file Type.java.

361 { return _dual; }

Referenced by com.cliffc.aa.type.TypeStruct._dull(), com.cliffc.aa.node.PrimNode.ConvertTypeName.apply(), com.cliffc.aa.HM.HM9.EQ.apply(), com.cliffc.aa.HM.HM9.EQ0.apply(), com.cliffc.aa.HM.HM.EQ.apply(), com.cliffc.aa.HM.HM9.IsEmpty.apply(), com.cliffc.aa.HM.HM.EQ0.apply(), com.cliffc.aa.HM.HM.IsEmpty.apply(), com.cliffc.aa.HM.HM9.Mul.apply(), com.cliffc.aa.HM.HM.Mul.apply(), com.cliffc.aa.HM.HM9.Dec.apply(), com.cliffc.aa.HM.HM.Add.apply(), com.cliffc.aa.HM.HM9.Str.apply(), com.cliffc.aa.HM.HM.Dec.apply(), com.cliffc.aa.HM.HM9.Factor.apply(), com.cliffc.aa.HM.HM.Str.apply(), com.cliffc.aa.HM.HM.Factor.apply(), com.cliffc.aa.node.FunNode.bad_mem_use(), com.cliffc.aa.node.CallEpiNode.esc_out(), com.cliffc.aa.type.Type< TypeFlt >.high(), com.cliffc.aa.node.ScopeNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.type.Type< TypeFlt >.join(), com.cliffc.aa.type.TypeFunPtr.meet_nil(), com.cliffc.aa.type.TypeInt.not_nil(), com.cliffc.aa.type.Bits< BitsRPC >.oob(), com.cliffc.aa.type.Type< TypeFlt >.oob(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2(), com.cliffc.aa.type.TestType.testCrush(), com.cliffc.aa.type.TestType.testFunction(), com.cliffc.aa.type.TestType.testLoad(), com.cliffc.aa.node.TestNodeSmall.testMemoryArgs(), com.cliffc.aa.type.TestType.testNamesInts(), com.cliffc.aa.type.TestType.testOOPsNulls(), com.cliffc.aa.type.TestType.testStructTuple(), com.cliffc.aa.node.TestNodeSmall.testUnresolvedAdd(), com.cliffc.aa.node.UnresolvedNode.value(), com.cliffc.aa.node.IntrinsicNode.value(), com.cliffc.aa.node.PrimNode.value(), com.cliffc.aa.node.CallEpiNode.value(), com.cliffc.aa.node.PrimNode.AndI64.value(), com.cliffc.aa.node.PrimNode.OrI64.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.value(), com.cliffc.aa.node.CallNode.value(), com.cliffc.aa.node.PrimNode.NE_OOP.value(), com.cliffc.aa.node.PrimNode.Not.value(), com.cliffc.aa.node.PrimNode.RandI64.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.vs_nil(), com.cliffc.aa.type.TypeAry.xdual(), com.cliffc.aa.type.TypeFunPtr.xdual(), com.cliffc.aa.type.TypeFunSig.xdual(), com.cliffc.aa.type.TypeMemPtr.xdual(), and com.cliffc.aa.type.Type< TypeFlt >.xmt_name().

Here is the caller graph for this function:

◆ eq()

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

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.Type< T extends Type< T >.equals ( Object  o)

Definition at line 112 of file Type.java.

112  {
113  if( this == o ) return true;
114  if( !(o instanceof Type) ) return false;
115  Type t = (Type)o;
116  return _type==t._type && Util.eq(_name,t._name);
117  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.hashcons().

Here is the caller graph for this function:

◆ getd()

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

Definition at line 804 of file Type.java.

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

Referenced by com.cliffc.aa.TestParse.testParse07(), and com.cliffc.aa.node.NewStrNode.ConvertF64Str.valueobj().

Here is the caller graph for this function:

◆ getl()

◆ getstr()

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

Definition at line 806 of file Type.java.

806 { throw typerr(null); }

Referenced by com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM9.IsEmpty.apply(), com.cliffc.aa.HM.HM.IsEmpty.apply(), com.cliffc.aa.tvar.TV2.str(), and com.cliffc.aa.HM.HM8.T2.str().

Here is the caller graph for this function:

◆ has_name()

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

Definition at line 549 of file Type.java.

549 { return !_name.isEmpty(); }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.isBitShape(), and com.cliffc.aa.type.Type< TypeFlt >.remove_name().

Here is the caller graph for this function:

◆ hashCode()

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

Definition at line 106 of file Type.java.

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

Referenced by com.cliffc.aa.node.PhiNode.hashCode().

Here is the caller graph for this function:

◆ hashcons()

T com.cliffc.aa.type.Type< T extends Type< T >.hashcons ( )
private

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  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.hashcons_free().

Here is the caller graph for this function:

◆ hashcons_free()

final T com.cliffc.aa.type.Type< T extends Type< T >.hashcons_free ( )
package

◆ high()

Type com.cliffc.aa.type.Type< T extends Type< T >.high ( )

Definition at line 796 of file Type.java.

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

◆ init()

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

Definition at line 105 of file Type.java.

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

Referenced by com.cliffc.aa.type.Type< TypeFlt >.make().

Here is the caller graph for this function:

◆ init0()

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

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  }

Referenced by com.cliffc.aa.node.ScopeNode.init().

Here is the caller graph for this function:

◆ intern_check()

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

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  }

Referenced by com.cliffc.aa.HM.HM9.T2.as_flow(), and com.cliffc.aa.HM.HM.T2.as_flow().

Here is the caller graph for this function:

◆ intern_check0()

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

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 ( )
package

Definition at line 227 of file Type.java.

227 { return true; }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.intern_check0().

Here is the caller graph for this function:

◆ intern_find()

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

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 ( )
package

Definition at line 210 of file Type.java.

210 { return INTERN.get(this); }

Referenced by com.cliffc.aa.type.TypeStruct.check_uf(), com.cliffc.aa.type.TypeFld.intern_check1(), com.cliffc.aa.type.TypeMemPtr.intern_check1(), com.cliffc.aa.type.TypeStruct.intern_check1(), and com.cliffc.aa.type.TypeStruct.shrink().

Here is the caller graph for this function:

◆ intern_size()

static int com.cliffc.aa.type.Type< T extends Type< T >.intern_size ( )
staticpackage

Definition at line 211 of file Type.java.

211 { return INTERN.size(); }

◆ interned()

◆ is_con()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_con ( )

◆ is_display()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_display ( )
package

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 ( )

Definition at line 941 of file Type.java.

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

Referenced by com.cliffc.aa.Parse.get_display_ptr(), com.cliffc.aa.type.TypeFunSig.init(), com.cliffc.aa.type.TypeFld.is_display_ptr(), com.cliffc.aa.type.TypeFunPtr.make(), com.cliffc.aa.type.TypeTuple.make_args(), and com.cliffc.aa.TestParse.testParse06().

Here is the caller graph for this function:

◆ is_forward_ref()

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

Definition at line 799 of file Type.java.

799 { return false; }

Referenced by com.cliffc.aa.tvar.TV2._find_tvar(), and com.cliffc.aa.node.CastNode.value().

Here is the caller graph for this function:

◆ is_num()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_num ( )
private

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; }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.isBitShape(), and com.cliffc.aa.type.Type< TypeFlt >.xmeet().

Here is the caller graph for this function:

◆ is_ptr()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_ptr ( )
private

Definition at line 352 of file Type.java.

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

Referenced by com.cliffc.aa.type.Type< TypeFlt >.xmeet().

Here is the caller graph for this function:

◆ is_simple()

boolean com.cliffc.aa.type.Type< T extends Type< T >.is_simple ( )
private

Definition at line 351 of file Type.java.

351 { return _type < TSIMPLE; }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.check_commute(), com.cliffc.aa.type.Type< TypeFlt >.cycle_equals(), com.cliffc.aa.type.Type< TypeFlt >.meet(), com.cliffc.aa.type.Type< TypeFlt >.walk(), com.cliffc.aa.type.Type< TypeFlt >.xmeet(), and com.cliffc.aa.type.Type< TypeFlt >.xmt_name().

Here is the caller graph for this function:

◆ isa()

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

Definition at line 623 of file Type.java.

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

Referenced by com.cliffc.aa.HM.HM9.T2._can_be_HM_base(), com.cliffc.aa.HM.HM.T2._can_be_HM_base(), com.cliffc.aa.node.TestNodeSmall._testMonotonicChain(), com.cliffc.aa.type.TypeMem.all_reaching_aliases(), com.cliffc.aa.node.PrimNode.ConvertTypeName.apply(), com.cliffc.aa.node.TestNodeSmall.check(), com.cliffc.aa.GVNGCM.check_not_monotonic(), com.cliffc.aa.node.RetNode.check_phi_type(), com.cliffc.aa.type.Type< TypeFlt >.check_startup(), com.cliffc.aa.node.ScopeNode.compute_live_mem(), com.cliffc.aa.node.Node.do_flow(), com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.PrimNode.err(), com.cliffc.aa.node.PrimNode.ConvertTypeName.err(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.node.CallNode.get_alias(), com.cliffc.aa.HM.HM9.hm(), com.cliffc.aa.HM.HM.hm(), com.cliffc.aa.node.CallNode.ideal_grow(), com.cliffc.aa.node.FunNode.ideal_inline(), com.cliffc.aa.node.AssertNode.ideal_reduce(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.type.Type< TypeFlt >.isBitShape(), com.cliffc.aa.type.TypeStruct.isBitShape(), com.cliffc.aa.node.CallNode.live_use(), com.cliffc.aa.node.Node.more_flow(), com.cliffc.aa.node.FreshNode.no_tvar_structure(), com.cliffc.aa.node.TestNode.redo_(), com.cliffc.aa.node.TestNode.set_value_type(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.Parse.term(), com.cliffc.aa.TestParse.test_isa(), com.cliffc.aa.TestParse.test_obj_isa(), com.cliffc.aa.type.TestType.testBits(), com.cliffc.aa.type.TestType.testBits0(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve(), com.cliffc.aa.type.TestType.testCrush0(), com.cliffc.aa.type.TestType.testFunction(), com.cliffc.aa.type.TestType.testOOPsNulls(), com.cliffc.aa.node.TestNodeSmall.testRecursiveDisplay(), com.cliffc.aa.type.TestType.testStructTuple(), com.cliffc.aa.node.TestNodeSmall.testUnresolvedAdd(), com.cliffc.aa.node.FunNode.type_special(), com.cliffc.aa.Parse.typechk(), com.cliffc.aa.HM.HM9.T2.union(), com.cliffc.aa.HM.HM.T2.union(), com.cliffc.aa.type.TypeAry.update(), com.cliffc.aa.HM.HM9.Apply.val(), com.cliffc.aa.HM.HM.Apply.val(), com.cliffc.aa.node.ParmNode.valid_args(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.NewStrNode.AddStrStr.value(), com.cliffc.aa.node.AssertNode.value(), com.cliffc.aa.node.IntrinsicNode.value(), com.cliffc.aa.node.MemPrimNode.LValueWrite.value(), com.cliffc.aa.node.MemPrimNode.LValueWriteFinal.value(), com.cliffc.aa.node.PrimNode.AndI64.value(), com.cliffc.aa.node.PrimNode.OrI64.value(), com.cliffc.aa.node.PrimNode.RandI64.value(), and com.cliffc.aa.node.PrimNode.EQ_OOP.vs_nil().

Here is the caller graph for this function:

◆ isa_scalar()

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

Definition at line 356 of file Type.java.

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

Referenced by com.cliffc.aa.type.Type< TypeFlt >.xmeet().

Here is the caller graph for this function:

◆ isBitShape()

byte com.cliffc.aa.type.Type< T extends Type< T >.isBitShape ( Type< T extends Type< T >  t)

Definition at line 814 of file Type.java.

814  {
815  if( has_name() || t.has_name() ) throw com.cliffc.aa.AA.unimpl();
816  if( _type == TNIL || _type==TXNIL ) return 0; // Nil is free to convert always
817  if( above_center() && isa(t) ) return 0; // Can choose compatible format
818  if( _type == t._type ) return 0; // Same type is OK
819  if( t._type==TSCALAR ) return 0; // Generic function arg never requires a conversion
820  if( _type == TALL || t._type==TALL || _type == TSCALAR || _type == TNSCALR ) return -1; // Scalar has to resolve
821  if( (_type == TREAL || _type == TNREAL) && t.is_num() ) return -1; // Real->Int/Flt has to resolve
822  if( t._type == TNIL || t._type == TXNIL ) return (byte)(may_nil() ? -1 : 99); // Must resolve to a NIL first
823 
824  throw typerr(t); // Overridden in subtypes
825  }

Referenced by com.cliffc.aa.node.CallEpiNode.ideal_reduce(), and com.cliffc.aa.node.CallNode.least_cost().

Here is the caller graph for this function:

◆ join()

◆ make()

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

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_from()

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

Definition at line 945 of file Type.java.

945 { return this; }

Referenced by com.cliffc.aa.node.ConTypeNode.def_fref(), com.cliffc.aa.type.TypeFld.make_from(), com.cliffc.aa.type.TypeMemPtr.make_from(), and com.cliffc.aa.node.ConTypeNode.value().

Here is the caller graph for this function:

◆ may_be_con()

boolean com.cliffc.aa.type.Type< T extends Type< T >.may_be_con ( )

Definition at line 759 of file Type.java.

759  {
760  switch( _type ) {
761  case TALL:
762  case TSCALAR: case TNSCALR:
763  case TREAL: case TNREAL:
764  case TXCTRL:
765  case TCTRL:
766  return false; // These all include not-constant things
767  case TANY:
768  case TXREAL: case TXNREAL:
769  case TXSCALAR: case TXNSCALR:
770  case TNIL: case TXNIL:
771  return true; // These all include some constants
772  default: throw typerr(null);
773  }
774  }

Referenced by com.cliffc.aa.node.Node.do_flow(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.Node.live_uses(), and com.cliffc.aa.type.TypeFunPtr.may_be_con().

Here is the caller graph for this function:

◆ may_nil()

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

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  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.isBitShape().

Here is the caller graph for this function:

◆ meet()

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

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  }

Referenced by com.cliffc.aa.type.TypeStruct._dull(), com.cliffc.aa.type.TypeMem._meet(), com.cliffc.aa.type.Type< TypeFlt >.above(), com.cliffc.aa.HM.HM.Root.add_sig(), com.cliffc.aa.HM.HM9.Apply.add_val_work(), com.cliffc.aa.HM.HM.Apply.add_val_work(), com.cliffc.aa.HM.HM9.If.apply(), com.cliffc.aa.HM.HM.If.apply(), com.cliffc.aa.type.TypeStruct.ax_meet(), com.cliffc.aa.type.Type< TypeFlt >.check_startup(), com.cliffc.aa.type.TypeStruct.cyclic_meet(), com.cliffc.aa.HM.HM9.T2.fput(), com.cliffc.aa.HM.HM.T2.fput(), com.cliffc.aa.tvar.TV2.fresh_base(), com.cliffc.aa.HM.HM4.T2.fresh_base(), com.cliffc.aa.HM.HM5.T2.fresh_base(), com.cliffc.aa.HM.HM6.T2.fresh_base(), com.cliffc.aa.HM.HM7.T2.fresh_base(), com.cliffc.aa.HM.HM8.T2.fresh_base(), com.cliffc.aa.HM.HM.NotNil.hm(), com.cliffc.aa.type.Type< TypeFlt >.isa(), com.cliffc.aa.type.TypeMem.ld(), com.cliffc.aa.node.CallNode.least_cost(), com.cliffc.aa.node.Node.live(), com.cliffc.aa.node.NewStrNode.AddStrStr.live_use(), com.cliffc.aa.node.CallNode.live_use(), com.cliffc.aa.HM.HM9.T2.meet_flow(), com.cliffc.aa.HM.HM.T2.meet_flow(), com.cliffc.aa.type.Type< TypeFlt >.meet_loop(), com.cliffc.aa.node.Node.merge(), com.cliffc.aa.type.TypeMem.st_new(), com.cliffc.aa.type.TestApprox.testApprox3(), com.cliffc.aa.type.TestType.testBits(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2(), com.cliffc.aa.type.TestType.testFunction(), com.cliffc.aa.type.TestType.testNameCycle(), com.cliffc.aa.type.TestType.testNamesInts(), com.cliffc.aa.type.TestType.testOOPsNulls(), com.cliffc.aa.type.TestType.testRecursive(), com.cliffc.aa.type.TestType.testStructTuple(), com.cliffc.aa.tvar.TV2.unify_base(), com.cliffc.aa.HM.HM7.T2.unify_base(), com.cliffc.aa.HM.HM8.T2.unify_base(), com.cliffc.aa.HM.HM1.HMVar.union(), com.cliffc.aa.HM.HM2.HMVar.union(), com.cliffc.aa.HM.HM3.HMVar.union(), com.cliffc.aa.type.TypeAry.update(), com.cliffc.aa.type.TypeStruct.update(), com.cliffc.aa.HM.HM9.Apply.val(), com.cliffc.aa.HM.HM.Apply.val(), com.cliffc.aa.HM.HM.Root.val(), com.cliffc.aa.node.UnresolvedNode.value(), com.cliffc.aa.node.PhiNode.value(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.CallEpiNode.value(), com.cliffc.aa.node.PrimNode.RandI64.value(), com.cliffc.aa.type.TypeAry.xmeet(), com.cliffc.aa.type.TypeFld.xmeet(), com.cliffc.aa.type.TypeFunSig.xmeet(), com.cliffc.aa.type.TypeFunPtr.xmeet(), com.cliffc.aa.type.TypeMemPtr.xmeet(), and com.cliffc.aa.HM.HM9.Root.xval().

Here is the caller graph for this function:

◆ meet_loop()

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

Definition at line 628 of file Type.java.

628 { return meet(t2); }

Referenced by com.cliffc.aa.type.TypeMem._meet(), and com.cliffc.aa.node.PhiNode.value().

Here is the caller graph for this function:

◆ meet_nil()

Type com.cliffc.aa.type.Type< T extends Type< T >.meet_nil ( Type< T extends Type< T >  nil)

Definition at line 904 of file Type.java.

904  {
905  assert nil==NIL || nil==XNIL;
906  switch( _type ) {
907  case TANY:
908  case TXREAL:
909  case TXSCALAR:
910  case TXNIL: return nil; // Preserve high/low flavor
911  case TNIL: return NIL;
912  case TXNREAL:
913  case TXNSCALR: return TypeInt.BOOL;
914  case TREAL: case TNREAL: return REAL;
915  case TSCALAR: case TNSCALR: return SCALAR;
916  case TCTRL: case TXCTRL:
917  case TOBJ:
918  case TSTR:
919  case TSTRUCT:
920  case TMEM: return ALL;
921  default: throw typerr(null); // Overridden in subclass
922  }
923  }

Referenced by com.cliffc.aa.HM.HM.T2._find_nil(), com.cliffc.aa.HM.HM.T2._fresh_unify(), com.cliffc.aa.HM.HM9.EQ0.apply(), com.cliffc.aa.HM.HM.EQ0.apply(), com.cliffc.aa.HM.HM.NotNil.hm(), com.cliffc.aa.Parse.typeq(), com.cliffc.aa.node.IfNode.value(), and com.cliffc.aa.type.Type< TypeFlt >.xmeet().

Here is the caller graph for this function:

◆ mtname()

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

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  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.xmt_name().

Here is the caller graph for this function:

◆ must_nil()

boolean com.cliffc.aa.type.Type< T extends Type< T >.must_nil ( )

Definition at line 845 of file Type.java.

845  {
846  switch( _type ) {
847  case TALL:
848  case TREAL:
849  case TSCALAR:
850  case TNIL: case TXNIL:
851  case TCTRL: // Nonsense, only for IfNode.value test
852  case TXCTRL: // Nonsense, only for IfNode.value test
853  case TMEM: // Nonsense, only for IfNode.value test
854  return true; // These all must include a nil
855  case TANY: // All above-center types are not required to include a nil
856  case TXREAL:
857  case TXSCALAR:
858  case TXNSCALR: case TNSCALR:
859  case TXNREAL: case TNREAL:
860  return false; // These all may be non-nil
861  default: throw typerr(null); // Overridden in subclass
862  }
863  }

Referenced by com.cliffc.aa.HM.HM9.If.apply(), com.cliffc.aa.HM.HM.If.apply(), com.cliffc.aa.type.Type< TypeFlt >.cross_nil(), com.cliffc.aa.node.MemPrimNode.err(), com.cliffc.aa.node.StoreNode.err(), com.cliffc.aa.node.LoadNode.err(), com.cliffc.aa.HM.HM9.If.hm(), com.cliffc.aa.HM.HM.If.hm(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.PrimNode.Not.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.vs_nil(), and com.cliffc.aa.type.Type< TypeFlt >.xmeet().

Here is the caller graph for this function:

◆ not_nil()

Type com.cliffc.aa.type.Type< T extends Type< T >.not_nil ( )
package

Definition at line 893 of file Type.java.

893  {
894  switch( _type ) {
895  case TXSCALAR: return XNSCALR;
896  case TXREAL : return XNREAL ;
897  case TSCALAR: case TNSCALR: case TXNSCALR:
898  case TREAL: case TNREAL: case TXNREAL:
899  case TNIL: case TXNIL:
900  return this;
901  default: throw typerr(null); // Overridden in subclass
902  }
903  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.xmeet().

Here is the caller graph for this function:

◆ oob() [1/6]

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

Definition at line 635 of file Type.java.

635 { return oob(ALL); }

Referenced by com.cliffc.aa.node.MemPrimNode.LValueLength._live_use(), com.cliffc.aa.node.LoadNode._live_use(), com.cliffc.aa.type.TypeMem.at(), com.cliffc.aa.node.ScopeNode.compute_live_mem(), com.cliffc.aa.node.CallNode.escapees(), com.cliffc.aa.node.LoadNode.get_fld(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.MemPrimNode.ReadPrimNode.live_use(), com.cliffc.aa.node.NewStrNode.AddStrStr.live_use(), com.cliffc.aa.node.CallNode.live_use(), com.cliffc.aa.type.TypeMem.make0(), com.cliffc.aa.type.Type< TypeFlt >.oob(), com.cliffc.aa.type.Type< TypeFlt >.oop_deep_impl(), com.cliffc.aa.node.CallNode.tesc(), com.cliffc.aa.node.DefMemNode.value(), com.cliffc.aa.node.ProjNode.value(), com.cliffc.aa.node.MProjNode.value(), com.cliffc.aa.node.MemSplitNode.value(), com.cliffc.aa.node.CastNode.value(), com.cliffc.aa.node.UnresolvedNode.value(), com.cliffc.aa.node.FP2DispNode.value(), com.cliffc.aa.node.PhiNode.value(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.NewStrNode.AddStrStr.value(), com.cliffc.aa.node.MrgProjNode.value(), com.cliffc.aa.node.MemPrimNode.LValueLength.value(), com.cliffc.aa.node.AssertNode.value(), com.cliffc.aa.node.StoreNode.value(), com.cliffc.aa.node.MemJoinNode.value(), com.cliffc.aa.node.MemPrimNode.LValueRead.value(), com.cliffc.aa.node.LoadNode.value(), com.cliffc.aa.node.MemPrimNode.LValueWrite.value(), com.cliffc.aa.node.MemPrimNode.LValueWriteFinal.value(), com.cliffc.aa.node.CallEpiNode.value(), com.cliffc.aa.node.CallNode.value(), com.cliffc.aa.node.PrimNode.RandI64.value(), com.cliffc.aa.node.NewAryNode.NewAry.valueobj(), com.cliffc.aa.node.NewStrNode.ConvertI64Str.valueobj(), and com.cliffc.aa.node.NewStrNode.ConvertF64Str.valueobj().

Here is the caller graph for this function:

◆ oob() [2/6]

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

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)

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)

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)

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)

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< T extends Type< T >  t)

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< T extends Type< T >  t)

Definition at line 634 of file Type.java.

634 { return oob(); }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.oob_deep(), and com.cliffc.aa.type.TypeMemPtr.oop_deep_impl().

Here is the caller graph for this function:

◆ rdual()

T com.cliffc.aa.type.Type< T extends Type< T >.rdual ( )
package

Definition at line 366 of file Type.java.

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

Referenced by com.cliffc.aa.type.TypeFld.rdual(), com.cliffc.aa.type.TypeFunPtr.rdual(), and com.cliffc.aa.type.TypeMemPtr.rdual().

Here is the caller graph for this function:

◆ remove_name()

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

Definition at line 556 of file Type.java.

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

Referenced by com.cliffc.aa.node.IntrinsicNode.ideal_reduce(), and com.cliffc.aa.node.IntrinsicNode.value().

Here is the caller graph for this function:

◆ repeats_in_cycles()

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

Definition at line 938 of file Type.java.

938 { return null; }

◆ retern()

final T com.cliffc.aa.type.Type< T extends Type< T >.retern ( )
package

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  }

◆ set_name()

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

Definition at line 551 of file Type.java.

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

Referenced by com.cliffc.aa.node.PrimNode.ConvertTypeName.apply(), com.cliffc.aa.type.TestType.testNamesInts(), com.cliffc.aa.TestParse.testParse04(), com.cliffc.aa.TestParse.testParse06(), com.cliffc.aa.Parse.tstmt(), com.cliffc.aa.Parse.type0(), com.cliffc.aa.node.IntrinsicNode.value(), and com.cliffc.aa.type.Type< TypeFlt >.xmt_name().

Here is the caller graph for this function:

◆ sharptr()

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

Definition at line 930 of file Type.java.

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

Referenced by com.cliffc.aa.node.TestNodeSmall.check(), com.cliffc.aa.node.IntrinsicNode.ideal_reduce(), com.cliffc.aa.node.Node.sharptr(), and com.cliffc.aa.TestParse.test_isa().

Here is the caller graph for this function:

◆ simple_ptr()

◆ str()

◆ toString()

◆ typerr()

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

◆ untern()

final T com.cliffc.aa.type.Type< T extends Type< T >.untern ( )
package

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< T extends Type< T > >  p)

Definition at line 936 of file Type.java.

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

Referenced by com.cliffc.aa.type.TypeFunPtr.walk(), and com.cliffc.aa.type.TypeFld.walk().

Here is the caller graph for this function:

◆ widen()

Type com.cliffc.aa.type.Type< T extends Type< T >.widen ( )

Definition at line 828 of file Type.java.

828  {
829  switch( _type ) {
830  case TREAL: case TXREAL:
831  case TSCALAR: case TXSCALAR:
832  case TNSCALR: case TXNSCALR:
833  case TNIL: case TXNIL:
834  return SCALAR;
835  case TANY : case TALL :
836  return this;
837  case TCTRL: case TXCTRL:
838  return Type.CTRL;
839  default: throw typerr(null); // Overridden in subclass
840  }
841  }

Referenced by com.cliffc.aa.HM.HM9.T2._can_be_HM_base(), com.cliffc.aa.HM.HM.T2._can_be_HM_base(), com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.node.FunNode.find_type_split_index(), com.cliffc.aa.tvar.TV2.make_base(), com.cliffc.aa.HM.HM9.T2.union(), com.cliffc.aa.HM.HM.T2.union(), com.cliffc.aa.HM.HM9.T2.walk_types_in(), com.cliffc.aa.HM.HM.T2.walk_types_in(), and com.cliffc.aa.type.TypeStruct.widen().

Here is the caller graph for this function:

◆ xdual()

T com.cliffc.aa.type.Type< T extends Type< T >.xdual ( )
package

Definition at line 365 of file Type.java.

365 { return (T)new Type().init((byte)(_type^1),""); }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.hashcons().

Here is the caller graph for this function:

◆ xmeet()

Type com.cliffc.aa.type.Type< T extends Type< T >.xmeet ( Type< T extends Type< T >  t)
protected

Definition at line 461 of file Type.java.

461  {
462  assert is_simple(); // Should be overridden in subclass
463  // ANY meet anything is thing; thing meet ALL is ALL
464  if( _type==TALL || t._type==TANY ) return this;
465  if( _type==TANY || t._type==TALL ) return t;
466 
467  // Ctrl can only meet Ctrl, XCtrl or Top
468  byte type = (byte)(_type|t._type); // the OR is low if both are low
469  if( type <= TXCTRL ) return _type==TXCTRL && t._type==TXCTRL ? XCTRL : CTRL;
470  if( _type <= TXCTRL || t._type <= TXCTRL ) return ALL;
471 
472  // Meeting scalar and non-scalar falls to ALL. Includes most Memory shapes.
473  if( isa_scalar() ^ t.isa_scalar() ) return ALL;
474 
475  // Memory does something complex with memory
476  if( t._type==TMEM ) return t.xmeet(this);
477 
478  // Scalar is close to bottom: nearly everything falls to SCALAR, except
479  // Bottom (already handled) and Control (error; already handled).
480  if( _type == TSCALAR || t._type == TSCALAR ) return SCALAR;
481 
482  // ~Scalar is close to Top: it falls to nearly anything.
483  if( _type == TXSCALAR ) return t ;
484  if( t._type == TXSCALAR ) return this;
485 
486  // Not-nil variants
487  if( _type == TNSCALR ) return t.must_nil() ? SCALAR : NSCALR;
488  if( t._type == TNSCALR ) return must_nil() ? SCALAR : NSCALR;
489  if( _type == TXNSCALR) return t.not_nil();
490  if( t._type == TXNSCALR) return not_nil();
491 
492  if( _type == TNIL || _type == TXNIL ) return t.meet_nil(this);
493 
494  // Scalar values break out into: nums(reals (int,flt)), GC-ptrs (structs(tuples), arrays(strings)), fun-ptrs, RPC
495  if( t._type == TFUNPTR ||
496  t._type == TMEMPTR ||
497  t._type == TRPC )
498  return cross_nil(t);
499 
500  boolean that_oop = t.is_ptr();
501  boolean that_num = t.is_num();
502  assert !(that_oop&&that_num);
503 
504  // Down to just nums and GC-ptrs
505  if( is_num() ) {
506  // May be OOP0 or STR or STRUCT or TUPLE
507  if( that_oop ) return (must_nil() || t.must_nil()) ? SCALAR : NSCALR;
508  if( that_num || t==NIL || t==XNIL ) {
509  // Real; same pattern as ANY/ALL, or SCALAR/XSCALAR
510  if( _type == TREAL || t._type == TREAL ) return REAL;
511  if( _type == TXREAL ) return t ;
512  if( t._type == TXREAL ) return this;
513 
514  // Not-nil variants
515  if( _type == TNREAL ) return t.must_nil() ? REAL : NREAL;
516  if( t._type == TNREAL ) return must_nil() ? REAL : NREAL;
517  if( _type == TXNREAL) return t.not_nil();
518  if( t._type == TXNREAL) return not_nil();
519  }
520  }
521  throw typerr(t);
522  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.check_commute(), com.cliffc.aa.type.Type< TypeFlt >.meet(), com.cliffc.aa.type.TypeAry.xmeet(), com.cliffc.aa.type.TypeStr.xmeet(), com.cliffc.aa.type.TypeLive.xmeet(), com.cliffc.aa.type.TypeFunPtr.xmeet(), com.cliffc.aa.type.TypeStruct.xmeet(), and com.cliffc.aa.type.Type< TypeFlt >.xmeet().

Here is the caller graph for this function:

◆ xmt_name()

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

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  }

Referenced by com.cliffc.aa.type.Type< TypeFlt >.check_commute(), and com.cliffc.aa.type.Type< TypeFlt >.meet().

Here is the caller graph for this function:

Member Data Documentation

◆ _dual

◆ _hash

◆ _name

◆ _type

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

Definition at line 98 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >._set_name(), com.cliffc.aa.type.Type< TypeFlt >.above_center(), com.cliffc.aa.type.TypeStruct.approx(), com.cliffc.aa.type.TypeStruct.ax_impl_struct(), com.cliffc.aa.type.TypeStruct.ax_meet(), com.cliffc.aa.type.Type< TypeFlt >.clone(), com.cliffc.aa.type.Type< TypeFlt >.compute_hash(), com.cliffc.aa.type.Type< TypeFlt >.cycle_equals(), com.cliffc.aa.type.Type< TypeFlt >.equals(), com.cliffc.aa.type.TypeStruct.get_cyclic(), com.cliffc.aa.type.Type< TypeFlt >.getd(), com.cliffc.aa.type.Type< TypeFlt >.getl(), com.cliffc.aa.type.Type< TypeFlt >.hashcons_free(), com.cliffc.aa.type.Type< TypeFlt >.init(), com.cliffc.aa.type.Type< TypeFlt >.is_con(), com.cliffc.aa.type.Type< TypeFlt >.is_display_ptr(), com.cliffc.aa.type.Type< TypeFlt >.is_num(), com.cliffc.aa.type.Type< TypeFlt >.is_ptr(), com.cliffc.aa.type.Type< TypeFlt >.is_simple(), com.cliffc.aa.type.Type< TypeFlt >.isa_scalar(), com.cliffc.aa.type.TypeStr.isBitShape(), com.cliffc.aa.type.TypeFlt.isBitShape(), com.cliffc.aa.type.TypeInt.isBitShape(), com.cliffc.aa.type.TypeFunPtr.isBitShape(), com.cliffc.aa.type.Type< TypeFlt >.isBitShape(), com.cliffc.aa.type.Type< TypeFlt >.may_be_con(), com.cliffc.aa.type.Type< TypeFlt >.may_nil(), com.cliffc.aa.type.TypeMem.meet_loop(), com.cliffc.aa.type.Type< TypeFlt >.meet_nil(), com.cliffc.aa.type.Type< TypeFlt >.must_nil(), com.cliffc.aa.type.Type< TypeFlt >.not_nil(), com.cliffc.aa.type.Type< T extends Type< T >.Pool.Pool(), com.cliffc.aa.type.TypeStruct.push(), com.cliffc.aa.type.TypeStruct.reachable(), com.cliffc.aa.type.TypeStruct.shrink(), com.cliffc.aa.type.Type< TypeFlt >.str(), com.cliffc.aa.type.Type< TypeFlt >.widen(), com.cliffc.aa.type.Type< TypeFlt >.xdual(), com.cliffc.aa.type.TypeRPC.xmeet(), com.cliffc.aa.type.TypeFlt.xmeet(), com.cliffc.aa.type.TypeAry.xmeet(), com.cliffc.aa.type.TypeLive.xmeet(), com.cliffc.aa.type.TypeStr.xmeet(), com.cliffc.aa.type.TypeInt.xmeet(), com.cliffc.aa.type.TypeFld.xmeet(), com.cliffc.aa.type.TypeFunSig.xmeet(), com.cliffc.aa.type.TypeFunPtr.xmeet(), com.cliffc.aa.type.TypeMemPtr.xmeet(), com.cliffc.aa.type.TypeTuple.xmeet(), com.cliffc.aa.type.TypeMem.xmeet(), com.cliffc.aa.type.TypeStruct.xmeet(), com.cliffc.aa.type.Type< TypeFlt >.xmeet(), and com.cliffc.aa.type.Type< TypeFlt >.xmt_name().

◆ _uid

◆ ALL

final Type com.cliffc.aa.type.Type< T extends Type< T >.ALL = make( TALL )
static

Definition at line 324 of file Type.java.

Referenced by com.cliffc.aa.tvar.TV2._find_tvar(), com.cliffc.aa.node.PrimNode.ConvertTypeName.apply(), com.cliffc.aa.HM.HM9.EQ0.apply(), com.cliffc.aa.HM.HM.EQ0.apply(), com.cliffc.aa.node.CallNode.CallNode(), com.cliffc.aa.type.TypeStruct.crush(), com.cliffc.aa.node.ErrNode.err(), com.cliffc.aa.node.ParmNode.err(), com.cliffc.aa.node.StoreNode.err(), com.cliffc.aa.node.LoadNode.err(), com.cliffc.aa.tvar.TV2.find_tvar(), com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.HM.HM8.Struct.hm(), com.cliffc.aa.HM.HM8.Field.hm(), com.cliffc.aa.node.FunNode.ideal_reduce(), com.cliffc.aa.type.TypeFunSig.init(), com.cliffc.aa.node.CallNode.least_cost(), com.cliffc.aa.type.TypeTuple.make_args(), com.cliffc.aa.type.Type< TypeFlt >.meet_nil(), com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< TypeAry >.NewPrimNode(), com.cliffc.aa.node.Node.Node(), com.cliffc.aa.type.Type< TypeFlt >.oob(), com.cliffc.aa.node.PrimNode.PrimNode(), com.cliffc.aa.node.ScopeNode.set_mem(), com.cliffc.aa.node.FunNode.split_size(), com.cliffc.aa.TestLive.testNewObj(), com.cliffc.aa.type.TestType.testOOPsNulls(), com.cliffc.aa.Env.top_scope(), com.cliffc.aa.node.Node.ErrMsg.typerr(), com.cliffc.aa.node.CProjNode.value(), com.cliffc.aa.node.ErrNode.value(), com.cliffc.aa.node.UnresolvedNode.value(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.PhiNode.value(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.StoreNode.value(), com.cliffc.aa.node.RegionNode.value(), com.cliffc.aa.node.ScopeNode.value(), com.cliffc.aa.node.MemJoinNode.value(), com.cliffc.aa.node.CallEpiNode.value(), com.cliffc.aa.node.FunNode.value(), com.cliffc.aa.node.NewObjNode.valueobj(), com.cliffc.aa.node.Node.walkerr_def(), com.cliffc.aa.node.CallEpiNode.wire0(), and com.cliffc.aa.type.Type< TypeFlt >.xmeet().

◆ ALL_TYPES

◆ ANY

final Type com.cliffc.aa.type.Type< T extends Type< T >.ANY = make( TANY )
static

Definition at line 325 of file Type.java.

Referenced by com.cliffc.aa.HM.HM9.T2._as_flow(), com.cliffc.aa.HM.HM.T2._as_flow(), com.cliffc.aa.tvar.TV2._find_tvar(), com.cliffc.aa.HM.HM1.HMVar._str(), com.cliffc.aa.HM.HM2.HMVar._str(), com.cliffc.aa.HM.HM3.HMVar._str(), com.cliffc.aa.node.CallNode.add_flow_extra(), com.cliffc.aa.node.PrimNode.ConvertTypeName.apply(), com.cliffc.aa.type.TypeStruct.ax_impl_fptr(), com.cliffc.aa.type.TypeStruct.ax_meet(), com.cliffc.aa.node.CallNode.CallNode(), com.cliffc.aa.node.MemPrimNode.err(), com.cliffc.aa.node.StoreNode.err(), com.cliffc.aa.node.LoadNode.err(), com.cliffc.aa.HM.HM1.HMVar.HMVar(), com.cliffc.aa.HM.HM2.HMVar.HMVar(), com.cliffc.aa.HM.HM3.HMVar.HMVar(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.type.TypeFunSig.init(), com.cliffc.aa.node.CallNode.is_copy(), com.cliffc.aa.node.CallNode.live_use(), com.cliffc.aa.Parse.prog(), com.cliffc.aa.node.NewObjNode.promote_forward(), com.cliffc.aa.node.ScopeNode.set_mem(), com.cliffc.aa.type.Type< TypeFlt >.sharptr(), com.cliffc.aa.node.TestNode.test1monotonic_init(), com.cliffc.aa.HM.TestHM9.test35(), com.cliffc.aa.HM.TestHM.test35(), com.cliffc.aa.node.TestNode.testMonotonic(), com.cliffc.aa.TestLive.testNewObj(), com.cliffc.aa.type.TestType.testOOPsNulls(), com.cliffc.aa.TestParse.testParse15(), com.cliffc.aa.node.TestNodeSmall.testUnresolvedAdd(), com.cliffc.aa.Env.top_scope(), com.cliffc.aa.Parse.type0(), com.cliffc.aa.Parse.typev(), com.cliffc.aa.HM.HM1.HMVar.union(), com.cliffc.aa.HM.HM2.HMVar.union(), com.cliffc.aa.HM.HM3.HMVar.union(), com.cliffc.aa.HM.HM9.Lambda.val(), com.cliffc.aa.HM.HM.Lambda.val(), com.cliffc.aa.node.DefMemNode.value(), com.cliffc.aa.node.CProjNode.value(), com.cliffc.aa.node.ErrNode.value(), com.cliffc.aa.node.UnresolvedNode.value(), com.cliffc.aa.node.PhiNode.value(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.NewStrNode.AddStrStr.value(), com.cliffc.aa.node.MemJoinNode.value(), com.cliffc.aa.node.CallEpiNode.value(), and com.cliffc.aa.node.Node.walk_initype().

◆ CNT

int com.cliffc.aa.type.Type< T extends Type< T >.CNT =1
staticprivate

Definition at line 95 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >._uid().

◆ CTRL

final Type com.cliffc.aa.type.Type< T extends Type< T >.CTRL = make( TCTRL )
static

Definition at line 326 of file Type.java.

Referenced by com.cliffc.aa.node.NewStrNode.AddStrStr._value(), com.cliffc.aa.node.NewStrNode.AddStrStr.AddStrStr(), com.cliffc.aa.node.ConNode< T extends Type >.all_live(), com.cliffc.aa.node.TestNodeSmall.check(), com.cliffc.aa.node.NewStrNode.ConStr.ConStr(), com.cliffc.aa.node.NewStrNode.ConvertF64Str.ConvertF64Str(), com.cliffc.aa.node.NewStrNode.ConvertI64Str.ConvertI64Str(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.node.FunNode.find_type_split(), com.cliffc.aa.Parse.func(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.node.CEProjNode.good_call(), com.cliffc.aa.node.AssertNode.ideal_grow(), com.cliffc.aa.node.CastNode.ideal_reduce(), com.cliffc.aa.node.CallEpiNode.ideal_reduce(), com.cliffc.aa.node.CallNode.ideal_reduce(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.type.TypeFunSig.init(), com.cliffc.aa.node.Node.live(), com.cliffc.aa.type.TypeTuple.make(), com.cliffc.aa.type.TypeTuple.make_args(), com.cliffc.aa.type.TypeTuple.make_ret(), com.cliffc.aa.Parse.merge_exits(), com.cliffc.aa.node.NewAryNode.NewAryNode(), com.cliffc.aa.node.RetNode.tail_recursive(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2(), com.cliffc.aa.node.TestNode.testMonotonic(), com.cliffc.aa.node.TestNodeSmall.testRecursiveDisplay(), com.cliffc.aa.Env.top_scope(), com.cliffc.aa.Parse.type0(), com.cliffc.aa.node.CEProjNode.value(), com.cliffc.aa.node.ThunkNode.value(), com.cliffc.aa.node.CastNode.value(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.PhiNode.value(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.node.NewNode< TypeStruct >.value(), com.cliffc.aa.node.RegionNode.value(), com.cliffc.aa.node.RetNode.value(), com.cliffc.aa.node.CallEpiNode.value(), com.cliffc.aa.node.CallNode.value(), com.cliffc.aa.node.FunNode.value(), com.cliffc.aa.type.Type< TypeFlt >.widen(), and com.cliffc.aa.type.Type< TypeFlt >.xmeet().

◆ INTERN

◆ ISA_SCALAR

final byte [] com.cliffc.aa.type.Type< T extends Type< T >.ISA_SCALAR = new byte[]{0,0,0,0,1,1,1,1,1,1,1,1,1,1,0, 1,1,1,0,0,0,0,0,0,0,1,1,0,0}
staticprivate

Definition at line 355 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.isa_scalar().

◆ NIL

final Type com.cliffc.aa.type.Type< T extends Type< T >.NIL = make( TNIL )
static

Definition at line 332 of file Type.java.

Referenced by com.cliffc.aa.HM.HM7.T2._fresh_unify_struct(), com.cliffc.aa.HM.HM8.T2._fresh_unify_struct(), com.cliffc.aa.HM.HM7.T2._p(), com.cliffc.aa.HM.HM8.T2._p(), com.cliffc.aa.HM.HM7.T2._unify(), com.cliffc.aa.HM.HM8.T2._unify(), com.cliffc.aa.HM.HM9.If.apply(), com.cliffc.aa.HM.HM.If.apply(), com.cliffc.aa.HM.HM9.EQ0.apply(), com.cliffc.aa.HM.HM.EQ0.apply(), com.cliffc.aa.type.TypeStruct.ax_meet(), com.cliffc.aa.type.TestApprox.check_leaf(), com.cliffc.aa.node.CallEpiNode.esc_out(), com.cliffc.aa.HM.HM7.Apply.hm(), com.cliffc.aa.HM.HM8.Apply.hm(), com.cliffc.aa.HM.HM9.If.hm(), com.cliffc.aa.HM.HM.If.hm(), com.cliffc.aa.type.Type< TypeFlt >.meet(), com.cliffc.aa.type.TypeFlt.meet_nil(), com.cliffc.aa.type.TypeInt.meet_nil(), com.cliffc.aa.type.Type< TypeFlt >.meet_nil(), com.cliffc.aa.HM.HM7.T2.or0(), com.cliffc.aa.HM.HM8.T2.or0(), com.cliffc.aa.HM.HM7.Con.prep_tree(), com.cliffc.aa.HM.HM8.Con.prep_tree(), com.cliffc.aa.HM.HM7.T2.str(), com.cliffc.aa.HM.HM8.T2.str(), com.cliffc.aa.type.TestApprox.testApprox3(), com.cliffc.aa.type.TestApprox.testApprox4(), com.cliffc.aa.node.TestNodeSmall.testMemoryArgs(), com.cliffc.aa.node.TestNode.testMonotonic(), com.cliffc.aa.TestLive.testNewObj(), com.cliffc.aa.type.TestType.testOOPsNulls(), com.cliffc.aa.TestParse.testParse04(), com.cliffc.aa.TestParse.testParse06(), com.cliffc.aa.type.TestType.testRecursive(), com.cliffc.aa.type.TestType.testStructTuple(), com.cliffc.aa.Env.top_scope(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.PrimNode.OrI64.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.value(), com.cliffc.aa.node.PrimNode.NE_OOP.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.vs_nil(), and com.cliffc.aa.type.Type< TypeFlt >.xmeet().

◆ NREAL

final Type com.cliffc.aa.type.Type< T extends Type< T >.NREAL = make( TNREAL )
staticpackage

Definition at line 336 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.xmeet().

◆ NSCALR

◆ POOLS

◆ REAL

◆ RECURSIVE_MEET

◆ SCALAR

final Type com.cliffc.aa.type.Type< T extends Type< T >.SCALAR = make( TSCALAR)
static

Definition at line 328 of file Type.java.

Referenced by com.cliffc.aa.HM.HM9.T2._as_flow(), com.cliffc.aa.HM.HM.T2._as_flow(), com.cliffc.aa.node.MemPrimNode.LValueLength._live_use(), com.cliffc.aa.node.LoadNode._live_use(), com.cliffc.aa.type.TypeStruct.add_fld(), com.cliffc.aa.node.PhiNode.all_live(), com.cliffc.aa.node.PrimNode.AndThen.AndThen(), com.cliffc.aa.type.TypeStruct.ax_meet(), com.cliffc.aa.type.Type< TypeFlt >.check_startup(), com.cliffc.aa.node.NewObjNode.create_active(), com.cliffc.aa.type.Type< TypeFlt >.cross_nil(), com.cliffc.aa.type.TypeAry.crush(), com.cliffc.aa.Parse.do_exit(), com.cliffc.aa.node.PhiNode.err(), com.cliffc.aa.type.TypeStruct.flatten_fields(), com.cliffc.aa.node.FunPtrNode.forward_ref(), com.cliffc.aa.Parse.func(), com.cliffc.aa.node.AssertNode.ideal_grow(), com.cliffc.aa.node.LoadNode.ideal_grow(), com.cliffc.aa.node.PrimNode.AndThen.ideal_grow(), com.cliffc.aa.node.PrimNode.OrElse.ideal_grow(), com.cliffc.aa.Parse.ifex(), com.cliffc.aa.Env.init(), com.cliffc.aa.type.Type< TypeFlt >.init0(), com.cliffc.aa.type.TypeMemPtr.isBitShape(), com.cliffc.aa.node.MemPrimNode.ReadPrimNode.live_use(), com.cliffc.aa.node.NewStrNode.AddStrStr.live_use(), com.cliffc.aa.node.MemPrimNode.LValueRead.LValueRead(), com.cliffc.aa.node.MemPrimNode.LValueWrite.LValueWrite(), com.cliffc.aa.node.MemPrimNode.LValueWriteFinal.LValueWriteFinal(), com.cliffc.aa.type.TypeFunSig.meet_nil(), com.cliffc.aa.type.Type< TypeFlt >.meet_nil(), com.cliffc.aa.node.PrimNode.OrElse.OrElse(), com.cliffc.aa.node.PhiNode.PhiNode(), com.cliffc.aa.type.TypeFld.str(), com.cliffc.aa.type.TypeFunSig.str(), com.cliffc.aa.HM.TestHM.test02(), com.cliffc.aa.HM.TestHM9.test02(), com.cliffc.aa.HM.TestHM.test07(), com.cliffc.aa.HM.TestHM9.test07(), com.cliffc.aa.HM.TestHM.test10(), com.cliffc.aa.HM.TestHM9.test10(), com.cliffc.aa.HM.TestHM.test11(), com.cliffc.aa.HM.TestHM9.test11(), com.cliffc.aa.HM.TestHM.test27(), com.cliffc.aa.HM.TestHM9.test27(), com.cliffc.aa.HM.TestHM.test28(), com.cliffc.aa.HM.TestHM9.test28(), com.cliffc.aa.HM.TestHM9.test32(), com.cliffc.aa.HM.TestHM.test32(), com.cliffc.aa.HM.TestHM9.test33(), com.cliffc.aa.HM.TestHM.test33(), com.cliffc.aa.HM.TestHM.test39(), com.cliffc.aa.HM.TestHM9.test39(), com.cliffc.aa.HM.TestHM.test40(), com.cliffc.aa.HM.TestHM9.test40(), com.cliffc.aa.HM.TestHM.test51(), com.cliffc.aa.HM.TestHM.test52(), com.cliffc.aa.HM.TestHM.test53(), com.cliffc.aa.HM.TestHM.test54(), com.cliffc.aa.type.TestApprox.testApprox5(), com.cliffc.aa.type.TestApprox.testApprox6(), com.cliffc.aa.type.TestApprox.testApprox8(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2(), com.cliffc.aa.node.TestNode.testMonotonic(), com.cliffc.aa.TestParse.testParse03(), com.cliffc.aa.node.TestNodeSmall.testRecursiveDisplay(), com.cliffc.aa.Parse.type0(), com.cliffc.aa.node.NewObjNode.update(), com.cliffc.aa.HM.HM9.Apply.val(), com.cliffc.aa.HM.HM.Apply.val(), com.cliffc.aa.HM.HM9.Field.val(), com.cliffc.aa.HM.HM.Field.val(), com.cliffc.aa.node.CastNode.value(), com.cliffc.aa.node.MemPrimNode.LValueRead.value(), com.cliffc.aa.node.MemPrimNode.LValueWrite.value(), com.cliffc.aa.node.MemPrimNode.LValueWriteFinal.value(), com.cliffc.aa.HM.HM9.T2.walk_types_in(), com.cliffc.aa.HM.HM.T2.walk_types_in(), com.cliffc.aa.type.Type< TypeFlt >.widen(), and com.cliffc.aa.type.Type< TypeFlt >.xmeet().

◆ SCALAR_PRIMS

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

Definition at line 349 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.check_startup().

◆ STRS

final String [] com.cliffc.aa.type.Type< T extends Type< T >.STRS = new String[]{"all","any","Ctrl","~Ctrl","Scalar","~Scalar","nScalar","~nScalar","Real","~Real","nReal","~nReal","nil","0"}
staticprivate

Definition at line 262 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.str().

◆ TALL

◆ TANY

◆ TARY

final byte com.cliffc.aa.type.Type< T extends Type< T >.TARY =21
staticpackage

Definition at line 269 of file Type.java.

◆ TCTRL

◆ TFLD

final byte com.cliffc.aa.type.Type< T extends Type< T >.TFLD =23
staticpackage

Definition at line 271 of file Type.java.

◆ TFLT

final byte com.cliffc.aa.type.Type< T extends Type< T >.TFLT =16
staticpackage

◆ TFUNPTR

◆ TFUNSIG

final byte com.cliffc.aa.type.Type< T extends Type< T >.TFUNSIG =27
staticpackage

Definition at line 275 of file Type.java.

◆ TINT

final byte com.cliffc.aa.type.Type< T extends Type< T >.TINT =15
staticpackage

◆ TLAST

final byte com.cliffc.aa.type.Type< T extends Type< T >.TLAST =29
staticpackage

Definition at line 277 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.isa_scalar().

◆ TLIVE

final byte com.cliffc.aa.type.Type< T extends Type< T >.TLIVE =28
staticpackage

Definition at line 276 of file Type.java.

◆ TMEM

◆ TMEMPTR

◆ TNIL

◆ TNREAL

◆ TNSCALR

◆ TOBJ

final byte com.cliffc.aa.type.Type< T extends Type< T >.TOBJ =19
staticpackage

◆ TREAL

◆ TRPC

final byte com.cliffc.aa.type.Type< T extends Type< T >.TRPC =17
staticpackage

Definition at line 265 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.xmeet().

◆ TSCALAR

◆ TSIMPLE

final byte com.cliffc.aa.type.Type< T extends Type< T >.TSIMPLE =14
staticpackage

Definition at line 261 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.is_simple().

◆ TSTR

final byte com.cliffc.aa.type.Type< T extends Type< T >.TSTR =22
staticpackage

◆ TSTRUCT

final byte com.cliffc.aa.type.Type< T extends Type< T >.TSTRUCT =20
staticpackage

Definition at line 268 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.meet_nil().

◆ TTUPLE

final byte com.cliffc.aa.type.Type< T extends Type< T >.TTUPLE =18
staticpackage

Definition at line 266 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.may_nil().

◆ TXCTRL

◆ TXNIL

◆ TXNREAL

◆ TXNSCALR

◆ TXREAL

◆ TXSCALAR

◆ TYPES

final Type [] com.cliffc.aa.type.Type< T extends Type< T >.TYPES = new Type[]{ALL,CTRL,SCALAR,NSCALR,REAL,NREAL}
staticprivate

Definition at line 340 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.ALL_TYPES().

◆ XCTRL

◆ XNIL

final Type com.cliffc.aa.type.Type< T extends Type< T >.XNIL = make(TXNIL )
static

Definition at line 333 of file Type.java.

Referenced by com.cliffc.aa.HM.HM.T2._find_nil(), com.cliffc.aa.HM.HM9.T2._fresh_unify(), com.cliffc.aa.HM.HM.T2._fresh_unify(), com.cliffc.aa.node.CallNode._ideal_grow(), com.cliffc.aa.HM.HM9.T2._unify(), com.cliffc.aa.HM.HM9.If.apply(), com.cliffc.aa.HM.HM.If.apply(), com.cliffc.aa.HM.HM9.EQ0.apply(), com.cliffc.aa.HM.HM.EQ0.apply(), com.cliffc.aa.HM.HM9.NotNil.apply(), com.cliffc.aa.HM.HM.NotNil.apply(), com.cliffc.aa.type.TypeStruct.ax_meet(), com.cliffc.aa.Env.Env(), com.cliffc.aa.node.MemPrimNode.err(), com.cliffc.aa.node.CallEpiNode.esc_out(), com.cliffc.aa.HM.HM9.Field.hm(), com.cliffc.aa.HM.HM9.If.hm(), com.cliffc.aa.HM.HM.If.hm(), com.cliffc.aa.HM.HM.NotNil.hm(), com.cliffc.aa.node.IfNode.ideal_reduce(), com.cliffc.aa.node.ScopeNode.ideal_reduce(), com.cliffc.aa.type.Type< TypeFlt >.meet(), com.cliffc.aa.type.TypeFlt.meet_nil(), com.cliffc.aa.type.TypeInt.meet_nil(), com.cliffc.aa.type.Type< TypeFlt >.meet_nil(), com.cliffc.aa.HM.HM9.number(), com.cliffc.aa.HM.HM.number(), com.cliffc.aa.Parse.number(), com.cliffc.aa.HM.HM.Con.prep_tree(), com.cliffc.aa.HM.TestHM.test38(), com.cliffc.aa.HM.TestHM9.test38(), com.cliffc.aa.type.TestApprox.testApprox1(), com.cliffc.aa.type.TestApprox.testApprox3(), com.cliffc.aa.type.TestApprox.testApprox6(), com.cliffc.aa.type.TestType.testBits0(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve(), com.cliffc.aa.node.TestNodeSmall.testMemoryArgs(), com.cliffc.aa.type.TestType.testOOPsNulls(), com.cliffc.aa.TestParse.testParse(), com.cliffc.aa.TestParse.testParse00(), com.cliffc.aa.TestParse.testParse01(), com.cliffc.aa.TestParse.testParse01a(), com.cliffc.aa.TestParse.testParse02(), com.cliffc.aa.TestParse.testParse04(), com.cliffc.aa.TestParse.testParse05(), com.cliffc.aa.TestParse.testParse06(), com.cliffc.aa.TestParse.testParse07(), com.cliffc.aa.TestParse.testParse09(), com.cliffc.aa.TestParse.testParse11(), com.cliffc.aa.TestParse.testParse12(), com.cliffc.aa.TestParse.testParse14(), com.cliffc.aa.Env.top_scope(), com.cliffc.aa.Parse.typeq(), com.cliffc.aa.HM.HM9.T2.union(), com.cliffc.aa.HM.HM.T2.union(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.NewStrNode.AddStrStr.value(), com.cliffc.aa.node.MemPrimNode.LValueRead.value(), com.cliffc.aa.node.MemPrimNode.LValueWrite.value(), com.cliffc.aa.node.MemPrimNode.LValueWriteFinal.value(), com.cliffc.aa.node.PrimNode.AndI64.value(), com.cliffc.aa.node.PrimNode.OrI64.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.value(), com.cliffc.aa.node.PrimNode.NE_OOP.value(), com.cliffc.aa.node.PrimNode.Not.value(), com.cliffc.aa.node.NewAryNode.NewAry.valueobj(), com.cliffc.aa.node.PrimNode.EQ_OOP.vs_nil(), and com.cliffc.aa.type.Type< TypeFlt >.xmeet().

◆ XNREAL

final Type com.cliffc.aa.type.Type< T extends Type< T >.XNREAL = make(TXNREAL )
staticprivate

Definition at line 337 of file Type.java.

Referenced by com.cliffc.aa.type.Type< TypeFlt >.not_nil().

◆ XNSCALR

◆ XREAL

final Type com.cliffc.aa.type.Type< T extends Type< T >.XREAL = make(TXREAL )
staticprivate

Definition at line 335 of file Type.java.

◆ XSCALAR


The documentation for this class was generated from the following file:
com.cliffc.aa.type.Type.xdual
T xdual()
Definition: Type.java:365
com.cliffc.aa.type.Type.NSCALR
static final Type NSCALR
Definition: Type.java:330
com.cliffc.aa.type.Type.intern_check1
boolean intern_check1()
Definition: Type.java:227
com.cliffc.aa.type.Type.TMEMPTR
static final byte TMEMPTR
Definition: Type.java:273
com.cliffc.aa.type.Type.NREAL
static final Type NREAL
Definition: Type.java:336
com.cliffc.aa.type.Type.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.TREAL
static final byte TREAL
Definition: Type.java:255
com.cliffc.aa.type.Type.not_nil
Type not_nil()
Definition: Type.java:893
com.cliffc.aa.type.Type.isa
boolean isa(Type t)
Definition: Type.java:623
com.cliffc.aa.type.Type.typerr
RuntimeException typerr(Type t)
Definition: Type.java:947
com.cliffc.aa.type.Type._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.SCALAR
static final Type SCALAR
Definition: Type.java:328
com.cliffc
com.cliffc.aa.type.Type._hash
int _hash
Definition: Type.java:97
com.cliffc.aa.type.Type.may_nil
boolean may_nil()
Definition: Type.java:869
com.cliffc.aa.type.Type.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.CNT
static int CNT
Definition: Type.java:95
com.cliffc.aa.util.Ary
Definition: Ary.java:11
com.cliffc.aa.type.Type.compute_hash
int compute_hash()
Definition: Type.java:109
com.cliffc.aa.type.Type.TSTR
static final byte TSTR
Definition: Type.java:270
com.cliffc.aa.type.Type.meet_nil
Type meet_nil(Type nil)
Definition: Type.java:904
com.cliffc.aa.type.Type._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.TXNIL
static final byte TXNIL
Definition: Type.java:260
com.cliffc.aa.type.Type.TLAST
static final byte TLAST
Definition: Type.java:277
com.cliffc.aa.type.Type.ANY
static final Type ANY
Definition: Type.java:325
com.cliffc.aa.type.Type.check_name
static boolean check_name(String n)
Definition: Type.java:548
com.cliffc.aa.type.Type.meet
final Type meet(Type t)
Definition: Type.java:412
com.cliffc.aa.type.Type.TANY
static final byte TANY
Definition: Type.java:240
com.cliffc.aa.AA.unimpl
static RuntimeException unimpl()
Definition: AA.java:10
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.TFUNPTR
static final byte TFUNPTR
Definition: Type.java:274
com.cliffc.aa.type.Type.TINT
static final byte TINT
Definition: Type.java:263
com.cliffc.aa.type.Type.ISA_SCALAR
static final byte[] ISA_SCALAR
Definition: Type.java:355
com.cliffc.aa.type.Type.ALL
static final Type ALL
Definition: Type.java:324
com.cliffc.aa.type.Type.ALL_TYPES
static Ary< Type > ALL_TYPES
Definition: Type.java:650
com.cliffc.aa.type.Type.TMEM
static final byte TMEM
Definition: Type.java:272
com.cliffc.aa.type.Type.Pool._clone
int _clone
Definition: Type.java:284
com.cliffc.aa.type.Type.TXNREAL
static final byte TXNREAL
Definition: Type.java:258
com.cliffc.aa.type.Type.TTUPLE
static final byte TTUPLE
Definition: Type.java:266
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.above_center
boolean above_center()
Definition: Type.java:741
com.cliffc.aa.type.Type.TSTRUCT
static final byte TSTRUCT
Definition: Type.java:268
com.cliffc.aa.type.Type.TALL
static final byte TALL
Definition: Type.java:239
com.cliffc.aa.type.Type.RECURSIVE_MEET
static int RECURSIVE_MEET
Definition: Type.java:163
com.cliffc.aa.type.Type.XNSCALR
static final Type XNSCALR
Definition: Type.java:331
com.cliffc.aa.type.Type.has_name
boolean has_name()
Definition: Type.java:549
com.cliffc.aa.type.Type.contains
final boolean contains(Type t)
Definition: Type.java:926
com.cliffc.aa.type.Type.is_num
boolean is_num()
Definition: Type.java:353
com.cliffc.aa.util.Util
Definition: Util.java:5
com.cliffc.aa.type.Type.CTRL
static final Type CTRL
Definition: Type.java:326
com.cliffc.aa.type.Type.cross_nil
final Type cross_nil(Type t)
Definition: Type.java:865
com.cliffc.aa.type.Type.xmeet
Type xmeet(Type t)
Definition: Type.java:461
com.cliffc.aa.type.Type.must_nil
boolean must_nil()
Definition: Type.java:845
com.cliffc.aa.type.Type.INTERN
static final ConcurrentHashMap< Type, Type > INTERN
Definition: Type.java:162
com.cliffc.aa.type.Type.mtname
final String mtname(Type t, Type mt)
Definition: Type.java:567
com.cliffc.aa.type.Type.XCTRL
static final Type XCTRL
Definition: Type.java:327
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.Type.TSCALAR
static final byte TSCALAR
Definition: Type.java:246
com.cliffc.aa.type.Type.TYPES
static final Type[] TYPES
Definition: Type.java:340
com.cliffc.aa.type.Type.TXSCALAR
static final byte TXSCALAR
Definition: Type.java:247
com.cliffc.aa.type.Type.TNIL
static final byte TNIL
Definition: Type.java:259
com.cliffc.aa.type.Type.TRPC
static final byte TRPC
Definition: Type.java:265
com.cliffc.aa.util.VBitSet
Definition: VBitSet.java:5
com.cliffc.aa.type.Type.is_ptr
boolean is_ptr()
Definition: Type.java:352
com.cliffc.aa.type.Type.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.Type.NIL
static final Type NIL
Definition: Type.java:332
com.cliffc.aa.type.Type.TSIMPLE
static final byte TSIMPLE
Definition: Type.java:261
com.cliffc.aa.AA
an implementation of language AA
Definition: AA.java:9
com.cliffc.aa.type.Type.oop_deep_impl
Type oop_deep_impl(Type t)
Definition: Type.java:634
com.cliffc.aa.type.Type.equals
boolean equals(Object o)
Definition: Type.java:112
com.cliffc.aa.type.Type.XNREAL
static final Type XNREAL
Definition: Type.java:337
com.cliffc.aa.type.Type.SCALAR_PRIMS
static Type[] SCALAR_PRIMS
Definition: Type.java:349
com.cliffc.aa
Definition: AA.java:1
com.cliffc.aa.type.Type.TCTRL
static final byte TCTRL
Definition: Type.java:241
com.cliffc.aa.type.Type.TNREAL
static final byte TNREAL
Definition: Type.java:257
com.cliffc.aa.type.Type._uid
int _uid
Definition: Type.java:96
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.Type.REAL
static final Type REAL
Definition: Type.java:334
com.cliffc.aa.type.Type.dual
final T dual()
Definition: Type.java:361
com.cliffc.aa.type.Type.isa_scalar
final boolean isa_scalar()
Definition: Type.java:356
com.cliffc.aa.type.Type.STRS
static final String[] STRS
Definition: Type.java:262
com.cliffc.aa.type.Type.oob
Type oob()
Definition: Type.java:635
com.cliffc.aa.type.Type.XNIL
static final Type XNIL
Definition: Type.java:333
com.cliffc.aa.type.Type.POOLS
static final Pool[] POOLS
Definition: Type.java:281
com.cliffc.aa.type.Type.TOBJ
static final byte TOBJ
Definition: Type.java:267
com.cliffc.aa.type.Type.concat
static void concat(Ary< Type > ts, Type[] ts1)
Definition: Type.java:676
com.cliffc.aa.type.Type.TNSCALR
static final byte TNSCALR
Definition: Type.java:253
com
com.cliffc.aa.util.SB.toString
String toString()
Definition: SB.java:62
com.cliffc.aa.type.Type.TXNSCALR
static final byte TXNSCALR
Definition: Type.java:254
com.cliffc.aa.type.Type.hashcons
T hashcons()
Definition: Type.java:165
com.cliffc.aa.type.Type.TXCTRL
static final byte TXCTRL
Definition: Type.java:242
com.cliffc.aa.type.Type.TXREAL
static final byte TXREAL
Definition: Type.java:256
com.cliffc.aa.type.Type.TFLT
static final byte TFLT
Definition: Type.java:264