| 1 |
Post-instrumented when they are not in tail position. |
| 2 |
|
| 3 |
$ bash ../test.sh <<'EOF' |
| 4 |
> let _ = print_endline "foo" |
| 5 |
> EOF |
| 6 |
let _ = ___bisect_post_visit___ 0 (print_endline "foo") |
| 7 |
|
| 8 |
|
| 9 |
Not instrumented when in tail position. |
| 10 |
|
| 11 |
$ bash ../test.sh <<'EOF' |
| 12 |
> let _ = fun () -> print_endline "foo" |
| 13 |
> EOF |
| 14 |
let _ = |
| 15 |
fun () -> |
| 16 |
___bisect_visit___ 0; |
| 17 |
print_endline "foo" |
| 18 |
|
| 19 |
|
| 20 |
Arguments instrumented recursively. |
| 21 |
|
| 22 |
$ bash ../test.sh <<'EOF' |
| 23 |
> let _ = String.trim (String.trim "foo") |
| 24 |
> EOF |
| 25 |
let _ = |
| 26 |
___bisect_post_visit___ 1 |
| 27 |
(String.trim (___bisect_post_visit___ 0 (String.trim "foo"))) |
| 28 |
|
| 29 |
|
| 30 |
Function position instrumented recursively. |
| 31 |
|
| 32 |
$ bash ../test.sh <<'EOF' |
| 33 |
> let _ = (List.map ignore) [] |
| 34 |
> EOF |
| 35 |
let _ = |
| 36 |
___bisect_post_visit___ 0 ((___bisect_post_visit___ 0 (List.map ignore)) []) |
| 37 |
|
| 38 |
|
| 39 |
Multiple arguments don't produce nested instrumentation. |
| 40 |
|
| 41 |
$ bash ../test.sh <<'EOF' |
| 42 |
> let _ = List.map ignore [] |
| 43 |
> EOF |
| 44 |
let _ = ___bisect_post_visit___ 0 (List.map ignore []) |
| 45 |
|
| 46 |
|
| 47 |
Labels preserved. |
| 48 |
|
| 49 |
$ bash ../test.sh <<'EOF' |
| 50 |
> let _ = ListLabels.iter ~f:ignore [] |
| 51 |
> EOF |
| 52 |
let _ = ___bisect_post_visit___ 0 (ListLabels.iter ~f:ignore []) |
| 53 |
|
| 54 |
|
| 55 |
Instrumentation suppressed if all arguments labeled. |
| 56 |
|
| 57 |
$ bash ../test.sh <<'EOF' |
| 58 |
> [@@@ocaml.warning "-5"] |
| 59 |
> let _ = ListLabels.iter ~f:ignore |
| 60 |
> EOF |
| 61 |
[@@@ocaml.warning "-5"] |
| 62 |
|
| 63 |
let _ = ListLabels.iter ~f:ignore |