19 byval l as ASTNODE
ptr, _
20 byval lb
as ASTNODE
ptr, _
21 byval ub
as ASTNODE
ptr, _
22 byval linenum
as integer, _
26 dim as ASTNODE
ptr n =
any
30 assert( astIsCONST( lb ) = astIsCONST( ub ) )
33 if( astIsCONST( lb ) )
then
35 if( astIsCONST(
l ) )
then
37 if( astConstGetInt(
l ) < astConstGetInt( lb ) )
then
41 if( astConstGetInt(
l ) > astConstGetInt( ub ) )
then
51 if( astConstGetInt( lb ) = 0 )
then
58 n =
astNewNode( AST_NODECLASS_BOUNDCHK,
l->dtype,
l->subtype )
75 byval n
as ASTNODE
ptr _
78 dim as ASTNODE
ptr l =
any, r =
any, t =
any
79 dim as FBSYMBOL
ptr label =
any
80 dim as IRVREG
ptr vr =
any
85 if( (
l = NULL)
or (r = NULL) )
then
101 irEmitBOP( AST_OP_EQ, _
103 irAllocVRIMM( FB_DATATYPE_INTEGER, NULL, 0 ), _
107 irEmitLABELNF( label )
120 byval expr
as ASTNODE
ptr, _
121 byval lb
as ASTNODE
ptr, _
122 byval ub
as ASTNODE
ptr _
124 function =
astNewBOUNDCHK( expr, lb, ub, lexLineNum( ), env.inf.
name )
133 byval l as ASTNODE
ptr, _
134 byval linenum
as integer, _
138 dim as ASTNODE
ptr n =
any
139 dim as integer dtype =
any
140 dim as FBSYMBOL
ptr subtype =
any
143 if(
l->
class = AST_NODECLASS_CONST )
then
148 dtype = astGetFullType(
l )
150 n =
astNewNode( AST_NODECLASS_PTRCHK, dtype, subtype )
165 byval n
as ASTNODE
ptr _
168 dim as ASTNODE
ptr l =
any, r =
any, t =
any
169 dim as FBSYMBOL
ptr label =
any
170 dim as IRVREG
ptr vr =
any
175 if( (
l = NULL)
or (r = NULL) )
then
189 if( ast.doemit )
then
192 irEmitBOP( AST_OP_EQ, _
194 irAllocVRIMM( FB_DATATYPE_INTEGER, NULL, 0 ), _
198 irEmitLABELNF( label )
209 function =
astNewPTRCHK( expr, lexLineNum( ), env.inf.
name )