aa
com.cliffc.aa.node.NewStrNode.ConStr Class Reference
Inheritance diagram for com.cliffc.aa.node.NewStrNode.ConStr:
[legend]
Collaboration diagram for com.cliffc.aa.node.NewStrNode.ConStr:
[legend]

Public Member Functions

 ConStr (String str)
 
FunPtrNode as_fun (GVNGCM gvn)
 
boolean equals (Object o)
 
int hashCode ()
 
TypeMem live_use (GVNGCM.Mode opt_mode, Node def)
 
boolean unify (boolean test)
 

Static Public Member Functions

static Ary< NewPrimNodeINTRINSICS ()
 
static void reset ()
 

Public Attributes

final String _name
 

Static Protected Member Functions

static void add_libs (Ary< NewPrimNode > INTRINSICS)
 

Package Functions

String bal_close ()
 
TypeStr dead_type ()
 
TypeStr valueobj ()
 

Static Package Functions

 [static initializer]
 

Package Attributes

final int _op_prec
 
final boolean _reads
 
final TypeFunSig _sig
 

Static Private Attributes

static final Ary< NewPrimNodeINTRINSICS
 

Detailed Description

Definition at line 32 of file NewStrNode.java.

Constructor & Destructor Documentation

◆ ConStr()

Definition at line 33 of file NewStrNode.java.

33 { super(TypeStr.con(str),"con",false,-1,Type.CTRL,TypeMem.ALLMEM,null); }

References com.cliffc.aa.type.TypeMem.ALLMEM, com.cliffc.aa.type.TypeStr.con(), and com.cliffc.aa.type.Type< T extends Type< T >.CTRL.

Referenced by com.cliffc.aa.node.NewStrNode.ConStr.equals().

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

Member Function Documentation

◆ [static initializer]()

com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >.[static initializer]
staticpackageinherited

◆ add_libs()

static void com.cliffc.aa.node.NewStrNode.add_libs ( Ary< NewPrimNode INTRINSICS)
staticprotectedinherited

Definition at line 25 of file NewStrNode.java.

25  {
26  INTRINSICS.push(new ConvertI64Str());
27  INTRINSICS.push(new ConvertF64Str());
28  INTRINSICS.push(new AddStrStr());
29  }

References com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< TypeStr >.INTRINSICS.

Referenced by com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< TypeAry >.INTRINSICS().

Here is the caller graph for this function:

◆ as_fun()

FunPtrNode com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >.as_fun ( GVNGCM  gvn)
inherited

Definition at line 198 of file NewNode.java.

198  {
199  try(GVNGCM.Build<FunPtrNode> X = gvn.new Build<>()) {
200  assert in(0)==null && _uses._len==0;
201  FunNode fun = ( FunNode) X.xform(new FunNode(this).add_def(Env.ALL_CTRL));
202  ParmNode rpc = (ParmNode) X.xform(new ParmNode(0,"rpc",fun,Env.ALL_CALL,null));
203  Node memp= X.xform(new ParmNode(MEM_IDX,_sig._args[MEM_IDX],fun, TypeMem.MEM, Env.DEFMEM,null));
204  fun._bal_close = bal_close();
205 
206  // Add input edges to the intrinsic
207  add_def(_reads ? memp : null); // Memory for the primitive in slot MEM_IDX
208  add_def(null); // Closure for the primitive in slot DSP_IDX
209  for( int i=ARG_IDX; i<_sig.nargs(); i++ ) // Args follow
210  add_def( X.xform(new ParmNode(i,_sig._args[i],fun, (ConNode)Node.con(_sig.arg(i).simple_ptr()),null)));
211  NewNode nnn = (NewNode)X.xform(this);
212  Node mem = Env.DEFMEM.make_mem_proj(nnn,memp);
213  Node ptr = X.xform(new ProjNode(nnn,REZ_IDX));
214  RetNode ret = (RetNode)X.xform(new RetNode(fun,mem,ptr,rpc,fun));
215  return (X._ret = new FunPtrNode(_name,ret));
216  }
217  }

◆ bal_close()

String com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >.bal_close ( )
packageinherited

Definition at line 184 of file NewNode.java.

184 { return null; }

◆ dead_type()

TypeStr com.cliffc.aa.node.NewStrNode.dead_type ( )
packageinherited

Definition at line 24 of file NewStrNode.java.

24 { return TypeStr.XSTR; }

References com.cliffc.aa.type.TypeStr.XSTR.

◆ equals()

boolean com.cliffc.aa.node.NewStrNode.ConStr.equals ( Object  o)

Definition at line 38 of file NewStrNode.java.

38 { return o instanceof ConStr && _ts==((ConStr)o)._ts; }

References com.cliffc.aa.node.NewStrNode.ConStr.ConStr().

Here is the call graph for this function:

◆ hashCode()

int com.cliffc.aa.node.NewStrNode.ConStr.hashCode ( )

Definition at line 37 of file NewStrNode.java.

37 { return is_unused() ? super.hashCode() : _ts._hash; }

◆ INTRINSICS()

static Ary<NewPrimNode> com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >.INTRINSICS ( )
staticinherited

Definition at line 189 of file NewNode.java.

189  {
190  if( INTRINSICS.isEmpty() ) {
191  NewAryNode.add_libs(INTRINSICS);
192  NewStrNode.add_libs(INTRINSICS);
193  }
194  return INTRINSICS;
195  }

