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

Public Member Functions

boolean above (Type t)
 
boolean above_center ()
 
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)
 
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 Type con (double con)
 
static boolean eq (Type[] t0, Type[] t1)
 
static void init0 (HashMap< String, Type > types)
 
static boolean intern_check ()
 
static Type make (int x, int z, double con)
 

Public Attributes

int _hash
 
String _name
 
int _uid
 

Static Public Attributes

static final Type ALL
 
static final Type ANY
 
static final Type CTRL
 
static final TypeFlt FLT32 = (TypeFlt)make(-2,32,0)
 
static final TypeFlt FLT64 = (TypeFlt)make(-2,64,0)
 
static final TypeFlt NFLT64 = (TypeFlt)make(-1,64,0)
 
static final Type NIL
 
static final Type NSCALR
 
static final TypeFlt PI = (TypeFlt)con(Math.PI)
 
static final Type REAL
 
static int RECURSIVE_MEET
 
static final Type SCALAR
 
static final TypeFlt[] TYPES = new TypeFlt[]{FLT64,FLT32,PI,NFLT64}
 
static final Type XCTRL
 
static final Type XNIL
 
static final Type XNSCALR
 
static final Type XSCALAR
 

Protected Member Functions

Type clone ()
 
init (byte type, String name)
 
TypeFlt xdual ()
 
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 ()
 

Static Package Functions

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

Package Attributes

double _con
 
_dual
 
byte _type
 
byte _x
 
byte _z
 

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
 

Private Member Functions

_set_name (String name)
 
int _uid ()
 
boolean check_commute (Type t, Type mt)
 
boolean check_symmetric (Type t, Type mt)
 
hashcons ()
 
TypeFlt init (int x, int z, double con)
 
boolean intern_check0 (Type v)
 
boolean is_num ()
 
boolean is_ptr ()
 
boolean is_simple ()
 
int nn ()
 
Type xmt_name (Type t, Type mt)
 

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 9 of file TypeFlt.java.

Member Function Documentation

◆ [static initializer]()

com.cliffc.aa.type.TypeFlt.[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< TypeFlt t)
inherited

Definition at line 625 of file Type.java.

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

◆ above_center()

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

Definition at line 92 of file TypeFlt.java.

92 { return _x>0; }

References com.cliffc.aa.type.TypeFlt._x.

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

◆ check_commute()

