diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-01 16:22:13 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-01 16:22:13 +0000 |
commit | 891214a7e9062644c50bc61162d9d053866ba7cd (patch) | |
tree | 2dba069aa1abbb8cef2f212c67ca484cf5f8a674 /libjava/java/lang/Class.h | |
parent | 80d7313892a788503b35573d937665c2e3b3ea24 (diff) | |
download | gcc-891214a7e9062644c50bc61162d9d053866ba7cd.tar.gz |
2003-10-01 Andrew Haley <aph@redhat.com>
* jcf-parse.c (java_parse_file): Write otable and atable.
* java-tree.h (atable_methods): New.
(atable_decl): New.
(atable_syms_decl): New.
(enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
(symbol_*type): Rename method_symbol* to symbol*type.
(emit_offset_symbol_table): Delete.
(emit_symbol_table): New.
(get_symbol_table_index): New.
(atable_type): New.
* expr.c (build_field_ref): Handle flag_indirect_dispatch.
(build_known_method_ref): Likewise.
(get_symbol_table_index): Rename from get_offset_table_index.
Parameterize to allow re-use by differing types of symbol table.
(build_invokevirtual): Pass table to get_offset_table_index.
* decl.c (java_init_decl_processing): Push types and decls for
atable and atable_syyms.
* class.c (build_static_field_ref): Handle flag_indirect_dispatch.
(make_class_data): Add new fields atable and atable_syms.
(emit_symbol_table): Rename from emit_offset_symbol_table.
Parameterize to allow re-use by different types of symbol table.
(build_symbol_entry): Renamed from build_method_symbols_entry.
2003-10-01 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (initializeClass): Check for otable and
atable.
(_Jv_LinkOffsetTable): Check for existence of atable. Rewrite
loops using for(). Search superinterfaces. Check for fields as
well as methods. Initialize atable as well as otable: check for
static methods as well as virtual methods.
* java/lang/Class.h (struct _Jv_AddressTable): New.
(atable): New.
(atable_syms): New.
* include/jvm.h (_Jv_equalUtf8Consts): constify.
* prims.cc (_Jv_equalUtf8Consts): constify.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71979 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/Class.h')
-rw-r--r-- | libjava/java/lang/Class.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libjava/java/lang/Class.h b/libjava/java/lang/Class.h index 7fe96d0a01f..7572c6cfdb2 100644 --- a/libjava/java/lang/Class.h +++ b/libjava/java/lang/Class.h @@ -125,6 +125,12 @@ struct _Jv_OffsetTable jint offsets[]; }; +struct _Jv_AddressTable +{ + jint state; + void *addresses[]; +}; + #define JV_PRIMITIVE_VTABLE ((_Jv_VTable *) -1) #define JV_CLASS(Obj) ((jclass) (*(_Jv_VTable **) Obj)->clas) @@ -324,7 +330,7 @@ private: friend jstring _Jv_GetMethodString(jclass, _Jv_Utf8Const *); friend jshort _Jv_AppendPartialITable (jclass, jclass, void **, jshort); friend jshort _Jv_FindIIndex (jclass *, jshort *, jshort); - friend void _Jv_LinkOffsetTable (jclass); + friend void _Jv_LinkSymbolTable (jclass); friend void _Jv_LayoutVTableMethods (jclass klass); friend void _Jv_SetVTableEntries (jclass, _Jv_VTable *, jboolean *); friend void _Jv_MakeVTable (jclass); @@ -404,6 +410,8 @@ private: _Jv_OffsetTable *otable; // Offset table symbols. _Jv_MethodSymbol *otable_syms; + _Jv_AddressTable *atable; + _Jv_MethodSymbol *atable_syms; // Interfaces implemented by this class. jclass *interfaces; // The class loader for this class. |