◆ live_use()

TypeMem com.cliffc.aa.node.NewStrNode.ConStr.live_use ( GVNGCM.Mode  opt_mode,
Node  def 
)

Definition at line 35 of file NewStrNode.java.

35 { throw com.cliffc.aa.AA.unimpl(); } // No inputs

References com.cliffc.aa.AA.unimpl().

Here is the call graph for this function:

◆ reset()

static void com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >.reset ( )
staticinherited

Definition at line 188 of file NewNode.java.

188 { INTRINSICS.clear(); }

◆ unify()

boolean com.cliffc.aa.node.NewStrNode.unify ( boolean  test)
inherited

Definition at line 15 of file NewStrNode.java.

15  {
16  // Self should always should be a TObj
17  TV2 tvar = tvar();
18  if( tvar.is_dead() ) return false;
19  assert tvar.isa("Obj");
20  // TODO: Structural unification on all fields
21  return false;
22  }

References com.cliffc.aa.tvar.TV2.is_dead(), and com.cliffc.aa.tvar.TV2.isa().

Here is the call graph for this function:

◆ valueobj()

TypeStr com.cliffc.aa.node.NewStrNode.ConStr.valueobj ( )
package

Definition at line 34 of file NewStrNode.java.

34 { return _ts; }

Member Data Documentation

◆ _name

final String com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >._name
inherited

Definition at line 171 of file NewNode.java.

◆ _op_prec

final int com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >._op_prec
packageinherited

Definition at line 174 of file NewNode.java.

◆ _reads

final boolean com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >._reads
packageinherited

Definition at line 173 of file NewNode.java.

◆ _sig

final TypeFunSig com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >._sig
packageinherited

Definition at line 172 of file NewNode.java.

◆ INTRINSICS

final Ary<NewPrimNode> com.cliffc.aa.node.NewNode< T extends TypeObj< T >.NewPrimNode< T extends TypeObj< T >.INTRINSICS
staticprivateinherited

Definition at line 186 of file NewNode.java.


The documentation for this class was generated from the following file:
com.cliffc.aa.type.TypeMem
Memory type; the state of all of memory; memory edges order memory ops.
Definition: TypeMem.java:53
com.cliffc
com.cliffc.aa.Env.ALL_CALL
static ConNode ALL_CALL
Definition: Env.java:26
com.cliffc.aa.type.Type
an implementation of language AA
Definition: Type.java:94
com.cliffc.aa.type.TypeMem.ALLMEM
static final TypeMem ALLMEM
Definition: TypeMem.java:228
com.cliffc.aa.node.Node.add_def
Node add_def(Node n)
Definition: Node.java:152
com.cliffc.aa.node.NewNode.NewPrimNode< TypeStr >::bal_close
String bal_close()
Definition: NewNode.java:184
com.cliffc.aa.AA.unimpl
static RuntimeException unimpl()
Definition: AA.java:10
com.cliffc.aa.type.TypeFunSig._args
String[] _args
Definition: TypeFunSig.java:14
com.cliffc.aa.type.TypeFunSig.arg
Type arg(int idx)
Definition: TypeFunSig.java:88
com.cliffc.aa.type.TypeFunSig.nargs
int nargs()
Definition: TypeFunSig.java:87
com.cliffc.aa.node.NewStrNode.ConStr.ConStr
ConStr(String str)
Definition: NewStrNode.java:33
com.cliffc.aa.node.NewNode.NewPrimNode< TypeStr >::INTRINSICS
static final Ary< NewPrimNode > INTRINSICS
Definition: NewNode.java:186
com.cliffc.aa.type.Type.CTRL
static final Type CTRL
Definition: Type.java:326
com.cliffc.aa.type.TypeStr.XSTR
static final TypeStr XSTR
Definition: TypeStr.java:46
com.cliffc.aa.node.NewNode.NewPrimNode< TypeStr >::_name
final String _name
Definition: NewNode.java:171
com.cliffc.aa.type.TypeStr.con
static TypeStr con(String con)
Definition: TypeStr.java:42
com.cliffc.aa.node.NewNode.NewPrimNode< TypeStr >::_sig
final TypeFunSig _sig
Definition: NewNode.java:172
com.cliffc.aa.type.Type.simple_ptr
Type simple_ptr()
Definition: Type.java:358
com.cliffc.aa.type.TypeStr
Definition: TypeStr.java:14
com.cliffc.aa.AA
an implementation of language AA
Definition: AA.java:9
com.cliffc.aa
Definition: AA.java:1
com.cliffc.aa.node.FunNode._bal_close
String _bal_close
Definition: FunNode.java:60
com.cliffc.aa.node.NewNode.NewPrimNode< TypeStr >::_reads
final boolean _reads
Definition: NewNode.java:173
com.cliffc.aa.node.FunNode
Definition: FunNode.java:58
com
com.cliffc.aa.type.TypeMem.MEM
static final TypeMem MEM
Definition: TypeMem.java:224
com.cliffc.aa.Env.DEFMEM
static DefMemNode DEFMEM
Definition: Env.java:19
com.cliffc.aa.Env
Definition: Env.java:12
com.cliffc.aa.Env.ALL_CTRL
static ConNode ALL_CTRL
Definition: Env.java:20