This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: obvious set_cu_language patch


Tom Tromey <tromey@redhat.com> writes:

> Most instantiations of JArray are actually created at runtime.  Only
> primitive arrays are created statically.

To clarify:  Tom is here talking about the corresponding Class instances
that represent the "run-time type information" of an array type.

Some possibly-helpful terminology:

* A type is a compile-time set of values and operations.
* A class specifies fields, methods and inheritance.
* A class can be viewed as a type, in which case the set of values is
the set of references (pointers) to instances of the class or its
sub-classes.
* All classes inherit from the root java.lang.Object (or Object for short).
* An instance of a class is the same thing as an object;
all Java objects are heap-allocated.
* All Java arrays are objects, hence their classes inherit from Object.
* For each class known to the run-time system (which includes all classes
for which there exist instances), there is a unique java.lang.Class object.
This describes "run-time type information" or "reflective" data, such
as the class name and list of the fields.
* The gcj compiler pre-allocates in static memory Class instances for
normal classes that it compiles.  The run-time system dynamically creates
Class instances for classes that are loaded dynamically (i.e. interpreted).
The run-time system also creates Class instances as needed for array
classes, because there is no way to associate them with a specific
compilation unit.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]