| 217 | } |
| 218 | |
| 219 | void Register_BooleanFuncs() { |
| 220 | SIType *types; |
| 221 | SIType ret_type = T_BOOL | T_NULL; |
| 222 | AR_FuncDesc *func_desc; |
| 223 | |
| 224 | types = array_new(SIType, 2); |
| 225 | array_append(types, T_BOOL | T_NULL); |
| 226 | array_append(types, T_BOOL | T_NULL); |
| 227 | func_desc = AR_FuncDescNew("and", AR_AND, 2, 2, types, ret_type, true, true); |
| 228 | AR_RegFunc(func_desc); |
| 229 | |
| 230 | types = array_new(SIType, 2); |
| 231 | array_append(types, T_BOOL | T_NULL); |
| 232 | array_append(types, T_BOOL | T_NULL); |
| 233 | func_desc = AR_FuncDescNew("or", AR_OR, 2, 2, types, ret_type, true, true); |
| 234 | AR_RegFunc(func_desc); |
| 235 | |
| 236 | types = array_new(SIType, 2); |
| 237 | array_append(types, T_BOOL | T_NULL); |
| 238 | array_append(types, T_BOOL | T_NULL); |
| 239 | func_desc = AR_FuncDescNew("xor", AR_XOR, 2, 2, types, ret_type, true, true); |
| 240 | AR_RegFunc(func_desc); |
| 241 | |
| 242 | types = array_new(SIType, 1); |
| 243 | array_append(types, T_BOOL | T_NULL); |
| 244 | func_desc = AR_FuncDescNew("not", AR_NOT, 1, 1, types, ret_type, true, true); |
| 245 | AR_RegFunc(func_desc); |
| 246 | |
| 247 | types = array_new(SIType, 2); |
| 248 | array_append(types, SI_ALL); |
| 249 | array_append(types, SI_ALL); |
| 250 | func_desc = AR_FuncDescNew("gt", AR_GT, 2, 2, types, ret_type, true, true); |
| 251 | AR_RegFunc(func_desc); |
| 252 | |
| 253 | types = array_new(SIType, 2); |
| 254 | array_append(types, SI_ALL); |
| 255 | array_append(types, SI_ALL); |
| 256 | func_desc = AR_FuncDescNew("ge", AR_GE, 2, 2, types, ret_type, true, true); |
| 257 | AR_RegFunc(func_desc); |
| 258 | |
| 259 | types = array_new(SIType, 2); |
| 260 | array_append(types, SI_ALL); |
| 261 | array_append(types, SI_ALL); |
| 262 | func_desc = AR_FuncDescNew("lt", AR_LT, 2, 2, types, ret_type, true, true); |
| 263 | AR_RegFunc(func_desc); |
| 264 | |
| 265 | types = array_new(SIType, 2); |
| 266 | array_append(types, SI_ALL); |
| 267 | array_append(types, SI_ALL); |
| 268 | func_desc = AR_FuncDescNew("le", AR_LE, 2, 2, types, ret_type, true, true); |
| 269 | AR_RegFunc(func_desc); |
| 270 | |
| 271 | types = array_new(SIType, 2); |
| 272 | array_append(types, SI_ALL); |
| 273 | array_append(types, SI_ALL); |
| 274 | func_desc = AR_FuncDescNew("eq", AR_EQ, 2, 2, types, ret_type, true, true); |
| 275 | AR_RegFunc(func_desc); |
| 276 |
no test coverage detected