diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-08 14:19:13 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-08 14:19:13 +0000 |
commit | fb2839e8929e45aa232f760cd3485dad76513c5d (patch) | |
tree | e764f1b2a5c7d9e67d1a6fc89048373154d65bc7 /libjava/java/lang/Object.java | |
parent | f39bebdba144115c82f60bfb9cead2243f7861fa (diff) | |
download | ppe42-gcc-fb2839e8929e45aa232f760cd3485dad76513c5d.tar.gz ppe42-gcc-fb2839e8929e45aa232f760cd3485dad76513c5d.zip |
2005-12-08 Andrew Haley <aph@redhat.com>
* java/lang/Object.h (throwNoSuchMethodError): New method.
* java/lang/Object.java (throwNoSuchMethodError): New method.
* include/jvm.h (_Jv_ThrowNoSuchFieldError): Declare.
* link.cc (_Jv_ThrowNoSuchFieldError): New.
(link_symbol_table): Don't throw a NoSuchFieldError if a field is
missing. Instead, set the otable entry to zero.
(link_symbol_table): If we don't find a nonstatic method, insert
the vtable offset of Object.throwNoSuchMethodError() into the
otable.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108231 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/Object.java')
-rw-r--r-- | libjava/java/lang/Object.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libjava/java/lang/Object.java b/libjava/java/lang/Object.java index dbe3411c5ed..e81a48a9fb7 100644 --- a/libjava/java/lang/Object.java +++ b/libjava/java/lang/Object.java @@ -506,6 +506,14 @@ public class Object // completeness (some day we'll be able to auto-generate Object.h). private final native void sync_init(); + // If we fail to find a method at class loading time we put the + // vtable index of this method in its place: any attempt to call + // that method will result in an error. + void throwNoSuchMethodError() + { + throw new NoSuchMethodError("in " + getClass()); + } + // Note that we don't mention the sync_info field here. If we do, // jc1 will not work correctly. } |