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

« back to all changes in this revision

Viewing changes to testsuite/tests/tool-ocaml/t210-setfield1.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
  mutable a : int;
 
4
  mutable b : int;
 
5
};;
 
6
 
 
7
let x = {a = 7; b = 6} in
 
8
x.b <- 11;
 
9
if x.b <> 11 then raise Not_found;
 
10
x
 
11
;;
 
12
 
 
13
(**
 
14
       0 CONSTINT 42
 
15
       2 PUSHACC0 
 
16
       3 MAKEBLOCK1 0
 
17
       5 POP 1
 
18
       7 SETGLOBAL Lib
 
19
       9 CONSTINT 6
 
20
      11 PUSHCONSTINT 7
 
21
      13 MAKEBLOCK2 0
 
22
      15 PUSHCONSTINT 11
 
23
      17 PUSHACC1 
 
24
      18 SETFIELD1 
 
25
      19 CONSTINT 11
 
26
      21 PUSHACC1 
 
27
      22 GETFIELD1 
 
28
      23 NEQ 
 
29
      24 BRANCHIFNOT 31
 
30
      26 GETGLOBAL Not_found
 
31
      28 MAKEBLOCK1 0
 
32
      30 RAISE 
 
33
      31 ACC0 
 
34
      32 POP 1
 
35
      34 ATOM0 
 
36
      35 SETGLOBAL T210-setfield1
 
37
      37 STOP 
 
38
**)