summaryrefslogtreecommitdiff
path: root/testsuite/tests/tool-ocaml/t161-apply1.ml
blob: beccf312fc2e77c321d11ec440dac70c6775cc7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(* TEST
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)

open Lib;;
let f _ = raise End_of_file in
try
  f 0;
  raise Not_found;
with End_of_file -> 0
;;

(**
       0 CONSTINT 42
       2 PUSHACC0
       3 MAKEBLOCK1 0
       5 POP 1
       7 SETGLOBAL Lib
       9 BRANCH 16
      11 GETGLOBAL End_of_file
      13 MAKEBLOCK1 0
      15 RAISE
      16 CLOSURE 0, 11
      19 PUSH
      20 PUSHTRAP 30
      22 CONST0
      23 PUSHACC5
      24 APPLY1
      25 GETGLOBAL Not_found
      27 MAKEBLOCK1 0
      29 RAISE
      30 PUSHGETGLOBAL End_of_file
      32 PUSHACC1
      33 GETFIELD0
      34 EQ
      35 BRANCHIFNOT 40
      37 CONST0
      38 BRANCH 42
      40 ACC0
      41 RAISE
      42 POP 1
      44 POP 1
      46 ATOM0
      47 SETGLOBAL T161-apply1
      49 STOP
**)