From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 38ED7BB9A for ; Mon, 14 Nov 2005 11:01:58 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAEA1vGt005177 for ; Mon, 14 Nov 2005 11:01:57 +0100 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 LAA17307 for ; Mon, 14 Nov 2005 11:01:57 +0100 (MET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAEA1tdO005167 for ; Mon, 14 Nov 2005 11:01:56 +0100 Received: from localhost (suiren [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id jAEA1rua019323; Mon, 14 Nov 2005 19:01:53 +0900 (JST) Date: Mon, 14 Nov 2005 19:01:49 +0900 (JST) Message-Id: <20051114.190149.108742562.garrigue@math.nagoya-u.ac.jp> To: sejourne_kevin@yahoo.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] marshalling objects From: Jacques Garrigue In-Reply-To: <43785DC7.1070908@yahoo.fr> References: <20051111045430.GA17854@pulp.anu.edu.au> <20051111.142133.126763902.garrigue@math.nagoya-u.ac.jp> <43785DC7.1070908@yahoo.fr> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Miltered: at nez-perce with ID 43786095.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 43786093.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 marshalling:01 closures:01 closures:01 marshal:01 jacques:01 jacques:01 native:02 consequence:02 objects:02 garrigue:03 garrigue:03 module:03 explicit:03 ecrit:04 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 From: sejourne_kevin > Jacques Garrigue a =E9crit : > > Note that this means that the method table is really sent, as an ar= ray > > of closures, which is possibly very innefficient, and also means th= at > > the program on the other side must be the same one. > = > Exactly the same one or just all classes ? > I think this could be in the manual of module Marshal. Actually it's just a consequence of the internal representation of classes, which is described in the C interface section. That is, each object contains an array with all its methods, which are function closures. This is the reason you need the flag for closures. And the condition with closures is quite explicit: this must be exactly the same program. I also expect that, for native code, it must be the same architecture. Jacques Garrigue