From mboxrd@z Thu Jan 1 00:00:00 1970 From: Per Bothner To: tromey@redhat.com Cc: Daniel Berlin , Per Bothner , Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: obvious set_cu_language patch Date: Fri, 08 Jun 2001 14:23:00 -0000 Message-id: References: <3B212FC8.6010801@cygnus.com> <87vgm6snjf.fsf@cgsoftware.com> <8766e6eke4.fsf@creche.redhat.com> X-SW-Source: 2001-06/msg00181.html Tom Tromey 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/