~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to testsuite/tests/tool-ocaml/t142-switch-9.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
open Lib;;
 
2
type t =
 
3
 | A
 
4
 | B of int
 
5
 | C of int
 
6
;;
 
7
 
 
8
match B 0 with
 
9
| B _ -> ()
 
10
| _ -> raise Not_found
 
11
;;
 
12
 
 
13
(**
 
14
       0 CONSTINT 42
 
15
       2 PUSHACC0 
 
16
       3 MAKEBLOCK1 0
 
17
       5 POP 1
 
18
       7 SETGLOBAL Lib
 
19
       9 GETGLOBAL <0>(0)
 
20
      11 PUSHACC0 
 
21
      12 SWITCH 
 
22
        int 0 -> 20
 
23
        tag 0 -> 17
 
24
        tag 1 -> 20
 
25
      17 CONST0 
 
26
      18 BRANCH 25
 
27
      20 GETGLOBAL Not_found
 
28
      22 MAKEBLOCK1 0
 
29
      24 RAISE 
 
30
      25 POP 1
 
31
      27 ATOM0 
 
32
      28 SETGLOBAL T142-switch-9
 
33
      30 STOP 
 
34
**)