boolean com.cliffc.aa.type.Type< T extends Type< T >.check_commute ( Type< TypeFlt t,
Type< TypeFlt 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< TypeFlt t,
Type< TypeFlt 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.TypeFlt.compute_hash ( )
package

Definition at line 15 of file TypeFlt.java.

15 { return super.compute_hash()+_x+_z+(int)_con; }

References com.cliffc.aa.type.TypeFlt._con, com.cliffc.aa.type.TypeFlt._x, and com.cliffc.aa.type.TypeFlt._z.

◆ con()

static Type com.cliffc.aa.type.TypeFlt.con ( double  con)
static

Definition at line 36 of file TypeFlt.java.

36 { return make(0,log(con),con); }

References com.cliffc.aa.type.TypeFlt.log(), and com.cliffc.aa.type.TypeFlt.make().

Referenced by com.cliffc.aa.node.PrimNode.ConvertInt64F64.apply(), com.cliffc.aa.node.PrimNode.Prim1OpF64.apply(), com.cliffc.aa.node.PrimNode.Prim2OpF64.apply(), com.cliffc.aa.type.TypeFlt.init(), com.cliffc.aa.type.TypeFlt.log(), com.cliffc.aa.type.TypeFlt.make(), com.cliffc.aa.HM.HM6.number(), com.cliffc.aa.HM.HM8.number(), com.cliffc.aa.HM.HM7.number(), com.cliffc.aa.HM.HM9.number(), com.cliffc.aa.HM.HM.number(), com.cliffc.aa.Parse.number(), com.cliffc.aa.HM.TestHM2.test10(), com.cliffc.aa.HM.TestHM3.test10(), com.cliffc.aa.HM.TestHM1.test13(), com.cliffc.aa.HM.TestHM4.test13(), com.cliffc.aa.HM.TestHM5.test13(), com.cliffc.aa.HM.TestHM.test42(), com.cliffc.aa.HM.TestHM9.test42(), com.cliffc.aa.HM.TestHM.test43(), com.cliffc.aa.HM.TestHM9.test43(), com.cliffc.aa.HM.TestHM.test44(), com.cliffc.aa.HM.TestHM9.test44(), com.cliffc.aa.TestParse.testParse(), com.cliffc.aa.TestParse.testParse02(), com.cliffc.aa.TestParse.testParse03(), com.cliffc.aa.TestParse.testParse04(), com.cliffc.aa.TestParse.testParse06(), com.cliffc.aa.TestParse.testParse07(), and com.cliffc.aa.TestParse.testParse15().

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

◆ concat()

static void com.cliffc.aa.type.Type< T extends Type< T >.concat ( Ary< Type< TypeFlt > >  ts,
Type< TypeFlt >[]  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< TypeFlt 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< TypeFlt 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< TypeFlt 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.TypeFlt.cycle_equals ( Type  o)

Definition at line 22 of file TypeFlt.java.

22 { return equals(o); }

References com.cliffc.aa.type.TypeFlt.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< TypeFlt >[]  t0,
Type< TypeFlt >[]  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.TypeFlt.equals ( Object  o)

Definition at line 16 of file TypeFlt.java.

16  {
17  if( this==o ) return true;
18  if( !(o instanceof TypeFlt) ) return false;
19  TypeFlt t2 = (TypeFlt)o;
20  return super.equals(o) && _x==t2._x && _z==t2._z && _con==t2._con;
21  }

References com.cliffc.aa.type.TypeFlt._con, com.cliffc.aa.type.TypeFlt._x, com.cliffc.aa.type.TypeFlt._z, and com.cliffc.aa.type.TypeFlt.equals().

Referenced by com.cliffc.aa.type.TypeFlt.cycle_equals(), com.cliffc.aa.type.TypeFlt.equals(), and com.cliffc.aa.type.TypeFlt.xmeet().

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

◆ getd()

double com.cliffc.aa.type.TypeFlt.getd ( )

Definition at line 49 of file TypeFlt.java.

49 { assert is_con(); return _con; }

References com.cliffc.aa.type.TypeFlt._con, and com.cliffc.aa.type.TypeFlt.is_con().

Here is the call graph for this function:

◆ getl()

long com.cliffc.aa.type.TypeFlt.getl ( )

Definition at line 50 of file TypeFlt.java.

50 { assert is_con() && ((long)_con)==_con; return (long)_con; }

References com.cliffc.aa.type.TypeFlt._con, and com.cliffc.aa.type.TypeFlt.is_con().

Here is the call graph for this function:

◆ 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]

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

◆ init() [2/2]

TypeFlt com.cliffc.aa.type.TypeFlt.init ( int  x,
int  z,
double  con 
)
private

Definition at line 13 of file TypeFlt.java.

13 { super.init(TFLT,""); _x=(byte)x; _z=(byte)z; _con = con; return this; }

References com.cliffc.aa.type.TypeFlt._con, com.cliffc.aa.type.TypeFlt._x, com.cliffc.aa.type.TypeFlt._z, com.cliffc.aa.type.TypeFlt.con(), com.cliffc.aa.type.TypeFlt.init(), and com.cliffc.aa.type.Type< TypeFlt >.TFLT.

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

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

◆ init0()

static void com.cliffc.aa.type.Type< T extends Type< T >.init0 ( HashMap< String, Type< TypeFlt > >  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  }

◆ init1()

static void com.cliffc.aa.type.TypeFlt.init1 ( HashMap< String, Type types)
staticpackage

Definition at line 43 of file TypeFlt.java.

43  {
44  types.put("flt32",FLT32);
45  types.put("flt64",FLT64);
46  types.put("flt" ,FLT64);
47  }

References com.cliffc.aa.type.TypeFlt.FLT32, and com.cliffc.aa.type.TypeFlt.FLT64.

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

Here is the caller graph for this function:

◆ 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< TypeFlt 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.TypeFlt.is_con ( )

Definition at line 94 of file TypeFlt.java.

94 { return _x==0; }

References com.cliffc.aa.type.TypeFlt._x.

Referenced by com.cliffc.aa.type.TypeFlt.getd(), and com.cliffc.aa.type.TypeFlt.getl().

Here is the caller graph for this function:

◆ 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< TypeFlt 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.TypeFlt.isBitShape ( Type  t)

Definition at line 110 of file TypeFlt.java.

110  {
111  // TODO: Allow loss-less conversions (e.g. small float integer constants convert to ints just fine)
112  if( t._type == Type.TFLT ) return (byte)(_z<=((TypeFlt)t)._z ? 0 : 99);
113  if( t._type == Type.TINT ) return 99; // Flt->Int always requires user intervention
114  if( t._type == Type.TMEMPTR ) return 99; // No flt->ptr conversion
115  if( t._type == Type.TFUNPTR ) return 99; // No flt->ptr conversion
116  if( t._type == Type.TALL ) return 99;
117  if( t._type == Type.TREAL ) return 1;
118  if( t._type == TSCALAR ) return 9; // Might have to autobox
119  throw com.cliffc.aa.AA.unimpl();
120  }

References com.cliffc.aa.type.Type< T extends Type< T >._type, com.cliffc.aa.type.TypeFlt._z, com.cliffc.aa.type.Type< T extends Type< T >.TALL, com.cliffc.aa.type.Type< T extends Type< T >.TFLT, com.cliffc.aa.type.Type< T extends Type< T >.TFUNPTR, com.cliffc.aa.type.Type< T extends Type< T >.TINT, com.cliffc.aa.type.Type< T extends Type< T >.TMEMPTR, com.cliffc.aa.type.Type< T extends Type< T >.TREAL, com.cliffc.aa.type.Type< TypeFlt >.TSCALAR, and com.cliffc.aa.AA.unimpl().

Here is the call graph for this function:

◆ join()

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

Definition at line 619 of file Type.java.

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

◆ log()

static int com.cliffc.aa.type.TypeFlt.log ( double  con)
staticpackage

Definition at line 90 of file TypeFlt.java.

90 { return ((double)(float)con)==con ? 32 : 64; }

References com.cliffc.aa.type.TypeFlt.con().

Referenced by com.cliffc.aa.type.TypeFlt.con(), com.cliffc.aa.type.TypeFlt.xmeet(), and com.cliffc.aa.type.TypeInt.xmeetf().

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

◆ make() [1/2]

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() [2/2]

static Type com.cliffc.aa.type.TypeFlt.make ( int  x,
int  z,
double  con 
)
static

Definition at line 30 of file TypeFlt.java.

30  {
31  if( x==0 && (double)((long)con)==con ) return TypeInt.con((long)con);
32  TypeFlt t1 = POOLS[TFLT].malloc();
33  return t1.init(x,z,con).hashcons_free();
34  }

References com.cliffc.aa.type.TypeFlt.con(), com.cliffc.aa.type.TypeInt.con(), com.cliffc.aa.type.Type< T extends Type< T >.hashcons_free(), com.cliffc.aa.type.TypeFlt.init(), com.cliffc.aa.type.Type< TypeFlt >.POOLS, and com.cliffc.aa.type.Type< TypeFlt >.TFLT.

Referenced by com.cliffc.aa.type.TypeFlt.con(), com.cliffc.aa.type.TypeFlt.meet_nil(), com.cliffc.aa.type.TypeFlt.not_nil(), com.cliffc.aa.TestParse.testParse00(), com.cliffc.aa.TestParse.testParse03(), com.cliffc.aa.TestParse.testParse15(), com.cliffc.aa.type.TypeFlt.xmeet(), and com.cliffc.aa.type.TypeInt.xmeetf().

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< TypeFlt head,
TypeMem  map,
VBitSet  visit 
)
inherited

