diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2001-01-08 23:28:56 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2001-01-08 23:28:56 +0000 |
commit | 5bb11b2e20b893361704d444fcf3a02de7f0bc89 (patch) | |
tree | be919e8f9daa4b9caa6045e085c18aa82e8c4a09 /gcc/java | |
parent | 5bab9296f5a87f0bf7c8785b87d92db9a3b5ecf9 (diff) | |
download | gcc-5bb11b2e20b893361704d444fcf3a02de7f0bc89.zip gcc-5bb11b2e20b893361704d444fcf3a02de7f0bc89.tar.gz gcc-5bb11b2e20b893361704d444fcf3a02de7f0bc89.tar.bz2 |
In gcc/java:
* class.c (make_class_data): Push initial value for "arrayclass".
* decl.c (init_decl_processing): Add new class field "arrayclass".
In libjava:
* java/lang/Class.h (_Jv_InitClass): Use __builtin_expect.
(_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass.
(_Jv_GetArrayClass): New inline function.
(arrayclass): New field.
* prims.cc (_Jv_NewObjectArray): Use _Jv_GetArrayClass. Don't use
_Jv_GetArrayElementFromElementType.
(_Jv_NewPrimArray): Ditto.
(_Jv_PrimClass constructor): Initialize "depth", "ancestors", and
"idt" for completeness. Initialze "arrayclass" using _Jv_NewArrayClass.
Set Modifier::ABSTRACT.
* java/lang/natClassLoader.cc (_Jv_NewClass): Initialize "arrayclass".
(_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass. Now void.
Now synchronized. Array classes are now referenced from
elementClass->arrayclass. Don't use _Jv_FindClassInCache.
Set array classes' accessibility flags correctly. Optimize so that
all array classes share the same IDT.
* java/lang/reflect/natArray.cc (newInstance): Use _Jv_GetArrayClass.
* java/lang/reflect/natMethod.cc (_Jv_GetTypesFromSignature): Ditto.
* java/lang/natClass.cc (_getFields): Increment offset. Prevent fields
in superclasses from overwriting classes own fields.
(_Jv_IsAssignableFrom): Check for NULL source idt instead of calling
Modifier::isAbstract().
(null_idt): New static field.
(_Jv_PrepareConstantTimeTables): Optimize case where class implements
no interfaces.
(_Jv_IndexOf): Made inline.
* boehm.cc (_Jv_MarkObj): Mark "arrayclass" field.
From-SVN: r38808
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/class.c | 1 | ||||
-rw-r--r-- | gcc/java/decl.c | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index e3e7e46..ebf96fa 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,10 @@ 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz> + * class.c (make_class_data): Push initial value for "arrayclass". + * decl.c (init_decl_processing): Add new class field "arrayclass". + +2001-01-05 Bryce McKinlay <bryce@albatross.co.nz> + From patha@softlab.ericsson.se: * parse.y (switch_label): Use build, not build1, to construct DEFAULT_EXPR. diff --git a/gcc/java/class.c b/gcc/java/class.c index 92dd0b9..ae715f1 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1441,6 +1441,7 @@ make_class_data (type) PUSH_FIELD_VALUE (cons, "depth", integer_zero_node); PUSH_FIELD_VALUE (cons, "ancestors", null_pointer_node); PUSH_FIELD_VALUE (cons, "idt", null_pointer_node); + PUSH_FIELD_VALUE (cons, "arrayclass", null_pointer_node); FINISH_RECORD_CONSTRUCTOR (cons); diff --git a/gcc/java/decl.c b/gcc/java/decl.c index df6b236..8d78878 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -672,6 +672,7 @@ init_decl_processing () PUSH_FIELD (class_type_node, field, "depth", short_type_node); PUSH_FIELD (class_type_node, field, "ancestors", ptr_type_node); PUSH_FIELD (class_type_node, field, "idt", ptr_type_node); + PUSH_FIELD (class_type_node, field, "arrayclass", ptr_type_node); for (t = TYPE_FIELDS (class_type_node); t != NULL_TREE; t = TREE_CHAIN (t)) FIELD_PRIVATE (t) = 1; push_super_field (class_type_node, object_type_node); |