Revision beb679f2604a0f8c312b691820d6838ab344dde6 authored by Xavier Leroy on 23 May 2004, 13:53:39 UTC, committed by Xavier Leroy on 23 May 2004, 13:53:39 UTC

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6314 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1 parent 617fd50
Raw File
t210-setfield3.ml
open Lib;;
type t = {
  mutable a : int;
  mutable b : int;
  mutable c : int;
  mutable d : int;
};;

let x = {a = 7; b = 6; c = 5; d = 4} in
x.d <- 11;
if x.d <> 11 then raise Not_found;
x
;;

(**
       0 CONSTINT 42
       2 PUSHACC0 
       3 MAKEBLOCK1 0
       5 POP 1
       7 SETGLOBAL Lib
       9 CONSTINT 4
      11 PUSHCONSTINT 5
      13 PUSHCONSTINT 6
      15 PUSHCONSTINT 7
      17 MAKEBLOCK 4, 0
      20 PUSHCONSTINT 11
      22 PUSHACC1 
      23 SETFIELD3 
      24 CONSTINT 11
      26 PUSHACC1 
      27 GETFIELD3 
      28 NEQ 
      29 BRANCHIFNOT 36
      31 GETGLOBAL Not_found
      33 MAKEBLOCK1 0
      35 RAISE 
      36 ACC0 
      37 POP 1
      39 ATOM0 
      40 SETGLOBAL T210-setfield3
      42 STOP 
**)
back to top