From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 931DDBD73 for ; Wed, 17 Aug 2005 01:01:15 +0200 (CEST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j7GN1Ewh020042 for ; Wed, 17 Aug 2005 01:01:15 +0200 Received: by zproxy.gmail.com with SMTP id 8so35283nzo for ; Tue, 16 Aug 2005 16:01:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YOtPz4txzMkRkJrnWLWg6vfjBc5zCvvuxz1kRg0KGzPBr5FBHK+JFPR2iosALy+wls5Ty8DJWDyNb2M5TAawAry5SBKhkufD7JcgPZydJPZL8uKfSXXUXkPo+M5CT/u26WgDyiBNL5SsvWjPpXbngrSyeuiwWr5eBr5FL1cJ8IM= Received: by 10.36.158.3 with SMTP id g3mr30408nze; Tue, 16 Aug 2005 16:01:14 -0700 (PDT) Received: by 10.36.17.2 with HTTP; Tue, 16 Aug 2005 16:01:14 -0700 (PDT) Message-ID: Date: Tue, 16 Aug 2005 16:01:14 -0700 From: Nathaniel Gray To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Representation of objects In-Reply-To: <20050817.074034.03110706.garrigue@math.nagoya-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050817.074034.03110706.garrigue@math.nagoya-u.ac.jp> X-Miltered: at nez-perce with ID 4302703A.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 invocations:01 superclass:01 bytecode:01 posts:01 compiler:01 hash:01 wrote:01 compile:01 functions:01 essentially:01 jacques:01 caltech:02 caltech:02 caml:02 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=RCVD_BY_IP autolearn=disabled version=3.0.3 On 8/16/05, Jacques Garrigue wrote: > From: Nathaniel Gray >=20 > > I've got two questions: > > > > 1. Does this mean that essentially all method invocations need to > > search the method table? The method table of a superclass is no > > longer a prefix of that of a subclass. There's a GETMETHOD(i,obj) > > bytecode, but I'm struggling to figure out when you could use it. >=20 > From other posts, it seems that you have found caml_get_public_method. I have, but my question is whether or not this search is necessary on every method call everywhere. It seems like it probably is, but perhaps there's something I haven't considered. I'm basically trying to figure out how clever the compiler is. > > 2. What about hash collisions? There's no collision resolution code > > in the method lookup functions. >=20 > The type system prevents them. That is, if there is a potential > collision between tag names, it will be detected at compile time. Ok, I see. Thanks, -n8 --=20 >>>-- Nathaniel Gray -- Caltech Computer Science ------> >>>-- Mojave Project -- http://mojave.cs.caltech.edu -->