Definition at line 945 of file Type.java.

945 { return this; }

◆ may_be_con()

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

Definition at line 93 of file TypeFlt.java.

93 { return _x>=0; }

References com.cliffc.aa.type.TypeFlt._x.

◆ may_nil()

boolean com.cliffc.aa.type.TypeFlt.may_nil ( )

Definition at line 96 of file TypeFlt.java.

96 { return _x > 0 || (_x==0 && _con==0); }

References com.cliffc.aa.type.TypeFlt._con, and com.cliffc.aa.type.TypeFlt._x.

◆ meet()

final Type com.cliffc.aa.type.Type< T extends Type< T >.meet ( Type< TypeFlt 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< TypeFlt t2)
inherited

Definition at line 628 of file Type.java.

628 { return meet(t2); }

◆ meet_nil()

Type com.cliffc.aa.type.TypeFlt.meet_nil ( Type  nil)

Definition at line 98 of file TypeFlt.java.

98  {
99  if( _x==2 ) return nil;
100  if( _x==0 && _con==0 ) return nil==Type.XNIL ? this : Type.NIL;
101  return TypeFlt.make(-2,_z,0);
102  }

References com.cliffc.aa.type.TypeFlt._con, com.cliffc.aa.type.TypeFlt._x, com.cliffc.aa.type.TypeFlt._z, com.cliffc.aa.type.TypeFlt.make(), com.cliffc.aa.type.Type< T extends Type< T >.NIL, and com.cliffc.aa.type.Type< T extends Type< T >.XNIL.

