13 byval l as ASTNODE
ptr, _
14 byval dtype
as integer, _
15 byval subtype
as FBSYMBOL
ptr, _
16 byval ofs
as longint _
19 dim as ASTNODE
ptr n =
any
22 if( dtype = FB_DATATYPE_INVALID )
then
23 dtype = typeDeref( astGetFullType(
l ) )
24 subtype = astGetSubType(
l )
29 dim as ASTNODE
ptr t =
l
30 if(
l->
class = AST_NODECLASS_CONV )
then
31 if(
l->
cast.doconv = FALSE )
then
37 dim as integer delchild =
any
39 case AST_NODECLASS_ADDROF
42 case AST_NODECLASS_OFFSET
43 delchild = (t->ofs.ofs = 0)
62 if( astIsCONST(
l ) )
then
69 n =
astNewNode( AST_NODECLASS_DEREF, dtype, subtype )
78 dim as ASTNODE
ptr l =
any
79 dim as IRVREG
ptr v1 =
any, vp =
any, vr =
any
85 vr = irAllocVRPTR( astGetDataType( n ), n->subtype, n->
ptr.ofs, NULL )
86 vr->vector = n->vector
96 if( (irIsREG( v1 ) = FALSE)
or _
97 (typeGetClass(v1->dtype) <> FB_DATACLASS_INTEGER)
or _
98 (typeGetSize(v1->dtype) <> env.pointersize) )
then
100 vp = irAllocVREG( typeAddrOf( astGetDataType( n ) ), n->subtype )
101 irEmitADDR( AST_OP_DEREF, v1, vp )
106 vr = irAllocVRPTR( astGetDataType( n ), n->subtype, n->
ptr.ofs, vp )
107 vr->vector = n->vector