gcc/java: * java-tree.h (otable_methods, otable_decl, otable_syms_decl, otable_type, otable_ptr_type, method_symbol_type, method_symbols_array_type, method_symbols_array_ptr_type): New field/global tree definitions. (flag_indirect_dispatch): New flag. * decl.c (java_init_decl_processing): Initialize new otable and otable_syms type nodes and decls. Add new field "index" to method_type_node. * class.c (build_method_symbols_entry): New function. (make_method_value): Set "index" to to method's vtable index for virtual methods when indirect-dispatch is not used. (make_class_data): For indirect-dispatch, dont emit the dtable_decl, and set vtable_method_count to -1. Set otable and otable_syms field if indirect-dispatch is used and there was something to put in them. (build_method_symbols_entry): New function. (emit_offset_symbol_table): New function. * expr.c (get_offset_table_index): New function. (build_invokevirtual): Build array reference to otable at the index returned by get_offset_table_index, and use the result as the vtable offset. (build_invokeinterface): Similar. * jcf-parse.c (yyparse): If indirect-dispatch, call emit_offset_symbol_table at the end of compilation, after all classes have been generated. * jvspec.c: Don't pass findirect-dispatch to jvgenmain. * lang.c (flag_indirect_dispatch): Define. (lang_f_options): Add indirect-dispatch flag. libjava: * include/jvm.h (_Jv_VTable::idx_to_offset): New method. * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_MakeVTable and _Jv_LinkOffsetTable if needed. * java/lang/Class.h (_Jv_Method): Add "index" field. (_Jv_MethodSymbol): New struct type. (_Jv_LinkOffsetTable, _Jv_LayoutVTableMethods, _Jv_SetVTableEntries, _Jv_MakeVTable): Friends. (otable, otable_syms): New Class fields. * java/lang/natClass.cc (_Jv_LinkOffsetTable): New function. (isVirtualMethod): New static function. (_Jv_LayoutVTableMethods): New function. (_Jv_SetVTableEntries): New function. (_Jv_MakeVTable): New function. From-SVN: r48038
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| .cvsignore | Loading commit data... | |
| ChangeLog | Loading commit data... | |
| Make-lang.in | Loading commit data... | |
| boehm.c | Loading commit data... | |
| buffer.c | Loading commit data... | |
| buffer.h | Loading commit data... | |
| chartables.h | Loading commit data... | |
| check-init.c | Loading commit data... | |
| class.c | Loading commit data... | |
| config-lang.in | Loading commit data... | |
| constants.c | Loading commit data... | |
| convert.h | Loading commit data... | |
| decl.c | Loading commit data... | |
| except.c | Loading commit data... | |
| expr.c | Loading commit data... | |
| gcj.texi | Loading commit data... | |
| gen-table.pl | Loading commit data... | |
| gjavah.c | Loading commit data... | |
| java-except.h | Loading commit data... | |
| java-opcodes.h | Loading commit data... | |
| java-tree.def | Loading commit data... | |
| java-tree.h | Loading commit data... | |
| javaop.def | Loading commit data... | |
| javaop.h | Loading commit data... | |
| jcf-depend.c | Loading commit data... | |
| jcf-dump.c | Loading commit data... | |
| jcf-io.c | Loading commit data... | |
| jcf-parse.c | Loading commit data... | |
| jcf-path.c | Loading commit data... | |
| jcf-reader.c | Loading commit data... | |
| jcf-write.c | Loading commit data... | |
| jcf.h | Loading commit data... | |
| jv-scan.c | Loading commit data... | |
| jvgenmain.c | Loading commit data... | |
| jvspec.c | Loading commit data... | |
| keyword.gperf | Loading commit data... | |
| keyword.h | Loading commit data... | |
| lang-options.h | Loading commit data... | |
| lang-specs.h | Loading commit data... | |
| lang.c | Loading commit data... | |
| lex.c | Loading commit data... | |
| lex.h | Loading commit data... | |
| mangle.c | Loading commit data... | |
| mangle_name.c | Loading commit data... | |
| parse-scan.y | Loading commit data... | |
| parse.h | Loading commit data... | |
| parse.y | Loading commit data... | |
| typeck.c | Loading commit data... | |
| verify.c | Loading commit data... | |
| xref.c | Loading commit data... | |
| xref.h | Loading commit data... | |
| zextract.c | Loading commit data... | |
| zipfile.h | Loading commit data... |