19 @FB_RTL_NULLPTRCHK, NULL, _
20 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_FBCALL, _
21 NULL, FB_RTL_OPT_NONE, _
24 ( typeAddrOf( FB_DATATYPE_VOID ),FB_PARAMMODE_BYVAL, FALSE ), _
25 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
26 ( typeAddrOf( FB_DATATYPE_CHAR ),FB_PARAMMODE_BYVAL, FALSE ) _
36 @FB_RTL_MEMCOPY, @
"memcpy", _
37 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_CDECL, _
38 NULL, FB_RTL_OPT_GCCBUILTIN, _
41 ( FB_DATATYPE_VOID,FB_PARAMMODE_BYREF, FALSE ), _
42 ( FB_DATATYPE_VOID,FB_PARAMMODE_BYREF, FALSE ), _
43 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ) _
48 @FB_RTL_MEMSWAP, NULL, _
49 FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
50 NULL, FB_RTL_OPT_NONE, _
53 ( FB_DATATYPE_VOID,FB_PARAMMODE_BYREF, FALSE ), _
54 ( FB_DATATYPE_VOID,FB_PARAMMODE_BYREF, FALSE ), _
55 ( FB_DATATYPE_INTEGER,FB_PARAMMODE_BYVAL, FALSE ) _
66 @FB_RTL_MEMCOPYCLEAR, NULL, _
67 FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
68 NULL, FB_RTL_OPT_NONE, _
71 ( FB_DATATYPE_VOID,FB_PARAMMODE_BYREF, FALSE ), _
72 ( FB_DATATYPE_INTEGER,FB_PARAMMODE_BYVAL, FALSE ), _
73 ( FB_DATATYPE_VOID,FB_PARAMMODE_BYREF, FALSE ), _
74 ( FB_DATATYPE_INTEGER,FB_PARAMMODE_BYVAL, FALSE ) _
79 @
"fre", @
"fb_GetMemAvail", _
80 FB_DATATYPE_UINT, FB_FUNCMODE_FBCALL, _
81 NULL, FB_RTL_OPT_NONE, _
84 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ) _
89 @
"allocate", @
"malloc", _
90 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_CDECL, _
91 NULL, FB_RTL_OPT_NOQB, _
94 ( FB_DATATYPE_UINT,FB_PARAMMODE_BYVAL, FALSE ) _
99 @
"callocate", @
"calloc", _
100 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_CDECL, _
101 NULL, FB_RTL_OPT_NOQB, _
104 ( FB_DATATYPE_UINT,FB_PARAMMODE_BYVAL, FALSE ), _
105 ( FB_DATATYPE_UINT,FB_PARAMMODE_BYVAL, TRUE, 1 ) _
110 @
"reallocate", @
"realloc", _
111 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_CDECL, _
112 NULL, FB_RTL_OPT_NOQB, _
115 ( typeAddrOf( FB_DATATYPE_VOID ),FB_PARAMMODE_BYVAL, FALSE ), _
116 ( FB_DATATYPE_UINT,FB_PARAMMODE_BYVAL, FALSE ) _
121 @
"deallocate", @
"free", _
122 FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
123 NULL, FB_RTL_OPT_NOQB, _
126 ( typeAddrOf( FB_DATATYPE_VOID ),FB_PARAMMODE_BYVAL, FALSE ) _
136 @
"clear", @
"memset", _
137 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_CDECL, _
138 NULL, FB_RTL_OPT_GCCBUILTIN, _
141 ( FB_DATATYPE_VOID,FB_PARAMMODE_BYREF, FALSE ), _
142 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, TRUE, 0 ), _
143 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ) _
148 cast(
zstring ptr, AST_OP_NEW ), NULL, _
149 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_CDECL, _
150 NULL, FB_RTL_OPT_OVER
or FB_RTL_OPT_OPERATOR, _
153 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ) _
158 cast(
zstring ptr, AST_OP_NEW_VEC ), NULL, _
159 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_CDECL, _
160 NULL, FB_RTL_OPT_OVER
or FB_RTL_OPT_OPERATOR, _
163 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ) _
168 cast(
zstring ptr, AST_OP_DEL ), NULL, _
169 FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
170 NULL, FB_RTL_OPT_OVER
or FB_RTL_OPT_OPERATOR, _
173 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
178 cast(
zstring ptr, AST_OP_DEL_VEC ), NULL, _
179 FB_DATATYPE_VOID, FB_FUNCMODE_CDECL, _
180 NULL, FB_RTL_OPT_OVER
or FB_RTL_OPT_OPERATOR, _
183 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
193 dim as FBSYMBOL
ptr sym =
any
196 sym = symbGetProcHeadParam( sym )
198 symbGetFullType( sym ) =
iif( fbCpuTypeIs64bit( ), _
199 env.target.size_t64, _
200 env.target.size_t32 )
232 byval p as ASTNODE
ptr, _
233 byval linenum
as integer, _
234 byval module
as zstring ptr _
237 dim as ASTNODE
ptr proc =
any
245 astNewCONV( typeAddrOf( FB_DATATYPE_VOID ), NULL,
p ), _
246 typeAddrOf( FB_DATATYPE_VOID ) ) = NULL )
then
267 byval dst
as ASTNODE
ptr, _
268 byval src
as ASTNODE
ptr, _
269 byval bytes
as longint _
272 dim as ASTNODE
ptr proc =
any
302 byval dst
as ASTNODE
ptr, _
303 byval src
as ASTNODE
ptr _
308 dim as ASTNODE
ptr proc =
astNewCALL( PROCLOOKUP( MEMSWAP ) )
336 byval dstexpr
as ASTNODE
ptr, _
337 byval dstlen
as longint, _
338 byval srcexpr
as ASTNODE
ptr, _
339 byval srclen
as longint _
342 dim as ASTNODE
ptr proc =
any
347 proc =
astNewCALL( PROCLOOKUP( MEMCOPYCLEAR ) )
350 if(
astNewARG( proc, dstexpr ) = NULL )
then
360 if(
astNewARG( proc, srcexpr ) = NULL )
then
378 byval op as integer, _
379 byval len_expr
as ASTNODE
ptr, _
380 byval dtype
as integer, _
381 byval subtype
as FBSYMBOL
ptr _
384 dim as ASTNODE
ptr proc =
any
385 dim as FBSYMBOL
ptr sym =
any
388 if( typeGet( dtype ) = FB_DATATYPE_STRUCT )
then
389 assert( (astGetOpSelfVer(
op ) = AST_OP_NEW_SELF)
or (astGetOpSelfVer(
op ) = AST_OP_NEW_VEC_SELF) )
393 errReport( FB_ERRMSG_ILLEGALMEMBERACCESS )
401 if( sym = NULL )
then
402 assert( (
op = AST_OP_NEW)
or (
op = AST_OP_NEW_VEC) )
409 if(
astNewARG( proc, len_expr ) = NULL )
then
418 byval op as integer, _
419 byval ptr_expr
as ASTNODE
ptr, _
420 byval dtype
as integer, _
421 byval subtype
as FBSYMBOL
ptr _
424 dim as ASTNODE
ptr proc =
any
425 dim as FBSYMBOL
ptr sym =
any
428 if( typeGet( dtype ) = FB_DATATYPE_STRUCT )
then
429 assert( (astGetOpSelfVer(
op ) = AST_OP_DEL_SELF)
or (astGetOpSelfVer(
op ) = AST_OP_DEL_VEC_SELF) )
433 errReport( FB_ERRMSG_ILLEGALMEMBERACCESS )
441 if( sym = NULL )
then
442 assert( (
op = AST_OP_DEL)
or (
op = AST_OP_DEL_VEC) )
449 if(
astNewARG( proc, ptr_expr ) = NULL )
then