From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA00582 for caml-redistribution; Wed, 12 May 1999 17:51:15 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA03181 for ; Tue, 11 May 1999 19:03:17 +0200 (MET DST) Received: from buffalo.ens-lyon.fr (buffalo.ens-lyon.fr [140.77.1.8]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id TAA24614 for ; Tue, 11 May 1999 19:03:16 +0200 (MET DST) Received: from info (info [140.77.11.6]) by buffalo.ens-lyon.fr (8.9.1a/8.9.1) with SMTP id TAA04270 for ; Tue, 11 May 1999 19:03:11 +0200 (MET DST) Date: Tue, 11 May 1999 19:03:11 +0200 (MET DST) From: Nicolas Ollinger X-Sender: nollinge@info To: caml-list@inria.fr Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: weis Hi, (* Bad english follows, sorry for purists ;) *) After playing with ocaml2instr and objprint (two tools for investigation of the OCaml bytecode and data representation available via the url http://www.ens-lyon.fr/~nollinge/camel), there are still some obscure question I would ask concerning objects implementation: 1 - Could someone give a more in deep (than in the Interfacing Caml with C in the documentation) description of OCaml new object classes and instances encoding ? Here is what I understood about it: an instance is a boxed value tagged Object_tag with n+1 fields where n is the number of instance variables (including inherited variables): fields 3..n: the variables. field 2: something like a class index ? field 1: a boxed value containing 33 elements: when unused each field contain a 0 unboxed value. Otherwise, there is a closure (pointing to the methods ???) in each field. I suppose that the last one is used when there are more than 32 methods ? 2 - When using dynlinking with marshalling (I suppose here that it is possible but I know that in the standard distribution of OCaml it is NOT), is it necessary to load .cmo files containing classes in the same order as when the instances of these classes where created ? Thanks in advance for your help, Nicolas. -- +-------------------------------------------------------------------+ |Nicolas Ollinger -=Nopid=- | +-------------------------------------------------------------------+ ENS Lyon - Magistere Informatique et Modelisation - 2eme Annee DMI97 Student ---------------------------------------------------------------------