Here is the call graph for this function:

◆ mtname()

final String com.cliffc.aa.type.Type< T extends Type< T >.mtname ( Type< TypeFlt t,
Type< TypeFlt 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.TypeFlt.must_nil ( )

Definition at line 95 of file TypeFlt.java.

95 { return _x==-2 || (_x==0 && _con==0); }

References com.cliffc.aa.type.TypeFlt._con, and com.cliffc.aa.type.TypeFlt._x.

Referenced by com.cliffc.aa.type.TypeInt.xmeetf().

Here is the caller graph for this function:

◆ nn()

int com.cliffc.aa.type.TypeFlt.nn ( )
private

Definition at line 89 of file TypeFlt.java.

89 { assert _x <=0; return _con!=0 || _x== -1 ? -1 : -2; }

References com.cliffc.aa.type.TypeFlt._con, and com.cliffc.aa.type.TypeFlt._x.

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

Here is the caller graph for this function:

◆ not_nil()

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

Definition at line 97 of file TypeFlt.java.

97 { return _x==2 ? make(1,_z,_con) : this; }

References com.cliffc.aa.type.TypeFlt._con, com.cliffc.aa.type.TypeFlt._x, com.cliffc.aa.type.TypeFlt._z, and com.cliffc.aa.type.TypeFlt.make().

Here is the call graph for this function:

◆ 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< TypeFlt 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< TypeFlt 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< TypeFlt 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  }

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

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

Definition at line 930 of file Type.java.

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

◆ simple_ptr()

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

Definition at line 358 of file Type.java.

358 { return this; }

◆ str()

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

Definition at line 23 of file TypeFlt.java.

23  {
24  sb.p(_name);
25  if( _x==0 ) return sb.p(_con);
26  return sb.p(_x>0?"~":"").p(Math.abs(_x)==1?"n":"").p("flt").p(_z);
27  }

References com.cliffc.aa.type.TypeFlt._con, com.cliffc.aa.type.Type< TypeFlt >._name, com.cliffc.aa.type.TypeFlt._x, com.cliffc.aa.type.TypeFlt._z, and com.cliffc.aa.util.SB.p().

Here is the call 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< TypeFlt 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.TypeFlt.walk ( Predicate< Type p)

Definition at line 125 of file TypeFlt.java.

125 { p.test(this); }

◆ widen()

Type com.cliffc.aa.type.TypeFlt.widen ( )

Definition at line 121 of file TypeFlt.java.

121  {
122  assert _x <= 0;
123  return FLT64;
124  }

References com.cliffc.aa.type.TypeFlt._x, and com.cliffc.aa.type.TypeFlt.FLT64.

◆ xdual()

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

Definition at line 52 of file TypeFlt.java.

52 { return _x==0 ? this : new TypeFlt().init(-_x,_z,_con); }

References com.cliffc.aa.type.TypeFlt._con, com.cliffc.aa.type.TypeFlt._x, com.cliffc.aa.type.TypeFlt._z, and com.cliffc.aa.type.TypeFlt.init().

Here is the call graph for this function:

◆ xmeet()

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

Definition at line 53 of file TypeFlt.java.

