|
static final Type | ALL |
|
static final Type | ANY |
|
static final TypeInt | BOOL = make(-2, 1,0) |
|
static final Type | CTRL |
|
static final Type | FALSE = make( 0, 1,0) |
|
static final TypeInt | INT32 = make(-2,32,0) |
|
static final TypeInt | INT64 = make(-2,64,0) |
|
static final TypeInt | INT8 = make(-2, 8,0) |
|
static final Type | NIL |
|
static final TypeInt | NINT64 = make(-1,64,0) |
|
static final TypeInt | NINT8 = make(-1, 8,0) |
|
static final Type | NSCALR |
|
static final Type | REAL |
|
static int | RECURSIVE_MEET |
|
static final Type | SCALAR |
|
static final TypeInt | TRUE = make( 0, 1,1) |
|
static final Type | XCTRL |
|
static final TypeInt | XINT1 = make( 2, 1,0) |
|
static final Type | XNIL |
|
static final Type | XNSCALR |
|
static final Type | XSCALAR |
|
static final TypeInt | ZERO = new TypeInt().init(0,1,0).hashcons_free() |
|
Definition at line 9 of file TypeInt.java.
◆ [static initializer]()
com.cliffc.aa.type.TypeInt.[static initializer] |
|
staticpackage |
◆ _set_name()
Definition at line 558 of file Type.java.
562 return t1.hashcons_free();
◆ _uid()
◆ above()
Definition at line 625 of file Type.java.
625 {
return t !=
this &&
meet(t)==t; }
◆ above_center()
boolean com.cliffc.aa.type.TypeInt.above_center |
( |
| ) |
|
◆ ALL_TYPES()
Definition at line 651 of file Type.java.
656 concat(ts,TypeFunPtr.TYPES);
657 concat(ts,TypeFunSig.TYPES);
661 concat(ts,TypeMemPtr.TYPES);
665 concat(ts,TypeStruct.TYPES);
671 for(
int i=0; i<ts.
_len; i++ )
672 for(
int j=i+1; j<ts.
_len; j++ )
◆ check_commute()
Definition at line 593 of file Type.java.
594 if( t==
this )
return true;
601 if( mt==nmt2 )
return true;
602 System.out.println(
"Meet not commutative: "+
this+
".meet("+t+
")="+mt+
",\n but "+t+
".meet("+
this+
")="+nmt2);
◆ check_name()
Definition at line 548 of file Type.java.
548 {
return n.isEmpty() || n.charAt(n.length()-1)==
':'; }
◆ check_startup()
Definition at line 684 of file Type.java.
689 for(
Type t1 : ts ) {
692 assert t0.check_symmetric(t1,mt);
699 for(
Type t2 : ts ) {
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);
709 assert errs==0 :
"Found "+errs+
" associative errors";
714 for(
Type t1 : ts ) {
716 for(
Type t2 : ts ) {
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);
728 assert errs==0 :
"Found "+errs+
" non-join-type errors";
731 SCALAR_PRIMS =
new Type[] { TypeInt.INT64, TypeFlt.FLT64, TypeMemPtr.OOP0, TypeFunPtr.GENERIC_FUNPTR, TypeRPC.ALL_CALL };
◆ check_symmetric()
Definition at line 608 of file Type.java.
609 if( t==
this )
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);
◆ clone()
Definition at line 304 of file Type.java.
311 if( t instanceof TypeStruct )
312 ((TypeStruct)t)._cyclic =
false;
315 catch( CloneNotSupportedException cns ) {
throw new RuntimeException(cns); }
◆ compute_hash()
int com.cliffc.aa.type.TypeInt.compute_hash |
( |
| ) |
|
|
package |
◆ con()
static TypeInt com.cliffc.aa.type.TypeInt.con |
( |
long |
con | ) |
|
|
static |
Definition at line 37 of file TypeInt.java.
References com.cliffc.aa.type.TypeInt.log(), and com.cliffc.aa.type.TypeInt.make().
Referenced by com.cliffc.aa.node.PrimNode.Prim1OpI64.apply(), com.cliffc.aa.node.PrimNode.Prim2OpI64.apply(), com.cliffc.aa.HM.HM9.IsEmpty.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.HM.Dec.apply(), com.cliffc.aa.Parse.inc(), com.cliffc.aa.type.TypeInt.init(), com.cliffc.aa.type.TypeInt.log(), com.cliffc.aa.type.TypeFlt.make(), com.cliffc.aa.type.TypeInt.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.node.TestNode.print(), com.cliffc.aa.HM.TestHM6.test01(), com.cliffc.aa.HM.TestHM4.test01(), com.cliffc.aa.HM.TestHM5.test01(), com.cliffc.aa.HM.TestHM2.test01(), com.cliffc.aa.HM.TestHM3.test01(), com.cliffc.aa.HM.TestHM.test01(), com.cliffc.aa.HM.TestHM9.test01(), com.cliffc.aa.HM.TestHM3.test02(), com.cliffc.aa.HM.TestHM4.test02(), com.cliffc.aa.HM.TestHM5.test02(), com.cliffc.aa.HM.TestHM2.test02(), com.cliffc.aa.HM.TestHM.test02(), com.cliffc.aa.HM.TestHM9.test02(), com.cliffc.aa.HM.TestHM4.test03(), com.cliffc.aa.HM.TestHM5.test03(), com.cliffc.aa.HM.TestHM2.test03(), com.cliffc.aa.HM.TestHM3.test03(), com.cliffc.aa.HM.TestHM4.test04(), com.cliffc.aa.HM.TestHM5.test04(), com.cliffc.aa.HM.TestHM2.test04(), com.cliffc.aa.HM.TestHM3.test04(), com.cliffc.aa.HM.TestHM4.test05(), com.cliffc.aa.HM.TestHM5.test05(), com.cliffc.aa.HM.TestHM2.test05(), com.cliffc.aa.HM.TestHM3.test05(), com.cliffc.aa.HM.TestHM3.test05a(), com.cliffc.aa.HM.TestHM.test06(), com.cliffc.aa.HM.TestHM9.test06(), com.cliffc.aa.HM.TestHM2.test07(), com.cliffc.aa.HM.TestHM4.test07(), com.cliffc.aa.HM.TestHM5.test07(), com.cliffc.aa.HM.TestHM3.test07(), com.cliffc.aa.HM.TestHM.test08(), com.cliffc.aa.HM.TestHM9.test08(), com.cliffc.aa.HM.TestHM2.test08(), com.cliffc.aa.HM.TestHM4.test08(), com.cliffc.aa.HM.TestHM5.test08(), com.cliffc.aa.HM.TestHM3.test08(), com.cliffc.aa.HM.TestHM1.test1(), com.cliffc.aa.HM.TestHM2.test10(), com.cliffc.aa.HM.TestHM3.test10(), com.cliffc.aa.HM.TestHM5.test11(), com.cliffc.aa.HM.TestHM4.test11(), com.cliffc.aa.HM.TestHM2.test11(), com.cliffc.aa.HM.TestHM3.test11(), com.cliffc.aa.HM.TestHM.test12(), com.cliffc.aa.HM.TestHM9.test12(), com.cliffc.aa.HM.TestHM4.test12(), com.cliffc.aa.HM.TestHM5.test12(), com.cliffc.aa.HM.TestHM.test13(), com.cliffc.aa.HM.TestHM9.test13(), com.cliffc.aa.HM.TestHM1.test13(), com.cliffc.aa.HM.TestHM4.test13(), com.cliffc.aa.HM.TestHM5.test13(), com.cliffc.aa.HM.TestHM4.test14(), com.cliffc.aa.HM.TestHM5.test14(), com.cliffc.aa.HM.TestHM.test15(), com.cliffc.aa.HM.TestHM9.test15(), com.cliffc.aa.HM.TestHM4.test15(), com.cliffc.aa.HM.TestHM5.test15(), com.cliffc.aa.HM.TestHM4.test16(), com.cliffc.aa.HM.TestHM5.test16(), com.cliffc.aa.HM.TestHM1.test17(), com.cliffc.aa.HM.TestHM4.test17(), com.cliffc.aa.HM.TestHM5.test17(), com.cliffc.aa.HM.TestHM.test18(), com.cliffc.aa.HM.TestHM9.test18(), com.cliffc.aa.HM.TestHM1.test18(), com.cliffc.aa.HM.TestHM4.test18(), com.cliffc.aa.HM.TestHM5.test18(), com.cliffc.aa.HM.TestHM.test19(), com.cliffc.aa.HM.TestHM9.test19(), com.cliffc.aa.HM.TestHM4.test19(), com.cliffc.aa.HM.TestHM5.test19(), com.cliffc.aa.HM.TestHM1.test2(), com.cliffc.aa.HM.TestHM1.test20(), com.cliffc.aa.HM.TestHM4.test20(), com.cliffc.aa.HM.TestHM5.test20(), com.cliffc.aa.HM.TestHM4.test21(), com.cliffc.aa.HM.TestHM5.test21(), com.cliffc.aa.HM.TestHM5.test22(), com.cliffc.aa.HM.TestHM4.test22(), com.cliffc.aa.HM.TestHM1.test23(), com.cliffc.aa.HM.TestHM5.test23(), com.cliffc.aa.HM.TestHM4.test23(), com.cliffc.aa.HM.TestHM.test25(), com.cliffc.aa.HM.TestHM9.test25(), com.cliffc.aa.HM.TestHM.test26(), com.cliffc.aa.HM.TestHM9.test26(), com.cliffc.aa.HM.TestHM1.test3(), com.cliffc.aa.HM.TestHM9.test34(), com.cliffc.aa.HM.TestHM.test34(), com.cliffc.aa.HM.TestHM1.test4(), com.cliffc.aa.HM.TestHM.test47(), com.cliffc.aa.HM.TestHM9.test47(), com.cliffc.aa.HM.TestHM.test49(), com.cliffc.aa.HM.TestHM9.test49(), com.cliffc.aa.HM.TestHM1.test5(), com.cliffc.aa.HM.TestHM9.test50(), com.cliffc.aa.HM.TestHM.test56(), com.cliffc.aa.HM.TestHM1.test7(), com.cliffc.aa.HM.TestHM1.test8(), com.cliffc.aa.type.TestApprox.testApprox1(), com.cliffc.aa.type.TestApprox.testApprox2(), com.cliffc.aa.type.TestApprox.testApprox4(), com.cliffc.aa.type.TestApprox.testApprox7(), com.cliffc.aa.TestLive.testBasic(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve(), com.cliffc.aa.TestLive.testNewObj(), 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.testParse03(), com.cliffc.aa.TestParse.testParse04(), com.cliffc.aa.TestParse.testParse06(), com.cliffc.aa.TestParse.testParse07(), com.cliffc.aa.TestParse.testParse09(), com.cliffc.aa.TestParse.testParse10(), com.cliffc.aa.TestParse.testParse11(), com.cliffc.aa.TestParse.testParse12(), com.cliffc.aa.TestParse.testParse13(), com.cliffc.aa.TestParse.testParse14(), com.cliffc.aa.TestParse.testParse15(), com.cliffc.aa.type.TestType.testRecursive(), com.cliffc.aa.node.PrimNode.AndI64.value(), com.cliffc.aa.node.PrimNode.OrI64.value(), and com.cliffc.aa.type.TypeInt.xmeetf().
◆ concat()
Definition at line 676 of file Type.java.
677 for(
Type t1 : ts1 ) {
678 assert !t1.above_center();
680 if( t1!=t1.dual() ) ts.
push(t1.dual());
◆ contains() [1/2]
◆ contains() [2/2]
◆ cross_nil()
◆ cycle_equals()
boolean com.cliffc.aa.type.TypeInt.cycle_equals |
( |
Type |
o | ) |
|
◆ dual()
◆ eq()
Definition at line 136 of file Type.java.
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++ )
◆ equals()
boolean com.cliffc.aa.type.TypeInt.equals |
( |
Object |
o | ) |
|
◆ getd()
double com.cliffc.aa.type.TypeInt.getd |
( |
| ) |
|
◆ getl()
long com.cliffc.aa.type.TypeInt.getl |
( |
| ) |
|
◆ getstr()
◆ has_name()
◆ hashCode()
◆ hashcons()
Definition at line 165 of file Type.java.
167 T t2 = (T)
INTERN.get(
this);
169 assert t2._dual !=
null;
180 d._hash = d.compute_hash();
182 if(
this==d )
return d;
184 assert d._dual==
null;
185 assert
INTERN.get(d)==
null;
◆ hashcons_free()
◆ high()
◆ init() [1/2]
◆ init() [2/2]
TypeInt com.cliffc.aa.type.TypeInt.init |
( |
int |
x, |
|
|
int |
z, |
|
|
long |
con |
|
) |
| |
|
private |
◆ init0()
Definition at line 642 of file Type.java.
643 types.put(
"real",
REAL);
644 types.put(
"scalar",
SCALAR);
645 TypeInt.init1(types);
646 TypeFlt.init1(types);
647 TypeStr.init1(types);
◆ init1()
static void com.cliffc.aa.type.TypeInt.init1 |
( |
HashMap< String, Type > |
types | ) |
|
|
staticpackage |
Definition at line 51 of file TypeInt.java.
52 types.put(
"bool" ,
BOOL);
53 types.put(
"int1" ,
BOOL);
54 types.put(
"int8" ,
INT8);
55 types.put(
"int16",
INT16);
56 types.put(
"int32",
INT32);
57 types.put(
"int64",
INT64);
58 types.put(
"int" ,
INT64);
References com.cliffc.aa.type.TypeInt.BOOL, com.cliffc.aa.type.TypeInt.INT16, com.cliffc.aa.type.TypeInt.INT32, com.cliffc.aa.type.TypeInt.INT64, and com.cliffc.aa.type.TypeInt.INT8.
Referenced by com.cliffc.aa.type.Type< TypeFlt >.init0().
◆ intern_check()
Definition at line 212 of file Type.java.
216 if( !k.intern_check0(v) ) {
217 System.out.println(
"INTERN_CHECK FAIL: "+k._uid+
":"+k+
" vs "+v.
_uid+
":"+v);
◆ intern_check0()
◆ intern_check1()
◆ intern_find()
◆ intern_lookup()
◆ intern_size()
◆ interned()
◆ is_con()
boolean com.cliffc.aa.type.TypeInt.is_con |
( |
| ) |
|
◆ is_display()
◆ is_display_ptr()
◆ is_forward_ref()
◆ is_num()
◆ is_ptr()
◆ is_simple()
◆ isa()
◆ isa_scalar()
◆ isBitShape()
byte com.cliffc.aa.type.TypeInt.isBitShape |
( |
Type |
t | ) |
|
Definition at line 161 of file TypeInt.java.
164 if( t._type ==
TINT )
return (
byte)(
_z<=((TypeInt)t)._z ? 0 : 99);
165 if( t._type ==
TFLT )
return 2;
166 if( t._type ==
Type.TMEMPTR )
return 99;
167 if( t._type ==
Type.TFUNPTR )
return 99;
168 if( t._type ==
Type.TALL )
return 99;
169 if( t._type ==
TREAL )
return 1;
170 if( t._type ==
TSCALAR )
return 9;
171 if( t._type ==
TSTR )
return 99;
172 if( t ==
NIL || t ==
XNIL )
return 99;
References com.cliffc.aa.type.Type< T extends Type< T >._type, com.cliffc.aa.type.TypeInt._z, com.cliffc.aa.type.Type< TypeInt >.NIL, com.cliffc.aa.type.Type< T extends Type< T >.TALL, com.cliffc.aa.type.Type< TypeInt >.TFLT, com.cliffc.aa.type.Type< T extends Type< T >.TFUNPTR, com.cliffc.aa.type.Type< TypeInt >.TINT, com.cliffc.aa.type.Type< T extends Type< T >.TMEMPTR, com.cliffc.aa.type.Type< TypeInt >.TREAL, com.cliffc.aa.type.Type< TypeInt >.TSCALAR, com.cliffc.aa.type.Type< TypeInt >.TSTR, com.cliffc.aa.type.Type< TypeInt >.TXSCALAR, com.cliffc.aa.AA.unimpl(), and com.cliffc.aa.type.Type< TypeInt >.XNIL.
◆ join()
◆ log()
static int com.cliffc.aa.type.TypeInt.log |
( |
long |
con | ) |
|
|
staticprivate |
◆ make() [1/2]
Definition at line 147 of file Type.java.
148 Pool P =
POOLS[type];
149 Type t1 = P.malloc();
150 return t1.
init(type,
"").hashcons_free();
◆ make() [2/2]
static TypeInt com.cliffc.aa.type.TypeInt.make |
( |
int |
x, |
|
|
int |
z, |
|
|
long |
con |
|
) |
| |
|
static |
Definition at line 31 of file TypeInt.java.
32 if( Math.abs(x)==1 && z==1 &&
con==0)
con=1;
34 return t1.init(x,z,
con).hashcons_free();
References com.cliffc.aa.type.TypeInt.con(), com.cliffc.aa.type.Type< T extends Type< T >.hashcons_free(), com.cliffc.aa.type.TypeInt.init(), com.cliffc.aa.type.Type< TypeInt >.POOLS, and com.cliffc.aa.type.Type< TypeInt >.TINT.
Referenced by com.cliffc.aa.type.TypeInt.con(), com.cliffc.aa.type.TypeInt.maxsize(), com.cliffc.aa.type.TypeInt.meet_nil(), com.cliffc.aa.type.TypeInt.minsize(), com.cliffc.aa.type.TypeInt.not_nil(), com.cliffc.aa.type.TypeInt.xmeet(), and com.cliffc.aa.type.TypeInt.xmeetf().
◆ make_from()
◆ maxsize()
◆ may_be_con()
boolean com.cliffc.aa.type.TypeInt.may_be_con |
( |
| ) |
|
◆ may_nil()
boolean com.cliffc.aa.type.TypeInt.may_nil |
( |
| ) |
|
◆ meet()
Definition at line 412 of file Type.java.
414 if( t ==
this )
return this;
416 Type mt = Key.get(
this,t);
417 if( mt !=
null )
return mt;
◆ meet_loop()
◆ meet_nil()
Type com.cliffc.aa.type.TypeInt.meet_nil |
( |
Type |
nil | ) |
|
◆ minsize()
◆ mtname()
Definition at line 567 of file Type.java.
568 Type t0 =
this, t1 = t;
569 String s0 = t0.
_name, s1 = t1._name;
571 if(
Util.
eq(s0,s1) )
return s0;
573 if( s0.length() > s1.length() ) { t1=
this; t0=t; s0=t0.
_name; s1=t1._name; }
574 int x = 0, i;
char c;
576 for( i = 0; i < s0.length(); i++ ) {
577 if( (c=s0.charAt(i)) != s1.charAt(i) )
585 String s2 = i==s0.length() ? s0 : s0.substring(0, x).intern();
◆ must_nil()
boolean com.cliffc.aa.type.TypeInt.must_nil |
( |
| ) |
|
◆ nn()
int com.cliffc.aa.type.TypeInt.nn |
( |
| ) |
|
|
private |
◆ not_nil()
Type com.cliffc.aa.type.TypeInt.not_nil |
( |
| ) |
|
|
package |
◆ oob() [1/6]
◆ oob() [2/6]
◆ oob() [3/6]
◆ oob() [4/6]
◆ oob() [5/6]
◆ oob() [6/6]
◆ oob_deep()
◆ oop_deep_impl()
◆ rdual()
◆ remove_name()
◆ repeats_in_cycles()
◆ retern()
◆ set_name()
◆ sharptr()
◆ simple_ptr()
◆ str()
◆ toString()
◆ typerr()
Definition at line 947 of file Type.java.
948 throw new RuntimeException(
"Should not reach here: internal type system error with "+
this+(t==
null?
"":(
" and "+t)));
◆ untern()
◆ walk()
void com.cliffc.aa.type.TypeInt.walk |
( |
Predicate< Type > |
p | ) |
|
◆ widen()
Type com.cliffc.aa.type.TypeInt.widen |
( |
| ) |
|
◆ xdual()
TypeInt com.cliffc.aa.type.TypeInt.xdual |
( |
| ) |
|
|
protected |
◆ xmeet()
Type com.cliffc.aa.type.TypeInt.xmeet |
( |
Type |
t | ) |
|
|
protected |
Definition at line 65 of file TypeInt.java.
83 TypeInt tt = (TypeInt)t;
85 int maxz = Math.max(
_z,tt._z);
86 int minz = Math.min(
_z,tt._z);
87 if(
_x== 0 && tt._x== 0 &&
_con==tt._con )
return make(0,maxz,
_con);
88 if(
_x<= 0 && tt._x<= 0 )
return make(Math.min(
nn(),tt.nn()),maxz,0);
89 if(
_x > 0 && tt._x > 0 )
return make(Math.min(
_x,tt._x ),minz,0);
90 if(
_x==-2 && tt._x== 2 )
return this;
91 if(
_x== 2 && tt._x==-2 )
return tt ;
94 TypeInt that =
_x>0 ? tt :
this;
95 TypeInt ttop =
_x>0 ? this : tt;
96 if( that._x<0 )
return that;
97 if(
log(that._con) <= ttop._z && (that._con!=0 || ttop._x==2) )
99 return make(that.nn(),that._z,0);
References com.cliffc.aa.type.TypeInt._con, com.cliffc.aa.type.Type< T extends Type< T >._type, com.cliffc.aa.type.TypeInt._x, com.cliffc.aa.type.TypeInt._z, com.cliffc.aa.type.Type< TypeInt >.ALL, com.cliffc.aa.type.Type< TypeInt >.cross_nil(), com.cliffc.aa.type.TypeInt.equals(), com.cliffc.aa.type.TypeInt.log(), com.cliffc.aa.type.TypeInt.make(), com.cliffc.aa.type.TypeInt.nn(), com.cliffc.aa.type.Type< TypeInt >.TARY, com.cliffc.aa.type.Type< TypeInt >.TFLT, com.cliffc.aa.type.Type< TypeInt >.TFUNPTR, com.cliffc.aa.type.Type< TypeInt >.TFUNSIG, com.cliffc.aa.type.Type< TypeInt >.TINT, com.cliffc.aa.type.Type< TypeInt >.TLIVE, com.cliffc.aa.type.Type< TypeInt >.TMEM, com.cliffc.aa.type.Type< TypeInt >.TMEMPTR, com.cliffc.aa.type.Type< TypeInt >.TOBJ, com.cliffc.aa.type.Type< TypeInt >.TRPC, com.cliffc.aa.type.Type< TypeInt >.TSTR, com.cliffc.aa.type.Type< TypeInt >.TSTRUCT, com.cliffc.aa.type.Type< TypeInt >.TTUPLE, com.cliffc.aa.type.Type< TypeInt >.typerr(), and com.cliffc.aa.type.TypeInt.xmeetf().
Referenced by com.cliffc.aa.type.TypeInt.xmeetf().
◆ xmeetf()
Definition at line 111 of file TypeInt.java.
114 if( tf._x < 0 )
return tf;
116 return make(Math.min(
_x,tf._x),Math.min(tf._z>>1,
_z),0);
121 return TypeFlt.make(
con==0 ? -2 : -1, tf.
_z,0);
128 if( (lg<<1) <= tf._z )
return TypeFlt.make((
_con!=0 && tf._x==-1) ? -1 : -2, tf._z,0);
132 if(
_con==tf._con )
return this;
133 if( ((
long)tf._con) == tf._con )
134 return xmeet(TypeInt.con((
long)tf._con));
135 return TypeFlt.make(
_con==0 || tf._con==0 ? -2 : -1,Math.max(TypeFlt.log(
_con),tf._z),0);
138 double dcon = tf._z==32 ? (float)
_con : (
double)
_con;
139 if( (
long)dcon ==
_con && (
_con!=0 || tf._x == 2) )
141 tx =
_con==0 ? -2 : -1;
145 if( tf._x > 0 )
return make(tx,
_z,0);
147 long icon = (long)tf._con;
148 if( tf._x== 0 && icon == tf._con )
149 return make(-2,Math.max(
_z,
log(icon)),0);
150 if( (
_z<<1) <= tf._z )
return TypeFlt.make(Math.min(tx,tf._x),tf._z,0);
151 if( (
_z<<1) <= 64 )
return TypeFlt.FLT64;
References com.cliffc.aa.type.TypeFlt._con, com.cliffc.aa.type.TypeInt._con, com.cliffc.aa.type.TypeInt._x, com.cliffc.aa.type.TypeFlt._x, com.cliffc.aa.type.TypeFlt._z, com.cliffc.aa.type.TypeInt._z, com.cliffc.aa.type.TypeInt.con(), com.cliffc.aa.type.TypeFlt.FLT64, com.cliffc.aa.type.TypeFlt.log(), com.cliffc.aa.type.TypeInt.log(), com.cliffc.aa.type.TypeFlt.make(), com.cliffc.aa.type.TypeInt.make(), com.cliffc.aa.type.TypeFlt.must_nil(), com.cliffc.aa.type.TypeInt.must_nil(), com.cliffc.aa.type.Type< TypeInt >.NREAL, com.cliffc.aa.type.Type< TypeInt >.REAL, and com.cliffc.aa.type.TypeInt.xmeet().
Referenced by com.cliffc.aa.type.TypeInt.xmeet().
◆ xmt_name()
◆ _con
long com.cliffc.aa.type.TypeInt._con |
|
private |
Definition at line 12 of file TypeInt.java.
Referenced by com.cliffc.aa.type.TypeInt.compute_hash(), com.cliffc.aa.type.TypeInt.equals(), com.cliffc.aa.type.TypeInt.getd(), com.cliffc.aa.type.TypeInt.getl(), com.cliffc.aa.type.TypeInt.init(), com.cliffc.aa.type.TypeInt.may_nil(), com.cliffc.aa.type.TypeInt.meet_nil(), com.cliffc.aa.type.TypeInt.must_nil(), com.cliffc.aa.type.TypeInt.nn(), com.cliffc.aa.type.TypeInt.not_nil(), com.cliffc.aa.type.TypeInt.str(), com.cliffc.aa.type.TypeInt.xdual(), com.cliffc.aa.type.TypeInt.xmeet(), and com.cliffc.aa.type.TypeInt.xmeetf().
◆ _dual
◆ _hash
◆ _name
◆ _type
◆ _uid
◆ _x
byte com.cliffc.aa.type.TypeInt._x |
|
private |
Definition at line 10 of file TypeInt.java.
Referenced by com.cliffc.aa.type.TypeInt.above_center(), com.cliffc.aa.type.TypeInt.compute_hash(), com.cliffc.aa.type.TypeInt.equals(), com.cliffc.aa.type.TypeInt.init(), com.cliffc.aa.type.TypeInt.is_con(), com.cliffc.aa.type.TypeInt.may_be_con(), com.cliffc.aa.type.TypeInt.may_nil(), com.cliffc.aa.type.TypeInt.meet_nil(), com.cliffc.aa.type.TypeInt.must_nil(), com.cliffc.aa.type.TypeInt.nn(), com.cliffc.aa.type.TypeInt.not_nil(), com.cliffc.aa.type.TypeInt.str(), com.cliffc.aa.type.TypeInt.widen(), com.cliffc.aa.type.TypeInt.xdual(), com.cliffc.aa.type.TypeInt.xmeet(), and com.cliffc.aa.type.TypeInt.xmeetf().
◆ _z
byte com.cliffc.aa.type.TypeInt._z |
Definition at line 11 of file TypeInt.java.
Referenced by com.cliffc.aa.type.TypeInt.compute_hash(), com.cliffc.aa.type.TypeInt.equals(), com.cliffc.aa.node.MemPrimNode.err(), com.cliffc.aa.type.TypeInt.init(), com.cliffc.aa.type.TypeInt.isBitShape(), com.cliffc.aa.type.TypeInt.maxsize(), com.cliffc.aa.type.TypeInt.meet_nil(), com.cliffc.aa.type.TypeInt.minsize(), com.cliffc.aa.type.TypeInt.not_nil(), com.cliffc.aa.type.TypeInt.str(), com.cliffc.aa.type.TypeInt.xdual(), com.cliffc.aa.type.TypeInt.xmeet(), and com.cliffc.aa.type.TypeInt.xmeetf().
◆ ALL
◆ ALL_TYPES
◆ ANY
◆ BOOL
final TypeInt com.cliffc.aa.type.TypeInt.BOOL = make(-2, 1,0) |
|
static |
Definition at line 43 of file TypeInt.java.
Referenced by 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.node.PrimNode.EQ_OOP.EQ_OOP(), com.cliffc.aa.HM.HM4.hm(), com.cliffc.aa.HM.HM1.HM(), com.cliffc.aa.HM.HM5.hm(), com.cliffc.aa.HM.HM6.hm(), com.cliffc.aa.HM.HM7.hm(), com.cliffc.aa.HM.HM8.hm(), com.cliffc.aa.HM.HM3.hm(), com.cliffc.aa.HM.HM2.hm(), com.cliffc.aa.type.TypeInt.init1(), com.cliffc.aa.type.Type< TypeFlt >.meet_nil(), com.cliffc.aa.node.PrimNode.NE_OOP.NE_OOP(), com.cliffc.aa.node.PrimNode.Not.Not(), com.cliffc.aa.type.TypeInt.not_nil(), com.cliffc.aa.node.PrimNode.Prim2RelOpF64.Prim2RelOpF64(), com.cliffc.aa.node.PrimNode.Prim2RelOpI64.Prim2RelOpI64(), com.cliffc.aa.HM.HM9.PrimSyn.reset(), com.cliffc.aa.HM.HM.PrimSyn.reset(), com.cliffc.aa.HM.TestHM5.test19(), com.cliffc.aa.HM.TestHM4.test19(), com.cliffc.aa.HM.TestHM.test20(), com.cliffc.aa.HM.TestHM9.test20(), com.cliffc.aa.HM.TestHM.test23(), com.cliffc.aa.HM.TestHM9.test23(), com.cliffc.aa.HM.TestHM.test41(), com.cliffc.aa.HM.TestHM9.test41(), com.cliffc.aa.TestParse.testParse(), com.cliffc.aa.TestParse.testParse01(), com.cliffc.aa.TestParse.testParse02(), com.cliffc.aa.TestParse.testParse05(), com.cliffc.aa.TestParse.testParse13(), com.cliffc.aa.node.IfNode.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.PrimNode.RandI64.value(), and com.cliffc.aa.node.PrimNode.EQ_OOP.vs_nil().
◆ CNT
◆ CTRL
◆ FALSE
final Type com.cliffc.aa.type.TypeInt.FALSE = make( 0, 1,0) |
|
static |
Definition at line 45 of file TypeInt.java.
Referenced by com.cliffc.aa.node.PrimNode.Prim2RelOpF64.apply(), com.cliffc.aa.node.PrimNode.Prim2RelOpI64.apply(), 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.If.hm(), com.cliffc.aa.HM.HM.If.hm(), com.cliffc.aa.type.TypeInt.not_nil(), com.cliffc.aa.node.TestNode.testMonotonic(), com.cliffc.aa.type.TestType.testNamesInts(), com.cliffc.aa.type.TestType.testOOPsNulls(), com.cliffc.aa.TestParse.testParse00(), com.cliffc.aa.TestParse.testParse05(), com.cliffc.aa.node.IfNode.value(), com.cliffc.aa.node.PrimNode.EQ_OOP.value(), com.cliffc.aa.node.PrimNode.NE_OOP.value(), and com.cliffc.aa.node.PrimNode.RandI64.value().
◆ INT16
final TypeInt com.cliffc.aa.type.TypeInt.INT16 = make(-2,16,0) |
|
staticpackage |
◆ INT32
final TypeInt com.cliffc.aa.type.TypeInt.INT32 = make(-2,32,0) |
|
static |
◆ INT64
final TypeInt com.cliffc.aa.type.TypeInt.INT64 = make(-2,64,0) |
|
static |
Definition at line 39 of file TypeInt.java.
Referenced by com.cliffc.aa.node.NewAryNode.add_libs(), com.cliffc.aa.HM.HM.Mul.apply(), com.cliffc.aa.HM.HM9.Mul.apply(), com.cliffc.aa.HM.HM.Add.apply(), com.cliffc.aa.HM.HM9.Dec.apply(), com.cliffc.aa.HM.HM.Dec.apply(), com.cliffc.aa.type.Type< TypeFlt >.check_startup(), com.cliffc.aa.node.NewStrNode.ConvertI64Str.ConvertI64Str(), com.cliffc.aa.HM.HM4.hm(), com.cliffc.aa.HM.HM1.HM(), com.cliffc.aa.HM.HM5.hm(), com.cliffc.aa.HM.HM6.hm(), com.cliffc.aa.HM.HM7.hm(), com.cliffc.aa.HM.HM8.hm(), com.cliffc.aa.HM.HM3.hm(), com.cliffc.aa.HM.HM2.hm(), com.cliffc.aa.type.TypeInt.init1(), com.cliffc.aa.node.MemPrimNode.LValueLength.LValueLength(), com.cliffc.aa.node.FreshNode.no_tvar_structure(), com.cliffc.aa.node.PrimNode.Prim1OpI64.Prim1OpI64(), com.cliffc.aa.node.PrimNode.Prim2OpI64.Prim2OpI64(), com.cliffc.aa.node.PrimNode.RandI64.RandI64(), com.cliffc.aa.HM.HM9.PrimSyn.reset(), com.cliffc.aa.HM.HM.PrimSyn.reset(), com.cliffc.aa.type.TypeAry.str(), com.cliffc.aa.HM.TestHM.test04(), com.cliffc.aa.HM.TestHM9.test04(), com.cliffc.aa.HM.TestHM.test21(), com.cliffc.aa.HM.TestHM9.test21(), com.cliffc.aa.HM.TestHM.test22(), com.cliffc.aa.HM.TestHM9.test22(), com.cliffc.aa.HM.TestHM.test31(), com.cliffc.aa.HM.TestHM9.test31(), com.cliffc.aa.HM.TestHM.test51(), com.cliffc.aa.HM.TestHM.test52(), com.cliffc.aa.type.TestApprox.testApprox2(), com.cliffc.aa.type.TestApprox.testApprox8(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve(), com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2(), com.cliffc.aa.node.TestNodeSmall.testMemoryArgs(), com.cliffc.aa.node.TestNode.testMonotonic(), com.cliffc.aa.type.TestType.testNameCycle(), com.cliffc.aa.TestParse.testParse03(), com.cliffc.aa.TestParse.testParse07(), com.cliffc.aa.TestParse.testParse08(), com.cliffc.aa.TestParse.testParse09(), com.cliffc.aa.TestParse.testParse13(), com.cliffc.aa.type.TestType.testRecursive(), com.cliffc.aa.type.TestApprox.testTSMeet(), com.cliffc.aa.type.TestType.testType(), com.cliffc.aa.Parse.type0(), com.cliffc.aa.node.MemPrimNode.LValueLength.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.type.TypeInt.widen().
◆ INT8
final TypeInt com.cliffc.aa.type.TypeInt.INT8 = make(-2, 8,0) |
|
static |
◆ INTERN
◆ ISA_SCALAR
◆ NIL
◆ NINT64
final TypeInt com.cliffc.aa.type.TypeInt.NINT64 = make(-1,64,0) |
|
static |
◆ NINT8
final TypeInt com.cliffc.aa.type.TypeInt.NINT8 = make(-1, 8,0) |
|
static |
Definition at line 47 of file TypeInt.java.
Referenced by com.cliffc.aa.HM.TestHM.test30(), com.cliffc.aa.HM.TestHM9.test30(), com.cliffc.aa.HM.TestHM.test48(), com.cliffc.aa.HM.TestHM9.test48(), com.cliffc.aa.HM.TestHM.test49(), com.cliffc.aa.HM.TestHM9.test49(), com.cliffc.aa.HM.TestHM.test50(), com.cliffc.aa.HM.TestHM9.test50(), com.cliffc.aa.type.TestApprox.testApprox1(), com.cliffc.aa.type.TestApprox.testApprox4(), com.cliffc.aa.TestParse.testParse(), com.cliffc.aa.TestParse.testParse01(), com.cliffc.aa.TestParse.testParse09(), and com.cliffc.aa.TestParse.testParse10().
◆ NREAL
◆ NSCALR
◆ POOLS
◆ REAL
◆ RECURSIVE_MEET
◆ SCALAR
◆ SCALAR_PRIMS
◆ STRS
◆ TALL
◆ TANY
◆ TARY
◆ TCTRL
◆ TFLD
◆ TFLT
◆ TFUNPTR
◆ TFUNSIG
◆ TINT
◆ TLAST
◆ TLIVE
◆ TMEM
◆ TMEMPTR
◆ TNIL
◆ TNREAL
◆ TNSCALR
◆ TOBJ
◆ TREAL
◆ TRPC
◆ TRUE
final TypeInt com.cliffc.aa.type.TypeInt.TRUE = make( 0, 1,1) |
|
static |
Definition at line 44 of file TypeInt.java.
Referenced by com.cliffc.aa.node.PrimNode.Prim2RelOpF64.apply(), com.cliffc.aa.node.PrimNode.Prim2RelOpI64.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.HM.EQ0.apply(), com.cliffc.aa.type.TestType.testNamesInts(), com.cliffc.aa.TestParse.testParse00(), com.cliffc.aa.TestParse.testParse01(), com.cliffc.aa.TestParse.testParse03(), com.cliffc.aa.TestParse.testParse04(), com.cliffc.aa.TestParse.testParse05(), com.cliffc.aa.TestParse.testParse06(), com.cliffc.aa.TestParse.testParse09(), com.cliffc.aa.type.TestType.testStructTuple(), com.cliffc.aa.node.PrimNode.EQ_OOP.value(), com.cliffc.aa.node.PrimNode.NE_OOP.value(), and com.cliffc.aa.node.PrimNode.Not.value().
◆ TSCALAR
◆ TSIMPLE
◆ TSTR
◆ TSTRUCT
◆ TTUPLE
◆ TXCTRL
◆ TXNIL
◆ TXNREAL
◆ TXNSCALR
◆ TXREAL
◆ TXSCALAR
◆ TYPES
◆ XCTRL
◆ XINT1
final TypeInt com.cliffc.aa.type.TypeInt.XINT1 = make( 2, 1,0) |
|
static |
◆ XNIL
◆ XNREAL
◆ XNSCALR
◆ XREAL
◆ XSCALAR
◆ ZERO
The documentation for this class was generated from the following file:
static TypeInt make(int x, int z, long con)
static final TypeInt INT8
static final byte TMEMPTR
E push(E e)
Add element in amortized constant time.
RuntimeException typerr(Type t)
static boolean eq(String s0, String s1)
boolean check_commute(Type t, Type mt)
an implementation of language AA
Type xmt_name(Type t, Type mt)
static TypeInt con(long con)
static boolean check_name(String n)
static RuntimeException unimpl()
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
static final byte TFUNPTR
static final byte[] ISA_SCALAR
static Ary< Type > ALL_TYPES
static final byte TXNREAL
static final TypeInt INT64
final T set_name(String name)
static final byte TSTRUCT
static int RECURSIVE_MEET
final boolean contains(Type t)
final Type cross_nil(Type t)
static final TypeInt INT32
static final ConcurrentHashMap< Type, Type > INTERN
final String mtname(Type t, Type mt)
T init(byte type, String name)
static final byte TSCALAR
static final Type[] TYPES
static final byte TXSCALAR
Tight/tiny StringBuilder wrapper.
static final byte TSIMPLE
an implementation of language AA
Type oop_deep_impl(Type t)
static Type[] SCALAR_PRIMS
static final TypeInt INT16
static final Pool[] POOLS
static void concat(Ary< Type > ts, Type[] ts1)
static final TypeInt BOOL
static final byte TFUNSIG