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

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

(**
       0 CONSTINT 42
       2 PUSHACC0
       3 MAKEBLOCK1 0
       5 POP 1
       7 SETGLOBAL Lib
       9 BRANCH 26
      11 CONST0
      12 PUSHCONST0
      13 PUSHCONST0
      14 PUSHCONST0
      15 PUSHENVACC1
      16 APPTERM 4, 5
      19 RESTART
      20 GRAB 3
      22 CONSTINT -10
      24 RETURN 4
      26 CLOSURE 0, 20
      29 PUSHACC0
      30 CLOSURE 1, 11
      33 PUSHCONSTINT -10
      35 PUSHCONST0
      36 PUSHACC2
      37 APPLY1
      38 NEQ
      39 BRANCHIFNOT 46
      41 GETGLOBAL Not_found
      43 MAKEBLOCK1 0
      45 RAISE
      46 POP 2
      48 ATOM0
      49 SETGLOBAL T181-appterm
      51 STOP
**)