discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some thoughts about GS


From: Helge Hess
Subject: Re: Some thoughts about GS
Date: Fri, 05 Jan 2001 20:07:15 +0100

Christian Edward Gruber wrote:
> Actually, it is (AFAIK) a part of the fundamental bytecode definition of the
> spec.  Now if you're gjc'ing, it's irrelevant, but for proper, bytecoded
> binaries, object method tables are indeed in vtables.

You almost got the point. In Java there are no *binaries*, the bytecode
file itself is some kind of source to either the JVM interpreter, to a
JIT or to a combination of the two or any other execution mechanism.
You can see how much that is true by the miriad of Java decompilers
available.

So, loading and executing a .class file does not at all imply a vtable
implementation. Please read the JVM Spec for further information.

> Additionally, I may be wrong about introspection. I often pair the two as
> they usually are used hand-in-hand.  Though now that I think of it, how
> would you find method named  "doIt" in a v-table except to go to external
> sources? With Objective-C you would do parse the selector string to get rid
> of extraneous bits, then hash it and check against the object's method list,
> then it's parent's, etc. it seems to me.

As I said, JVMs are not required to use vtables. The ObjC runtime could
be a perfect backend for a JIT.
Reflection information may or may not be kept separate from the
structures required for runtime processing, again this is JVM specific.

Helge

> I'm not a low-level guru here, so if I am mistaken, I would be grateful to
> be edified.  This knowledge was passed on to me from someone intimately
> familiar with both Objective-C internals and the Java VM spec, but things
> may have gotten lost in translation.
> 
> regards,
> Christian.
> 
> ----- Original Message -----
> From: "Helge Hess" <helge.hess@skyrix.com>
> To: "Christian Edward Gruber" <christian.edward.gruber@gmx.net>
> Cc: <Tim.Bissell@dresdnerkb.com>; <discuss-gnustep@gnu.org>
> Sent: Friday, January 05, 2001 1:03 PM
> Subject: Re: Some thoughts about GS
> 
> > Christian Edward Gruber wrote:
> > > P.S.  Oh, and Java may have better reflection _classes_, but lookups are
> > > 5-10x slower for dynamic invocation, owing to static v-table messaging
> vs.
> > > selector hash lookups. Better object hierarchy, but infrastructure is
> icky
> >
> > Please explain ! What has reflection to do with v-tables and selector
> > hash lookups ?
> >
> > You mean dynamic invocation is slower ? This is certainly implementation
> > dependend, eg there is nothing which prevents using the same method
> > invocation mechanism in a JVM (that is, mapping functions to selectors).
> > No one forces you to use vtables in JVMs.
> >
> > Greetings
> >   Helge
> > --
> > SKYRIX Software AG - http://www.skyrix.com
> >
> >



reply via email to

[Prev in Thread] Current Thread [Next in Thread]