public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "David Holmes" <dholmes@dltech.com.au>
To: "Archie Cobbs" <archie@dellroad.org>
Cc: "Robert Lougher" <robert_lougher@hotmail.com>,
	<brawer@dandelis.ch>, <chris@kiffer.eunet.be>, <aph@redhat.com>,
	<classpath@gnu.org>, <mauve-discuss@sources.redhat.com>
Subject: RE: ClassLoader.findLoadedClass (was: ServiceFactory)
Date: Tue, 23 Mar 2004 23:59:00 -0000	[thread overview]
Message-ID: <NFBBKALFDCPFIDBNKAPCGEGLDPAA.dholmes@dltech.com.au> (raw)
In-Reply-To: <200403231647.i2NGlFrX002230@arch20m.dellroad.org>

Archie Cobbs wrote:
> JC will record C in the (internal to the VM) initiated types table
> associated with a class loader L if and only if:
>
> (a) L is the defining loader for C (i.e., L.defineClass(C) was called); or
>
> (b) L.loadClass(C) successfully returns after being called **from
>     within the VM itself** (e.g., as a result of the VM's trying
>     to resolve a symbolic reference).
>
> So if another loader L2 delegates the loading of C to L, then L is not
> marked as an initiating loader for C, as neither (a) nor (b) happens.
>
> Is this consistent and/or correct with the current understanding?

Sounds consistent and correct to me.

> Also: this discussion seems to imply that we require a native method
> that findLoadedClass() can use to ask the VM to look for C in its internal
> initiated types table associated with L.. is that correct?

As findLoadedClass is a final method in ClassLoader I consider its
implementation part of the VM - as long as it and other parts of the VM use
the same lookup table you can do whatever you like here. That said it seems
to me that the lookup table defined in ClassLoader should be moved to
VMClassLoader. That way we would have:

  ClassLoader.findLoadedClass(n) calls VMClassLoader.findLoadedClass(this,
n)

and

  ClassLoader.defineClass calls VMClassLoader.defineClass(this, ...) and
VMClassLoader.defineClass can then update the lookup table however it is
implemented in that VM.

VMClassLoader can define a default mechanism using hashtables or just leave
things native.

Or in simple words: move the lookup table out of ClassLoader into
VMClassLoader.


David Holmes

  reply	other threads:[~2004-03-23 23:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-22 13:15 Robert Lougher
2004-03-23  0:44 ` David Holmes
2004-03-23 17:25   ` Archie Cobbs
2004-03-23 23:59     ` David Holmes [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-03-24 10:40 Robert Lougher
2004-03-25  0:02 ` David Holmes
     [not found] <NFBBKALFDCPFIDBNKAPCIEFEDPAA.dholmes@dltech.com.au>
2004-03-22  8:14 ` Sascha Brawer
2004-03-22  9:16   ` Sascha Brawer

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=NFBBKALFDCPFIDBNKAPCGEGLDPAA.dholmes@dltech.com.au \
    --to=dholmes@dltech.com.au \
    --cc=aph@redhat.com \
    --cc=archie@dellroad.org \
    --cc=brawer@dandelis.ch \
    --cc=chris@kiffer.eunet.be \
    --cc=classpath@gnu.org \
    --cc=mauve-discuss@sources.redhat.com \
    --cc=robert_lougher@hotmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).