Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jerome Vouillon <Jerome.Vouillon@inria.fr>
To: Hendrik Tews <tews@tcs.inf.tu-dresden.de>, caml-list@inria.fr
Subject: Re: Efficency in OCaml
Date: Wed, 15 Sep 1999 14:39:24 +0200	[thread overview]
Message-ID: <19990915143924.26118@pauillac.inria.fr> (raw)
In-Reply-To: <199909101519.RAA18663@ithif20.inf.tu-dresden.de>; from Hendrik Tews on Fri, Sep 10, 1999 at 05:19:39PM +0200

On Fri, Sep 10, 1999 at 05:19:39PM +0200, Hendrik Tews wrote:
>    Each object holds a table containing its methods (the table is shared
>    among all objets of a same class). A unique integer is assigned at
>    run-time to each method name of a program.  This integer is used as an
>    index in this table to find the method. As the table is rather sparse,
>    it is implemented as a two-level array (an array of arrays of
>    functions). So, a method call
>      "object#m e1 ... en"
>    is compile in something that looks like
>      "object.(0).(idx mod N).(idx / N) objet e1 ... en"
>    where idx is the integer associated to the method name "m".
>    
> Sorry, I don't understand this. How can the compiler know idx, if
> it is not known until run-time?

idx is a variable which is bound at run-time at the beginning of the
toplevel module containing the method invocation.

-- Jérôme




      parent reply	other threads:[~1999-09-17 11:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7qj9lv$aa9$1@goldenapple.srv.cs.cmu.edu>
1999-09-01 18:40 ` chet
1999-09-01 23:09   ` Jerome Vouillon
1999-09-04 14:26     ` Nicolas Ollinger
1999-09-10 13:14       ` Jerome Vouillon
1999-09-10 15:19     ` Hendrik Tews
1999-09-10 19:03       ` chet
1999-09-15 12:39       ` Jerome Vouillon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990915143924.26118@pauillac.inria.fr \
    --to=jerome.vouillon@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=tews@tcs.inf.tu-dresden.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox