aa
|
Public Member Functions | |
void | testCallNodeResolve () |
Validate monotonicity of CallNode.resolve(). More... | |
void | testCallNodeResolve2 () |
void | testMemoryArgs () |
void | testRecursiveDisplay () |
void | testUnresolvedAdd () |
Static Package Functions | |
static void | perror (String msg, Type t1, Type t2) |
Private Member Functions | |
Type[] | _testMonotonicChain (Node[] ins, Node n, TypeTuple[] argss) |
Static Private Member Functions | |
static Type[] | check (GVNGCM gvn, TypeFunSig tsig, TypeMem tmem, Type targ1, Type targ2) |
static TypeMem | tmem (int[] as, TypeObj... ts) |
static TypeFunPtr | v (Node n, GVNGCM gvn) |
Static Private Attributes | |
static int | ERR =0 |
Definition at line 17 of file TestNodeSmall.java.
|
private |
Definition at line 158 of file TestNodeSmall.java.
References com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.type.TypeTuple._ts, com.cliffc.aa.type.TypeTuple.at(), com.cliffc.aa.type.TypeFunPtr.fidxs(), com.cliffc.aa.Env.GVN, com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.CallNode.ttfp(), and com.cliffc.aa.node.Node.value().
Referenced by com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve().
|
staticprivate |
Definition at line 681 of file TestNodeSmall.java.
References com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.node.FunNode.formal(), com.cliffc.aa.GVNGCM.init(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.TestNodeSmall.perror(), com.cliffc.aa.type.Type< T extends Type< T >.sharptr(), com.cliffc.aa.type.Type< T extends Type< T >.simple_ptr(), com.cliffc.aa.node.TestNodeSmall.tmem(), com.cliffc.aa.node.Node.unkeep(), com.cliffc.aa.node.ParmNode.value(), com.cliffc.aa.GVNGCM.xform(), and com.cliffc.aa.node.Node.xval().
Referenced by com.cliffc.aa.node.TestNodeSmall.testMemoryArgs().
Definition at line 719 of file TestNodeSmall.java.
References com.cliffc.aa.node.TestNodeSmall.ERR.
Referenced by com.cliffc.aa.node.TestNodeSmall.check(), and com.cliffc.aa.node.TestNodeSmall.testMemoryArgs().
void com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve | ( | ) |
Validate monotonicity of CallNode.resolve().
There are only a couple of interesting variants; this test also tests e.g. XCTRL for correctness but its implementation is a simple cutout, same for the display arg "^" being NO_DISP.
=== High mul fptr (e.g. GCP) === arg1 arg2 fptr* resolve ~S ~S [~int+flt] [~int+flt] Choices all around 2 ~S [~int+flt] [~int+flt] Choices all around; arg2 can fall to e.g. 3 or 3.14 2 3 [~int+flt] [~int+flt] Valid to cutout flt or allow (least_cost will resolve) 2 I [~int+flt] [ int ] Only int 2 F [~int+flt] [ flt] Only flt 2 S [~int+flt] [ int,flt] Error state, but arg2 may lift S S [~int+flt] [ int,flt] Error state, but args may lift ~S S [~int+flt] [ int,flt] Error state in GCP, args may lift in ITER ~S str [~int+flt] [ int,flt] Error state - sideways 2 str [~int+flt] [ int,flt] Error state - sideways
=== High add fptr (e.g. GCP) === arg1 arg2 fptr+ resolve ~S ~S [~int+flt+str] [~int+flt+str] Choices all around 2 ~S [~int+flt+str] [~int+XXX ] Cutout str, but int,flt OK 2 3 [~int+flt+str] [~int+XXX ] Valid to cutout flt or allow (least_cost will resolve by lowering) 2 S [~int+flt+str] [ int,flt ] Error state, but arg2 may lift S S [~int+flt+str] [ int,flt,str] Error state, but args may lift 2 str [~int+flt+str] [ int,flt,str] Error state, none of {int,flt,str} work ~S str [~int+flt+str] [ ~str] Choice, since may yet be error str str [~int+flt+str] [ ~str] Choice, since may yet be error
=== Low fptr (GCP, but also ITER depending on implementation choices ) === arg1 arg2 fptr resolve X X [ int,flt] [ SAME ] Same as high fptr 2 ~S [~int+flt] [~int+flt] Error args 2 3 [ int,flt] [ int,XXX] Low, not high, for all good args
Definition at line 248 of file TestNodeSmall.java.
References com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.TestNodeSmall._testMonotonicChain(), com.cliffc.aa.type.TypeMemPtr.ABCPTR, com.cliffc.aa.type.TypeInt.con(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.type.Type< T extends Type< T >.dual(), com.cliffc.aa.type.BitsFun.EMPTY, com.cliffc.aa.type.TypeFlt.FLT64, com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.in(), com.cliffc.aa.GVNGCM.init(), com.cliffc.aa.type.TypeInt.INT64, com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.node.Node.kill(), com.cliffc.aa.Env.lookup(), com.cliffc.aa.type.TypeFunPtr.make(), com.cliffc.aa.type.TypeTuple.make(), com.cliffc.aa.type.TypeMem.MEM, com.cliffc.aa.type.TypeMemPtr.NO_DISP, com.cliffc.aa.GVNGCM.Mode.Opto, com.cliffc.aa.GVNGCM.Mode.Parse, com.cliffc.aa.GVNGCM.Mode.PesiNoCG, com.cliffc.aa.type.Type< T extends Type< T >.SCALAR, com.cliffc.aa.node.CallNode.set_fdx(), com.cliffc.aa.type.TypeMemPtr.simple_ptr(), com.cliffc.aa.Env.top_scope(), com.cliffc.aa.node.Node.unelock(), com.cliffc.aa.node.TestNodeSmall.v(), com.cliffc.aa.type.Type< T extends Type< T >.XCTRL, com.cliffc.aa.GVNGCM.xform(), com.cliffc.aa.type.Type< T extends Type< T >.XNIL, and com.cliffc.aa.type.Type< T extends Type< T >.XSCALAR.
void com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve2 | ( | ) |
Definition at line 401 of file TestNodeSmall.java.
References com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.TypeMemPtr.ABCPTR, com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.type.Type< T extends Type< T >.dual(), com.cliffc.aa.type.TypeFlt.FLT64, com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.in(), com.cliffc.aa.GVNGCM.init(), com.cliffc.aa.type.TypeInt.INT32, com.cliffc.aa.type.TypeInt.INT64, com.cliffc.aa.Env.lookup(), com.cliffc.aa.type.TypeTuple.make(), com.cliffc.aa.type.Type< T extends Type< T >.meet(), com.cliffc.aa.type.TypeMem.MEM, com.cliffc.aa.type.TypeMemPtr.NO_DISP, com.cliffc.aa.GVNGCM.Mode.Parse, com.cliffc.aa.type.Type< T extends Type< T >.SCALAR, com.cliffc.aa.type.TypeMemPtr.simple_ptr(), com.cliffc.aa.type.TypeMemPtr.STRUCT, com.cliffc.aa.Env.top_scope(), com.cliffc.aa.node.CallNode.value(), and com.cliffc.aa.GVNGCM.xform().
void com.cliffc.aa.node.TestNodeSmall.testMemoryArgs | ( | ) |
Definition at line 590 of file TestNodeSmall.java.
References com.cliffc.aa.type.TypeMemPtr.ABCPTR, com.cliffc.aa.node.TestNodeSmall.check(), com.cliffc.aa.type.Type< T extends Type< T >.dual(), com.cliffc.aa.node.TestNodeSmall.ERR, com.cliffc.aa.type.TypeFlt.FLT64, com.cliffc.aa.Env.GVN, com.cliffc.aa.type.TypeInt.INT64, com.cliffc.aa.type.TypeFld.make(), com.cliffc.aa.type.TypeMemPtr.make(), com.cliffc.aa.type.TypeFunSig.make(), com.cliffc.aa.type.TypeStruct.make(), com.cliffc.aa.type.TypeTuple.make_args(), com.cliffc.aa.type.BitsAlias.new_alias(), com.cliffc.aa.type.Type< T extends Type< T >.NIL, com.cliffc.aa.type.TypeInt.NINT64, com.cliffc.aa.type.TypeFld.NO_DISP, com.cliffc.aa.type.TypeObj< O extends TypeObj< O >.OBJ, com.cliffc.aa.node.TestNodeSmall.perror(), com.cliffc.aa.type.BitsAlias.REC, com.cliffc.aa.type.TypeTuple.RET, com.cliffc.aa.type.TypeMemPtr.simple_ptr(), com.cliffc.aa.type.TypeStr.STR, com.cliffc.aa.node.TestNodeSmall.tmem(), com.cliffc.aa.Env.top_scope(), and com.cliffc.aa.type.Type< T extends Type< T >.XNIL.
void com.cliffc.aa.node.TestNodeSmall.testRecursiveDisplay | ( | ) |
Definition at line 487 of file TestNodeSmall.java.
References com.cliffc.aa.node.NewNode< T extends TypeObj< T >._alias, com.cliffc.aa.type.TypeFunPtr._disp, com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node._val, com.cliffc.aa.node.Node.add_def(), com.cliffc.aa.type.TypeRPC.ALL_CALL, com.cliffc.aa.Env.ALL_DISPLAYS, com.cliffc.aa.type.TypeMem.ANYMEM, com.cliffc.aa.node.Node.con(), com.cliffc.aa.node.NewObjNode.create(), com.cliffc.aa.type.Type< T extends Type< T >.CTRL, com.cliffc.aa.Env.DEFMEM, com.cliffc.aa.type.TypeMemPtr.DISP_SIMPLE, com.cliffc.aa.type.TypeMemPtr.DISPLAY, com.cliffc.aa.type.TypeFld.Access.Final, com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.Env.GVN, com.cliffc.aa.GVNGCM.init(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.type.TypeMem.ld(), com.cliffc.aa.type.TypeFunSig.make(), com.cliffc.aa.type.TypeTuple.make_args(), com.cliffc.aa.type.TypeMem.MEM, com.cliffc.aa.node.NewObjNode.no_more_fields(), com.cliffc.aa.GVNGCM.Mode.Opto, com.cliffc.aa.GVNGCM.Mode.Parse, com.cliffc.aa.GVNGCM.Mode.PesiNoCG, com.cliffc.aa.type.TypeTuple.RET, com.cliffc.aa.type.Type< T extends Type< T >.SCALAR, com.cliffc.aa.type.Bits< B extends Bits< B >.set(), com.cliffc.aa.node.ScopeNode.set_ctrl(), com.cliffc.aa.node.ScopeNode.set_mem(), com.cliffc.aa.node.ScopeNode.set_ptr(), com.cliffc.aa.node.ScopeNode.set_rez(), com.cliffc.aa.node.TestNodeSmall.tmem(), com.cliffc.aa.Env.top_scope(), com.cliffc.aa.type.Types.ts(), and com.cliffc.aa.GVNGCM.xform().
void com.cliffc.aa.node.TestNodeSmall.testUnresolvedAdd | ( | ) |
Definition at line 20 of file TestNodeSmall.java.
References com.cliffc.aa.GVNGCM._opt_mode, com.cliffc.aa.node.Node._val, com.cliffc.aa.type.Type< T extends Type< T >.ANY, com.cliffc.aa.type.Type< T extends Type< T >.dual(), com.cliffc.aa.Env.GVN, com.cliffc.aa.node.Node.in(), com.cliffc.aa.type.Type< T extends Type< T >.isa(), com.cliffc.aa.Env.lookup(), com.cliffc.aa.GVNGCM.Mode.Opto, com.cliffc.aa.GVNGCM.Mode.Parse, com.cliffc.aa.GVNGCM.Mode.PesiNoCG, com.cliffc.aa.Env.top_scope(), com.cliffc.aa.node.UnresolvedNode.value(), com.cliffc.aa.node.FunPtrNode.value(), and com.cliffc.aa.GVNGCM.xform().
|
staticprivate |
Definition at line 727 of file TestNodeSmall.java.
References com.cliffc.aa.type.BitsAlias.AARY, com.cliffc.aa.type.BitsAlias.ABC, com.cliffc.aa.type.TypeStr.ABC, com.cliffc.aa.type.BitsAlias.ALL, com.cliffc.aa.type.TypeStruct.ALLSTRUCT, com.cliffc.aa.type.TypeAry.ARY, com.cliffc.aa.type.TypeMem.make0(), com.cliffc.aa.type.TypeObj< O extends TypeObj< O >.OBJ, com.cliffc.aa.type.BitsAlias.REC, com.cliffc.aa.type.BitsAlias.STR, and com.cliffc.aa.type.TypeStr.STR.
Referenced by com.cliffc.aa.node.TestNodeSmall.check(), com.cliffc.aa.node.TestNodeSmall.testMemoryArgs(), and com.cliffc.aa.node.TestNodeSmall.testRecursiveDisplay().
|
staticprivate |
Definition at line 209 of file TestNodeSmall.java.
References com.cliffc.aa.GVNGCM._opt_mode, and com.cliffc.aa.node.Node.value().
Referenced by com.cliffc.aa.node.TestNodeSmall.testCallNodeResolve().
|
staticprivate |
Definition at line 589 of file TestNodeSmall.java.
Referenced by com.cliffc.aa.node.TestNodeSmall.perror(), and com.cliffc.aa.node.TestNodeSmall.testMemoryArgs().