allocating objects
Patrick Tullmann
tullmann at cs.utah.edu
Thu Jul 6 12:23:09 PDT 2000
Johan Andersson wrote:
> In object.c, the function newObject(...) allocates the object. But I
> can't find out who is calling newObject(...) or when.
There is a 'new' instruction which gets compiled to an invocation of
newObject(). Look at kaffe/kaffevm/jit3/kaffe-jit.def. Look for
'NEW'. Via many macros, 'soft_new' is eventually called, which
processes and loads the .class file, and calls newObject().
> When is the constructor called?
The bytecode contains an explicit call to a new object's constructor.
> Can anyone help me out?
You should look into disassemblers for .class files. 'javap' which
ships with kaffe doesn't have support for disassembly... though it
would be a very educational project to add such support! Its a
pure-Java application, in
kaffe/libraries/extensions/tools/javalib/kaffe/tools/javap/. :)
-Pat
----- ----- ---- --- --- -- - - - - -
Pat Tullmann tullmann at cs.utah.edu
Mean people suck.
More information about the kaffe
mailing list