53  {
54  assert t != this;
55  switch( t._type ) {
56  case TFLT: break;
57  case TINT: return ((TypeInt)t).xmeetf(this);
58  case TFUNPTR:
59  case TMEMPTR:
60  case TRPC: return cross_nil(t);
61  case TFUNSIG:
62  case TARY:
63  case TLIVE:
64  case TOBJ:
65  case TSTR:
66  case TSTRUCT:
67  case TTUPLE:
68  case TMEM: return ALL;
69  default: throw typerr(t);
70  }
71  TypeFlt tf = (TypeFlt)t;
72  assert !equals(tf); // Already covered by interning
73  int maxz = Math.max(_z,tf._z);
74  int minz = Math.min(_z,tf._z);
75  if( _x== 0 && tf._x== 0 && _con==tf._con ) return make(0,maxz,_con);
76  if( _x<= 0 && tf._x<= 0 ) return make(Math.min(nn(),tf.nn()),maxz,0); // Both bottom, widen size
77  if( _x > 0 && tf._x > 0 ) return make(Math.min(_x,tf._x),minz,0); // Both top, narrow size
78  if( _x==-2 && tf._x== 2 ) return this; // Top loses to other guy
79  if( _x== 2 && tf._x==-2 ) return tf; // Top loses to other guy
80 
81  // ttop==+1,+2 and that is 0,-1,-2
82  TypeFlt that = _x>0 ? tf : this;
83  TypeFlt ttop = _x>0 ? this : tf;
84  if( that._x<0 ) return that; // Return low value
85  if( log(that._con) <= ttop._z && (that._con!=0 || ttop._x==2) )
86  return that; // Keep a fitting constant
87  return make(that.nn(),that._z,0); // No longer a constant
88  }

References com.cliffc.aa.type.TypeFlt._con, com.cliffc.aa.type.Type< T extends Type< T >._type, com.cliffc.aa.type.TypeFlt._x, com.cliffc.aa.type.TypeFlt._z, com.cliffc.aa.type.Type< TypeFlt >.ALL, com.cliffc.aa.type.Type< TypeFlt >.cross_nil(), com.cliffc.aa.type.TypeFlt.equals(), com.cliffc.aa.type.TypeFlt.log(), com.cliffc.aa.type.TypeFlt.make(), com.cliffc.aa.type.TypeFlt.nn(), com.cliffc.aa.type.Type< TypeFlt >.TARY, com.cliffc.aa.type.Type< TypeFlt >.TFLT, com.cliffc.aa.type.Type< TypeFlt >.TFUNPTR, com.cliffc.aa.type.Type< TypeFlt >.TFUNSIG, com.cliffc.aa.type.Type< TypeFlt >.TINT, com.cliffc.aa.type.Type< TypeFlt >.TLIVE, com.cliffc.aa.type.Type< TypeFlt >.TMEM, com.cliffc.aa.type.Type< TypeFlt >.TMEMPTR, com.cliffc.aa.type.Type< TypeFlt >.TOBJ, com.cliffc.aa.type.Type< TypeFlt >.TRPC, com.cliffc.aa.type.Type< TypeFlt >.TSTR, com.cliffc.aa.type.Type< TypeFlt >.TSTRUCT, com.cliffc.aa.type.Type< TypeFlt >.TTUPLE, and com.cliffc.aa.type.Type< TypeFlt >.typerr().

Here is the call graph for this function:

◆ xmt_name()

