9 byval sym
as FBSYMBOL
ptr, _
10 byval ofs
as longint, _
11 byval dtype
as integer, _
12 byval subtype
as FBSYMBOL
ptr _
15 dim as ASTNODE
ptr n =
any
17 if( dtype = FB_DATATYPE_INVALID )
then
18 select case( symbGetClass( sym ) )
19 case FB_SYMBCLASS_LABEL
20 dtype = FB_DATATYPE_VOID
22 case FB_SYMBCLASS_PROC
23 dtype = FB_DATATYPE_FUNCTION
24 if( symbGetIsFuncPtr( sym ) )
then
30 dtype = symbGetFullType( sym )
31 subtype = symbGetSubtype( sym )
36 n =
astNewNode( AST_NODECLASS_VAR, dtype, subtype )
39 if( symbIsVar( sym )
and symbIsTemp( sym ) )
then
50 function astLoadVAR(
byval n
as ASTNODE
ptr )
as IRVREG
ptr
51 dim as FBSYMBOL
ptr s =
any
52 dim as longint ofs =
any
53 dim as IRVREG
ptr vr = NULL
58 symbSetIsAccessed( s )
59 ofs += symbGetOfs( s )
63 vr = irAllocVRVAR( astGetDataType( n ), n->subtype, s, ofs )
64 vr->vector = n->vector