summaryrefslogtreecommitdiff
path: root/testsuite/tests/tool-ocaml/t180-appterm3.ml
blob: 788c0adab8946b70adc481eb01a5176dcb39fb43 (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
(* TEST
 include tool-ocaml-lib;
 flags = "-w -a";
 ocaml_script_as_argument = "true";
 setup-ocaml-build-env;
 ocaml;
*)

open Lib;;
let f _ _ _ = 13 in
let g _ = f 0 0 0 in
if g 0 <> 13 then raise Not_found
;;

(**
       0 CONSTINT 42
       2 PUSHACC0
       3 MAKEBLOCK1 0
       5 POP 1
       7 SETGLOBAL Lib
       9 BRANCH 24
      11 CONST0
      12 PUSHCONST0
      13 PUSHCONST0
      14 PUSHENVACC1
      15 APPTERM3 4
      17 RESTART
      18 GRAB 2
      20 CONSTINT 13
      22 RETURN 3
      24 CLOSURE 0, 18
      27 PUSHACC0
      28 CLOSURE 1, 11
      31 PUSHCONSTINT 13
      33 PUSHCONST0
      34 PUSHACC2
      35 APPLY1
      36 NEQ
      37 BRANCHIFNOT 44
      39 GETGLOBAL Not_found
      41 MAKEBLOCK1 0
      43 RAISE
      44 POP 2
      46 ATOM0
      47 SETGLOBAL T180-appterm3
      49 STOP
**)