Type com.cliffc.aa.type.Type< T extends Type< T >.xmt_name ( Type< TypeFlt t,
Type< TypeFlt 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

◆ _con

◆ _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.

◆ _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.

◆ _x

◆ _z

◆ 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.

◆ 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.

◆ FLT32

final TypeFlt com.cliffc.aa.type.TypeFlt.FLT32 = (TypeFlt)make(-2,32,0)
static

Definition at line 39 of file TypeFlt.java.

Referenced by com.cliffc.aa.type.TypeFlt.init1().

◆ FLT64

◆ 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.

◆ NFLT64

final TypeFlt com.cliffc.aa.type.TypeFlt.NFLT64 = (TypeFlt)make(-1,64,0)
static

Definition at line 41 of file TypeFlt.java.

Referenced by com.cliffc.aa.TestParse.testParse04().

◆ NIL

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

Definition at line 332 of file Type.java.

◆ 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.

◆ PI

final TypeFlt com.cliffc.aa.type.TypeFlt.PI = (TypeFlt)con(Math.PI)
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.

◆ SCALAR

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

Definition at line 328 of file Type.java.

◆ SCALAR_PRIMS

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

Definition at line 349 of file Type.java.

◆ 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.

◆ 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 TypeFlt [] com.cliffc.aa.type.TypeFlt.TYPES = new TypeFlt[]{FLT64,FLT32,PI,NFLT64}
static

Definition at line 42 of file TypeFlt.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< TypeFlt >::xdual
T xdual()
Definition: Type.java:365
com.cliffc.aa.type.Type< TypeFlt >::NSCALR
static final Type NSCALR
Definition: Type.java:330
com.cliffc.aa.type.Type< TypeFlt >::TLIVE
static final byte TLIVE
Definition: Type.java:276
com.cliffc.aa.type.TypeFlt._x
byte _x
Definition: TypeFlt.java:10
com.cliffc.aa.type.TypeFlt.FLT32
static final TypeFlt FLT32
Definition: TypeFlt.java:39
com.cliffc.aa.type.Type< TypeFlt >::intern_check1
boolean intern_check1()
Definition: Type.java:227
com.cliffc.aa.type.Type< TypeFlt >::TMEMPTR
static final byte TMEMPTR
Definition: Type.java:273
com.cliffc.aa.type.Type< TypeFlt >::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< TypeFlt >::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< TypeFlt >::typerr
RuntimeException typerr(Type t)
Definition: Type.java:947
com.cliffc.aa.type.Type< TypeFlt >::_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< TypeFlt >::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< TypeFlt >::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.TypeFlt._con
double _con
Definition: TypeFlt.java:12
com.cliffc.aa.type.Type
an implementation of language AA
Definition: Type.java:94
com.cliffc.aa.type.Type< TypeFlt >::CNT
static int CNT
Definition: Type.java:95
com.cliffc.aa.util.Ary
Definition: Ary.java:11
com.cliffc.aa.type.Type< TypeFlt >::compute_hash
int compute_hash()
Definition: Type.java:109
com.cliffc.aa.type.Type< TypeFlt >::TSTR
static final byte TSTR
Definition: Type.java:270
com.cliffc.aa.type.Type< TypeFlt >::_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< TypeFlt >::TXNIL
static final byte TXNIL
Definition: Type.java:260
com.cliffc.aa.type.Type< TypeFlt >::TLAST
static final byte TLAST
Definition: Type.java:277
com.cliffc.aa.type.Type< TypeFlt >::ANY
static final Type ANY
Definition: Type.java:325
com.cliffc.aa.type.Type< TypeFlt >::check_name
static boolean check_name(String n)
Definition: Type.java:548
com.cliffc.aa.type.Type< TypeFlt >::meet
final Type meet(Type t)
Definition: Type.java:412
com.cliffc.aa.type.Type< TypeFlt >::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< TypeFlt >::str
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
Definition: Type.java:131
com.cliffc.aa.type.Type< TypeFlt >::TFUNPTR
static final byte TFUNPTR
Definition: Type.java:274
com.cliffc.aa.type.Type< TypeFlt >::TINT
static final byte TINT
Definition: Type.java:263
com.cliffc.aa.type.TypeFlt.equals
boolean equals(Object o)
Definition: TypeFlt.java:16
com.cliffc.aa.type.Type< TypeFlt >::ISA_SCALAR
static final byte[] ISA_SCALAR
Definition: Type.java:355
com.cliffc.aa.type.Type< TypeFlt >::ALL
static final Type ALL
Definition: Type.java:324
com.cliffc.aa.type.Type< TypeFlt >::ALL_TYPES
static Ary< Type > ALL_TYPES
Definition: Type.java:650
com.cliffc.aa.type.Type< TypeFlt >::TMEM
static final byte TMEM
Definition: Type.java:272
com.cliffc.aa.type.Type< TypeFlt >::TXNREAL
static final byte TXNREAL
Definition: Type.java:258
com.cliffc.aa.type.Type< TypeFlt >::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.TypeFlt.con
static Type con(double con)
Definition: TypeFlt.java:36
com.cliffc.aa.type.Type._dual
T _dual
Definition: Type.java:100
com.cliffc.aa.type.Type< TypeFlt >::above_center
boolean above_center()
Definition: Type.java:741
com.cliffc.aa.type.Type< TypeFlt >::TSTRUCT
static final byte TSTRUCT
Definition: Type.java:268
com.cliffc.aa.type.Type< TypeFlt >::TALL
static final byte TALL
Definition: Type.java:239
com.cliffc.aa.type.Type< TypeFlt >::RECURSIVE_MEET
static int RECURSIVE_MEET
Definition: Type.java:163
com.cliffc.aa.type.TypeFlt.make
static Type make(int x, int z, double con)
Definition: TypeFlt.java:30
com.cliffc.aa.type.Type< TypeFlt >::has_name
boolean has_name()
Definition: Type.java:549
com.cliffc.aa.type.Type< TypeFlt >::contains
final boolean contains(Type t)
Definition: Type.java:926
com.cliffc.aa.util.Util
Definition: Util.java:5
com.cliffc.aa.type.Type< TypeFlt >::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< TypeFlt >::must_nil
boolean must_nil()
Definition: Type.java:845
com.cliffc.aa.type.TypeFlt.log
static int log(double con)
Definition: TypeFlt.java:90
com.cliffc.aa.type.Type< TypeFlt >::INTERN
static final ConcurrentHashMap< Type, Type > INTERN
Definition: Type.java:162
com.cliffc.aa.type.Type< TypeFlt >::mtname
final String mtname(Type t, Type mt)
Definition: Type.java:567
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< TypeFlt >::TSCALAR
static final byte TSCALAR
Definition: Type.java:246
com.cliffc.aa.type.Type< TypeFlt >::TYPES
static final Type[] TYPES
Definition: Type.java:340
com.cliffc.aa.type.Type< TypeFlt >::TXSCALAR
static final byte TXSCALAR
Definition: Type.java:247
com.cliffc.aa.type.Type< TypeFlt >::TNIL
static final byte TNIL
Definition: Type.java:259
com.cliffc.aa.type.Type< TypeFlt >::TRPC
static final byte TRPC
Definition: Type.java:265
com.cliffc.aa.util.VBitSet
Definition: VBitSet.java:5
com.cliffc.aa.type.Type< TypeFlt >::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< TypeFlt >::NIL
static final Type NIL
Definition: Type.java:332
com.cliffc.aa.type.Type< TypeFlt >::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< TypeFlt >::oop_deep_impl
Type oop_deep_impl(Type t)
Definition: Type.java:634
com.cliffc.aa.type.TypeFlt._z
byte _z
Definition: TypeFlt.java:11
com.cliffc.aa.type.Type< TypeFlt >::equals
boolean equals(Object o)
Definition: Type.java:112
com.cliffc.aa.type.Type< TypeFlt >::SCALAR_PRIMS
static Type[] SCALAR_PRIMS
Definition: Type.java:349
com.cliffc.aa
Definition: AA.java:1
com.cliffc.aa.type.Type< TypeFlt >::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.TypeFlt.nn
int nn()
Definition: TypeFlt.java:89
com.cliffc.aa.type.Type._name
String _name
Definition: Type.java:99
com.cliffc.aa.type.TypeFlt.is_con
boolean is_con()
Definition: TypeFlt.java:94
com.cliffc.aa.type.Type< TypeFlt >::REAL
static final Type REAL
Definition: Type.java:334
com.cliffc.aa.type.Type< TypeFlt >::dual
final T dual()
Definition: Type.java:361
com.cliffc.aa.type.Type< TypeFlt >::oob
Type oob()
Definition: Type.java:635
com.cliffc.aa.type.Type< TypeFlt >::XNIL
static final Type XNIL
Definition: Type.java:333
com.cliffc.aa.type.Type< TypeFlt >::POOLS
static final Pool[] POOLS
Definition: Type.java:281
com.cliffc.aa.type.Type< TypeFlt >::TOBJ
static final byte TOBJ
Definition: Type.java:267
com.cliffc.aa.type.Type< TypeFlt >::concat
static void concat(Ary< Type > ts, Type[] ts1)
Definition: Type.java:676
com
com.cliffc.aa.util.SB.toString
String toString()
Definition: SB.java:62
com.cliffc.aa.type.Type< TypeFlt >::hashcons
T hashcons()
Definition: Type.java:165
com.cliffc.aa.type.Type< TypeFlt >::TXREAL
static final byte TXREAL
Definition: Type.java:256
com.cliffc.aa.type.Type< TypeFlt >::TFUNSIG
static final byte TFUNSIG
Definition: Type.java:275
com.cliffc.aa.type.Type< TypeFlt >::TARY
static final byte TARY
Definition: Type.java:269
com.cliffc.aa.type.TypeFlt.FLT64
static final TypeFlt FLT64
Definition: TypeFlt.java:38
com.cliffc.aa.type.Type< TypeFlt >::TFLT
static final byte TFLT
Definition: Type.java:264