Lines Matching refs:checks
226 String[] checks = mChecker.getChecks(cfunc.getName()); in isNullAllowed() local
228 if (checks != null) { in isNullAllowed()
229 while (index < checks.length) { in isNullAllowed()
230 if (checks[index].equals("nullAllowed") && in isNullAllowed()
231 checks[index + 1].equals(cname)) { in isNullAllowed()
234 index = skipOneCheck(checks, index); in isNullAllowed()
242 String[] checks = mChecker.getChecks(cfunc.getName()); in hasCheckTest() local
244 if (checks != null) { in hasCheckTest()
245 while (index < checks.length) { in hasCheckTest()
246 if (checks[index].startsWith("check")) { in hasCheckTest()
249 index = skipOneCheck(checks, index); in hasCheckTest()
257 String[] checks = mChecker.getChecks(cfunc.getName()); in hasCheckTest() local
259 if (checks != null) { in hasCheckTest()
260 while (index < checks.length) { in hasCheckTest()
261 if (checks[index].startsWith("check") && in hasCheckTest()
262 cname != null && cname.equals(checks[index + 1])) { in hasCheckTest()
265 index = skipOneCheck(checks, index); in hasCheckTest()
273 String[] checks = mChecker.getChecks(cfunc.getName()); in hasIfTest() local
275 if (checks != null) { in hasIfTest()
276 while (index < checks.length) { in hasIfTest()
277 if (checks[index].startsWith("ifcheck")) { in hasIfTest()
280 index = skipOneCheck(checks, index); in hasIfTest()
287 int skipOneCheck(String[] checks, int index) { in skipOneCheck() argument
288 if (checks[index].equals("return")) { in skipOneCheck()
290 } else if (checks[index].startsWith("check")) { in skipOneCheck()
292 } else if (checks[index].startsWith("sentinel")) { in skipOneCheck()
294 } else if (checks[index].equals("ifcheck")) { in skipOneCheck()
296 } else if (checks[index].equals("unsupported")) { in skipOneCheck()
298 } else if (checks[index].equals("requires")) { in skipOneCheck()
300 } else if (checks[index].equals("nullAllowed")) { in skipOneCheck()
304 checks[index] + "\""); in skipOneCheck()
322 String[] checks = mChecker.getChecks(cfunc.getName()); in getErrorReturnValue() local
325 if (checks != null) { in getErrorReturnValue()
326 while (index < checks.length) { in getErrorReturnValue()
327 if (checks[index].equals("return")) { in getErrorReturnValue()
328 return checks[index + 1]; in getErrorReturnValue()
330 index = skipOneCheck(checks, index); in getErrorReturnValue()
339 String[] checks = mChecker.getChecks(cfunc.getName()); in isUnsupportedFunc() local
341 if (checks != null) { in isUnsupportedFunc()
342 while (index < checks.length) { in isUnsupportedFunc()
343 if (checks[index].equals("unsupported")) { in isUnsupportedFunc()
346 index = skipOneCheck(checks, index); in isUnsupportedFunc()
354 String[] checks = mChecker.getChecks(cfunc.getName()); in isRequiresFunc() local
356 if (checks != null) { in isRequiresFunc()
357 while (index < checks.length) { in isRequiresFunc()
358 if (checks[index].equals("requires")) { in isRequiresFunc()
359 return checks[index+1]; in isRequiresFunc()
361 index = skipOneCheck(checks, index); in isRequiresFunc()
371 String[] checks = mChecker.getChecks(cfunc.getName()); in emitNativeBoundsChecks() local
376 if (checks != null) { in emitNativeBoundsChecks()
377 while (index < checks.length) { in emitNativeBoundsChecks()
378 if (checks[index].startsWith("check")) { in emitNativeBoundsChecks()
384 if (cname != null && !cname.equals(checks[index + 1])) { in emitNativeBoundsChecks()
388 out.println(iii + "if (" + remaining + " < " + checks[index + 2] + ") {"); in emitNativeBoundsChecks()
394 int underscore = checks[index].indexOf('_'); in emitNativeBoundsChecks()
396 String abbr = checks[index].substring(underscore + 1); in emitNativeBoundsChecks()
408 offset) + " < " + checks[index + 2] + in emitNativeBoundsChecks()
417 } else if (checks[index].equals("ifcheck")) { in emitNativeBoundsChecks()
418 String[] matches = checks[index + 4].split(","); in emitNativeBoundsChecks()
422 out.println(iii + "switch (" + checks[index + 3] + ") {"); in emitNativeBoundsChecks()
430 out.println(iii + " _needed = " + checks[index + 2] + ";"); in emitNativeBoundsChecks()
436 index = skipOneCheck(checks, index); in emitNativeBoundsChecks()
449 String[] checks = mChecker.getChecks(cfunc.getName()); in emitSentinelCheck() local
452 if (checks != null) { in emitSentinelCheck()
453 while (index < checks.length) { in emitSentinelCheck()
454 if (checks[index].startsWith("sentinel")) { in emitSentinelCheck()
455 if (cname != null && !cname.equals(checks[index + 1])) { in emitSentinelCheck()
464 "[i] == " + checks[index + 2] + "){"); in emitSentinelCheck()
476 " must contain " + checks[index + 2] + "!\";"); in emitSentinelCheck()
483 index = skipOneCheck(checks, index); in emitSentinelCheck()
491 String[] checks = mChecker.getChecks(cfunc.getName()); in emitStringCheck() local
494 if (checks != null) { in emitStringCheck()
495 while (index < checks.length) { in emitStringCheck()
496 if (checks[index].startsWith("check")) { in emitStringCheck()
497 if (cname != null && !cname.equals(checks[index + 1])) { in emitStringCheck()
502 out.println(iii + "if (" + checks[index + 2] + " > _stringlen) {"); in emitStringCheck()
508 checks[index + 2] + " argument\";"); in emitStringCheck()
514 index = skipOneCheck(checks, index); in emitStringCheck()
522 String[] checks = mChecker.getChecks(cfunc.getName()); in emitLocalVariablesForSentinel() local
525 if (checks != null) { in emitLocalVariablesForSentinel()
526 while (index < checks.length) { in emitLocalVariablesForSentinel()
527 if (checks[index].startsWith("sentinel")) { in emitLocalVariablesForSentinel()
528 String cname = checks[index + 1]; in emitLocalVariablesForSentinel()
534 index = skipOneCheck(checks, index); in emitLocalVariablesForSentinel()