Go to the documentation of this file. 1 package com.cliffc.aa.type;
20 assert args.length>=formals.
len();
21 assert (args[CTL_IDX]==
null ||
Util.
eq(args[CTL_IDX],
" ctl")) && (formals.
at(CTL_IDX)==
Type.
CTRL || formals.
at(CTL_IDX)==
Type.
XCTRL);
22 assert (args[MEM_IDX]==
null ||
Util.
eq(args[MEM_IDX],
" mem")) && (formals.
at(MEM_IDX) instanceof
TypeMem || formals.
at(MEM_IDX)==
Type.
ALL || formals.
at(MEM_IDX)==
Type.
ANY);
24 assert ret.
len()==3 && ret.
at(MEM_IDX) instanceof
TypeMem;
34 return hash==0 ? 3 : hash;
37 @Override
public boolean equals( Object o ) {
38 if(
this==o )
return true;
43 for(
int i=0; i<
_args.length; i++ )
51 if( debug ) sb.
p(
'_').
p(
_uid);
54 boolean field_sep=
false;
55 for(
int i=0; i<
nargs(); i++ ) {
56 if( !debug && i==CTL_IDX &&
Util.
eq(
_args[CTL_IDX],
" ctl") )
continue;
57 if( !debug && i==MEM_IDX &&
Util.
eq(
_args[MEM_IDX],
" mem") )
continue;
58 if( !debug && i==DSP_IDX &&
Util.
eq(
_args[DSP_IDX],
"^" ) )
continue;
61 arg(i).
str(sb.
p(
':'),dups,mem,debug);
62 sb.
p(
" "); field_sep=
true;
64 if( field_sep ) sb.
unchar();
82 public static final String[]
func_names =
new String[]{
" ctl",
" mem",
"^" ,
"arg3",
"arg4",
"arg5" };
117 @Override
public boolean is_con() {
return false; }
118 @Override
public boolean must_nil() {
return false; }
119 @Override
public boolean may_nil() {
return false; }
static final byte TMEMPTR
static TypeTuple make_args(Type[] ts)
TypeTuple make_from_arg(int idx, Type arg)
RuntimeException typerr(Type t)
Memory type; the state of all of memory; memory edges order memory ops.
static TypeTuple make_ret(Type trez)
static boolean eq(String s0, String s1)
boolean cycle_equals(Type o)
TypeFunSig init(String[] args, TypeTuple formals, TypeTuple ret)
an implementation of language AA
static TypeFunSig make(String[] args, TypeTuple formals, TypeTuple ret)
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
static final String[] func_names
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
static final byte TFUNPTR
SB str(SB sb, VBitSet dups, TypeMem mem, boolean debug)
static Type[] ts(Type t0)
static final TypeInt INT64
static final byte TSTRUCT
static TypeFunSig make(TypeTuple ret, TypeMemPtr disp, Type arg1)
TypeFunSig make_from_arg(int idx, Type arg)
Tight/tiny StringBuilder wrapper.
an implementation of language AA
static TypeFunSig make(TypeTuple ret, Type[] ts)
static final TypeTuple INT64_INT64
static final TypeFunSig[] TYPES
static final Pool[] POOLS
static TypeFunSig make(TypeTuple ret, TypeTuple formals)
static TypeFunSig make(TypeTuple ret, TypeMemPtr disp, Type arg1, Type arg2)
static final TypeFunSig II_I
static final byte TFUNSIG