15 byval var_
as ASTNODE
ptr, _
16 byval idx as ASTNODE
ptr, _
17 byval dtype
as integer, _
18 byval subtype
as FBSYMBOL
ptr _
21 dim as ASTNODE
ptr n =
any
23 if( dtype = FB_DATATYPE_INVALID )
then
24 dtype = astGetFullType( var_ )
25 subtype = astGetSubType( var_ )
29 n =
astNewNode( AST_NODECLASS_IDX, dtype, subtype )
41 function astLoadIDX(
byval n
as ASTNODE
ptr )
as IRVREG
ptr
42 dim as ASTNODE
ptr var_ =
any,
idx =
any
43 dim as IRVREG
ptr vidx =
any, vr =
any
44 dim as FBSYMBOL
ptr s =
any
45 dim as longint ofs =
any
48 if( var_ = NULL )
then
53 if(
idx <> NULL )
then
63 symbSetIsAccessed( s )
66 if( symbGetIsDynamic( s ) = FALSE )
then
67 ofs += symbGetArrayDiff( s ) + symbGetOfs( s ) + var_->var_.ofs
72 if( vidx <> NULL )
then
74 if( irIsREG( vidx ) = FALSE )
then
78 vr = irAllocVRIDX( astGetDataType( n ), n->subtype, s, ofs, n->
idx.mult, vidx )
80 vr = irAllocVRVAR( astGetDataType( n ), n->subtype, s, ofs )
83 vr->vector = n->vector