PatchSet 7229 
Date: 2006/04/17 17:57:01
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Big classpath merge

        * libraries/javalib/external/classpath: Resynchronized with GNU
        Classpath.

        * kaffe/kaffevm/access.h
        (KFLAG_ANONYMOUS): New flag.

        * kaffe/kaffevm/baseClasses.c
        (EnclosingMethod_name): New attribute name.

        * kaffe/kaffevm/classMethod.c
        (setupClass, addMethod, addField): Shielded the usage of indexes.
        (addInnerClasses): Remember anonymous classes.

        * kaffe/kaffevm/classMethod.h
        (Hjava_lang_Class): New fields enclosingClassIndex,
        enclosingMethodIndex.

        * kaffe/kaffevm/constants.h
        (CONSTANT_ResolvedMethod): New synthetic constant.

        * kaffe/kaffevm/lookup.c
        (getMethodSignatureClass): Shielded the usage of indexes.
        (getClass): Likewise.

        * kaffe/kaffevm/readClass.c
        (readEnclosingMethodAttribute): New function.
        (readSignature): Shielded the usage of indexes.

        * libraries/clib/native/Class.c
        (forName): Renamed from forName0. Adapted to VM layer.
        (isSynthetic, isEnum, getEnclosingClass, getEnclosingConstructor,
        getEnclosingMethod, getClassSignature, isAnonymousClass,
        isLocalClass, isMemberClass): New functions.

        * libraries/clib/native/Constructor.c,
        libraries/clib/native/Method.c
        (getModifiersInternal): Renamed from getModifiers.

        * libraries/javalib/vmspecific/java/lang/Class.java: Removed.

        * libraries/javalib/vmspecific/java/lang/VMClass.java: Imported
        new version from GNU Classpath.

        * libraries/javalib/vmspecific/java/lang/reflect/Constructor.java,
        libraries/javalib/vmspecific/java/lang/reflect/Method.java:
        Imported from GNU Classpath and adapted to Kaffe's internals.

        * libraries/javalib/vmspecific/java/security/VMSecureRandom.java:
        Imported from GNU Classpath.

        * test/internal/jit_stub.c: Upgraded to initialize
        EnclosingMethod_name.

        * test/regression/IndexTest.java,
        test/regression/ProcessClassInst.java,
        test/regression/ProcessClassStop.java: Fixed expected message.

Members: 
        ChangeLog:1.4735->1.4736 
        kaffe/kaffevm/access.h:1.12->1.13 
        kaffe/kaffevm/baseClasses.c:1.73->1.74 
        kaffe/kaffevm/classMethod.c:1.153->1.154 
        kaffe/kaffevm/classMethod.h:1.88->1.89 
        kaffe/kaffevm/constants.h:INITIAL->1.10 
        kaffe/kaffevm/lookup.c:1.48->1.49 
        kaffe/kaffevm/readClass.c:1.27->1.28 
        kaffe/kaffevm/reflect.c:1.3->1.4 
        kaffe/kaffevm/jni/jni-helpers.c:1.12->1.13 
        libraries/clib/native/Class.c:1.90->1.91 
        libraries/clib/native/Constructor.c:INITIAL->1.14 
        libraries/clib/native/Method.c:1.44->1.45 
        libraries/clib/native/gnu_classpath_VMSystemProperties.c:1.4->1.5 
        libraries/javalib/external/classpath/ChangeLog:1.25->1.26 
        libraries/javalib/external/classpath/Makefile.in:1.19->1.20 
        libraries/javalib/external/classpath/NEWS:1.8->1.9 
        libraries/javalib/external/classpath/config.guess:1.17->1.18 
        libraries/javalib/external/classpath/config.sub:1.30->1.31 
        libraries/javalib/external/classpath/configure:1.24->1.25 
        libraries/javalib/external/classpath/configure.ac:1.12->1.13 
        libraries/javalib/external/classpath/ltmain.sh:1.17->1.18 
        libraries/javalib/external/classpath/doc/Makefile.in:1.16->1.17 
        libraries/javalib/external/classpath/doc/vmintegration.info:1.11->1.12 
        libraries/javalib/external/classpath/doc/api/Makefile.in:1.17->1.18 
        libraries/javalib/external/classpath/examples/Makefile.in:1.21->1.22 
        
libraries/javalib/external/classpath/examples/gnu/classpath/examples/swing/Demo.java:1.7->1.8
 
        
libraries/javalib/external/classpath/examples/gnu/classpath/examples/swing/TextAreaDemo.java:1.2->1.3
 
        
libraries/javalib/external/classpath/examples/gnu/classpath/examples/swing/TextFieldDemo.java:1.3->1.4
 
        libraries/javalib/external/classpath/external/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/external/relaxngDatatype/Makefile.in:1.5->1.6
 
        
libraries/javalib/external/classpath/external/sax/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/AttributeList.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/Attributes.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ContentHandler.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/DTDHandler.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/DocumentHandler.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/EntityResolver.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ErrorHandler.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/HandlerBase.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/InputSource.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/Locator.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/Parser.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/SAXException.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/SAXNotRecognizedException.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/SAXNotSupportedException.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/SAXParseException.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/XMLFilter.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/XMLReader.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/package.html:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ext/Attributes2.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ext/Attributes2Impl.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ext/DeclHandler.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ext/DefaultHandler2.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ext/EntityResolver2.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ext/LexicalHandler.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ext/Locator2.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ext/Locator2Impl.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/ext/package.html:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/AttributeListImpl.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/AttributesImpl.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/DefaultHandler.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/LocatorImpl.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/NamespaceSupport.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/NewInstance.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/ParserAdapter.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/ParserFactory.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/XMLFilterImpl.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/XMLReaderAdapter.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/XMLReaderFactory.java:1.25->1.26
 
        
libraries/javalib/external/classpath/external/sax/org/xml/sax/helpers/package.html:1.25->1.26
 
        
libraries/javalib/external/classpath/external/w3c_dom/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/gnu/CORBA/IorDelegate.java:1.1->1.2 
        
libraries/javalib/external/classpath/gnu/CORBA/OrbRestricted.java:1.1->1.2 
        
libraries/javalib/external/classpath/gnu/CORBA/SocketRepository.java:1.2->1.3 
        libraries/javalib/external/classpath/gnu/CORBA/gnuRequest.java:1.2->1.3 
        
libraries/javalib/external/classpath/gnu/CORBA/CDR/EncapsulationStream.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/CORBA/GIOP/MessageHeader.java:1.2->1.3 
        
libraries/javalib/external/classpath/gnu/CORBA/NamingService/NameParser.java:1.2->1.3
 
        
libraries/javalib/external/classpath/gnu/classpath/SystemProperties.java:1.3->1.4
 
        
libraries/javalib/external/classpath/gnu/java/lang/reflect/ClassSignatureParser.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/gnu/java/lang/reflect/FieldSignatureParser.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/gnu/java/lang/reflect/GenericSignatureParser.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/gnu/java/lang/reflect/MethodSignatureParser.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/gnu/java/lang/reflect/TypeImpl.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/gnu/java/net/DefaultContentHandlerFactory.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/gnu/java/security/hash/Whirlpool.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/java/security/jce/prng/SecureRandomAdapter.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/java/security/prng/MDGenerator.java:1.2->1.3
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/Assembly.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/Cascade.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/CascadeStage.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/CascadeTransformer.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/Direction.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/LoopbackTransformer.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/ModeStage.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/Operation.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/PaddingTransformer.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/Stage.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/assembly/Transformer.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/cipher/Square.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/AESSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/ARCFourSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/AnubisSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/BlowfishSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/CipherAdapter.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/DESSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/KhazadSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/NullCipherSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/PBES2.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/RijndaelSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/SerpentSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/SquareSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/TripleDESSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/cipher/TwofishSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacMD2Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacMD4Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacMD5Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacRipeMD128Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacRipeMD160Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacSHA160Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacSHA256Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacSHA384Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacSHA512Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacTigerSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/HMacWhirlpoolSpi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/MacAdapter.java:1.2->1.3
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/TMMH16Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/UHash32Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/jce/mac/UMac32Spi.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/key/dh/DiffieHellmanSender.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/key/srp6/SRP6TLSServer.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/keyring/PrivateKeyEntry.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/mode/IAuthenticatedMode.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/pad/WrongPaddingException.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/prng/Fortuna.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/prng/ICMGenerator.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/prng/IPBE.java:1.1->1.2 
        
libraries/javalib/external/classpath/gnu/javax/crypto/prng/PBKDF2.java:1.1->1.2 
        
libraries/javalib/external/classpath/gnu/javax/crypto/sasl/ConfidentialityException.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/sasl/IllegalMechanismStateException.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/sasl/srp/IALG.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java:1.2->1.3
 
        
libraries/javalib/external/classpath/gnu/javax/swing/tree/GnuPath.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/gnu/regexp/CharIndexed.java:1.3->1.4 
        
libraries/javalib/external/classpath/gnu/regexp/CharIndexedCharArray.java:1.3->1.4
 
        
libraries/javalib/external/classpath/gnu/regexp/CharIndexedCharSequence.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/gnu/regexp/CharIndexedInputStream.java:1.3->1.4
 
        
libraries/javalib/external/classpath/gnu/regexp/CharIndexedString.java:1.3->1.4 
        
libraries/javalib/external/classpath/gnu/regexp/CharIndexedStringBuffer.java:1.3->1.4
 
        libraries/javalib/external/classpath/gnu/regexp/RE.java:1.8->1.9 
        libraries/javalib/external/classpath/gnu/regexp/REToken.java:1.4->1.5 
        
libraries/javalib/external/classpath/gnu/regexp/RETokenBackRef.java:1.4->1.5 
        
libraries/javalib/external/classpath/gnu/regexp/RETokenChar.java:1.4->1.5 
        
libraries/javalib/external/classpath/gnu/regexp/RETokenNamedProperty.java:1.3->1.4
 
        
libraries/javalib/external/classpath/gnu/regexp/RETokenRange.java:1.4->1.5 
        
libraries/javalib/external/classpath/gnu/xml/dom/DomDocument.java:1.2->1.3 
        libraries/javalib/external/classpath/gnu/xml/dom/DomNode.java:1.5->1.6 
        
libraries/javalib/external/classpath/gnu/xml/dom/DomNodeIterator.java:1.1->1.2 
        
libraries/javalib/external/classpath/gnu/xml/dom/html2/DomHTMLAppletElement.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/xml/dom/html2/DomHTMLDocument.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/xml/dom/html2/DomHTMLEmbedElement.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/gnu/xml/dom/html2/DomHTMLObjectElement.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/xml/dom/html2/DomHTMLParser.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java:1.1->1.2
 
        
libraries/javalib/external/classpath/gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java:1.1->1.2
 
        libraries/javalib/external/classpath/include/Makefile.in:1.18->1.19 
        libraries/javalib/external/classpath/java/awt/Component.java:1.7->1.8 
        libraries/javalib/external/classpath/java/awt/Container.java:1.10->1.11 
        
libraries/javalib/external/classpath/java/awt/DefaultKeyboardFocusManager.java:1.1->1.2
 
        libraries/javalib/external/classpath/java/awt/Dialog.java:1.1->1.2 
        libraries/javalib/external/classpath/java/awt/Frame.java:1.3->1.4 
        libraries/javalib/external/classpath/java/awt/Toolkit.java:1.3->1.4 
        libraries/javalib/external/classpath/java/awt/Window.java:1.4->1.5 
        
libraries/javalib/external/classpath/java/awt/event/MouseEvent.java:1.1->1.2 
        
libraries/javalib/external/classpath/java/awt/image/ComponentSampleModel.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/awt/image/SampleModel.java:1.1->1.2 
        
libraries/javalib/external/classpath/java/awt/image/renderable/RenderableImageProducer.java:1.2->1.3
 
        
libraries/javalib/external/classpath/java/beans/beancontext/BeanContext.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/beans/beancontext/BeanContextMembershipEvent.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/beans/beancontext/BeanContextServiceAvailableEvent.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/beans/beancontext/BeanContextServiceRevokedEvent.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/beans/beancontext/BeanContextServicesSupport.java:1.3->1.4
 
        
libraries/javalib/external/classpath/java/beans/beancontext/BeanContextSupport.java:1.3->1.4
 
        
libraries/javalib/external/classpath/java/io/CharArrayWriter.java:1.2->1.3 
        
libraries/javalib/external/classpath/java/io/DataOutputStream.java:1.1->1.2 
        libraries/javalib/external/classpath/java/lang/Class.java:1.3->1.4 
        
libraries/javalib/external/classpath/java/lang/EnumConstantNotPresentException.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/lang/StackTraceElement.java:1.2->1.3 
        libraries/javalib/external/classpath/java/lang/Thread.java:1.4->1.5 
        
libraries/javalib/external/classpath/java/lang/ThreadGroup.java:1.1->1.2 
        
libraries/javalib/external/classpath/java/lang/TypeNotPresentException.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/lang/annotation/AnnotationFormatError.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/lang/reflect/GenericDeclaration.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/java/lang/reflect/GenericSignatureFormatError.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/lang/reflect/MalformedParameterizedTypeException.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/java/lang/reflect/ParameterizedType.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/lang/reflect/TypeVariable.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/java/net/MimeTypeMapper.java:1.1->1.2 
        
libraries/javalib/external/classpath/java/net/URLConnection.java:1.4->1.5 
        
libraries/javalib/external/classpath/java/security/SecureRandom.java:1.2->1.3 
        
libraries/javalib/external/classpath/java/util/AbstractList.java:1.1->1.2 
        libraries/javalib/external/classpath/java/util/Arrays.java:1.2->1.3 
        libraries/javalib/external/classpath/java/util/BitSet.java:1.1->1.2 
        libraries/javalib/external/classpath/java/util/HashMap.java:1.1->1.2 
        libraries/javalib/external/classpath/java/util/Hashtable.java:1.3->1.4 
        
libraries/javalib/external/classpath/java/util/IdentityHashMap.java:1.1->1.2 
        
libraries/javalib/external/classpath/java/util/InvalidPropertiesFormatException.java:1.1->1.2
 
        
libraries/javalib/external/classpath/java/util/LinkedHashMap.java:1.1->1.2 
        libraries/javalib/external/classpath/java/util/LinkedList.java:1.1->1.2 
        libraries/javalib/external/classpath/java/util/TreeMap.java:1.1->1.2 
        
libraries/javalib/external/classpath/java/util/WeakHashMap.java:1.3->1.4 
        
libraries/javalib/external/classpath/java/util/jar/JarFile.java:1.1->1.2 
        
libraries/javalib/external/classpath/java/util/regex/Matcher.java:1.3->1.4 
        
libraries/javalib/external/classpath/java/util/regex/Pattern.java:1.3->1.4 
        
libraries/javalib/external/classpath/java/util/zip/ZipFile.java:1.3->1.4 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleAction.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleAttributeSequence.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleContext.java:1.2->1.3
 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleExtendedText.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleRelation.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleRole.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleState.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleStreamable.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleText.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/accessibility/AccessibleTextSequence.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/javax/imageio/ImageWriteParam.java:1.2->1.3
 
        
libraries/javalib/external/classpath/javax/imageio/plugins/jpeg/JPEGImageReadParam.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/javax/imageio/plugins/jpeg/JPEGImageWriteParam.java:INITIAL->1.1
 
        libraries/javalib/external/classpath/javax/naming/Binding.java:1.2->1.3 
        
libraries/javalib/external/classpath/javax/naming/CompositeName.java:1.1->1.2 
        
libraries/javalib/external/classpath/javax/naming/NameClassPair.java:1.2->1.3 
        
libraries/javalib/external/classpath/javax/naming/directory/BasicAttribute.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/naming/directory/BasicAttributes.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/security/auth/kerberos/ServicePermission.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/security/auth/x500/X500Principal.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/swing/AbstractAction.java:1.4->1.5 
        
libraries/javalib/external/classpath/javax/swing/AbstractButton.java:1.5->1.6 
        
libraries/javalib/external/classpath/javax/swing/ActionMap.java:1.2->1.3 
        
libraries/javalib/external/classpath/javax/swing/CompatibilityFocusTraversalPolicy.java:INITIAL->1.1
 
        
libraries/javalib/external/classpath/javax/swing/JComboBox.java:1.4->1.5 
        
libraries/javalib/external/classpath/javax/swing/JComponent.java:1.10->1.11 
        
libraries/javalib/external/classpath/javax/swing/JDesktopPane.java:1.3->1.4 
        
libraries/javalib/external/classpath/javax/swing/JFileChooser.java:1.6->1.7 
        
libraries/javalib/external/classpath/javax/swing/JInternalFrame.java:1.5->1.6 
        libraries/javalib/external/classpath/javax/swing/JLabel.java:1.2->1.3 
        libraries/javalib/external/classpath/javax/swing/JMenu.java:1.4->1.5 
        
libraries/javalib/external/classpath/javax/swing/JMenuItem.java:1.5->1.6 
        
libraries/javalib/external/classpath/javax/swing/JRootPane.java:1.5->1.6 
        
libraries/javalib/external/classpath/javax/swing/JSplitPane.java:1.4->1.5 
        libraries/javalib/external/classpath/javax/swing/JTable.java:1.7->1.8 
        
libraries/javalib/external/classpath/javax/swing/JTextField.java:1.6->1.7 
        libraries/javalib/external/classpath/javax/swing/JToolBar.java:1.3->1.4 
        libraries/javalib/external/classpath/javax/swing/JTree.java:1.5->1.6 
        
libraries/javalib/external/classpath/javax/swing/LookAndFeel.java:1.4->1.5 
        
libraries/javalib/external/classpath/javax/swing/MenuSelectionManager.java:1.3->1.4
 
        
libraries/javalib/external/classpath/javax/swing/ScrollPaneLayout.java:1.3->1.4 
        
libraries/javalib/external/classpath/javax/swing/SizeSequence.java:1.1->1.2 
        
libraries/javalib/external/classpath/javax/swing/ViewportLayout.java:1.9->1.10 
        
libraries/javalib/external/classpath/javax/swing/event/InternalFrameEvent.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java:1.3->1.4
 
        
libraries/javalib/external/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java:1.10->1.11
 
        
libraries/javalib/external/classpath/javax/swing/plaf/basic/BasicTextFieldUI.java:1.2->1.3
 
        
libraries/javalib/external/classpath/javax/swing/plaf/basic/BasicTextUI.java:1.8->1.9
 
        
libraries/javalib/external/classpath/javax/swing/plaf/basic/BasicTreeUI.java:1.6->1.7
 
        
libraries/javalib/external/classpath/javax/swing/plaf/metal/MetalDesktopIconUI.java:1.2->1.3
 
        
libraries/javalib/external/classpath/javax/swing/plaf/metal/MetalRootPaneUI.java:1.4->1.5
 
        
libraries/javalib/external/classpath/javax/swing/plaf/synth/SynthPainter.java:1.3->1.4
 
        
libraries/javalib/external/classpath/javax/swing/text/AbstractDocument.java:1.7->1.8
 
        
libraries/javalib/external/classpath/javax/swing/text/DefaultCaret.java:1.8->1.9
 
        
libraries/javalib/external/classpath/javax/swing/text/DefaultHighlighter.java:1.4->1.5
 
        
libraries/javalib/external/classpath/javax/swing/text/FieldView.java:1.4->1.5 
        
libraries/javalib/external/classpath/javax/swing/tree/AbstractLayoutCache.java:1.2->1.3
 
        
libraries/javalib/external/classpath/javax/swing/tree/DefaultTreeSelectionModel.java:1.3->1.4
 
        
libraries/javalib/external/classpath/javax/swing/tree/FixedHeightLayoutCache.java:1.3->1.4
 
        
libraries/javalib/external/classpath/javax/swing/tree/TreePath.java:1.2->1.3 
        
libraries/javalib/external/classpath/javax/swing/tree/VariableHeightLayoutCache.java:1.3->1.4
 
        
libraries/javalib/external/classpath/javax/xml/XMLConstants.java:1.1->1.2 
        
libraries/javalib/external/classpath/javax/xml/datatype/DatatypeConstants.java:1.1->1.2
 
        
libraries/javalib/external/classpath/javax/xml/datatype/Duration.java:1.1->1.2 
        
libraries/javalib/external/classpath/javax/xml/validation/SchemaFactory.java:1.2->1.3
 
        
libraries/javalib/external/classpath/javax/xml/xpath/XPathConstants.java:1.1->1.2
 
        libraries/javalib/external/classpath/lib/Makefile.am:1.12->1.13 
        libraries/javalib/external/classpath/lib/Makefile.in:1.23->1.24 
        libraries/javalib/external/classpath/lib/gen-classlist.sh.in:1.4->1.5 
        libraries/javalib/external/classpath/native/Makefile.in:1.18->1.19 
        libraries/javalib/external/classpath/native/fdlibm/Makefile.am:1.5->1.6 
        
libraries/javalib/external/classpath/native/fdlibm/Makefile.in:1.20->1.21 
        libraries/javalib/external/classpath/native/jawt/Makefile.in:1.18->1.19 
        libraries/javalib/external/classpath/native/jni/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/native/jni/classpath/Makefile.am:1.3->1.4 
        
libraries/javalib/external/classpath/native/jni/classpath/Makefile.in:1.19->1.20
 
        
libraries/javalib/external/classpath/native/jni/gtk-peer/Makefile.in:1.19->1.20 
        
libraries/javalib/external/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkWindowPeer.c:1.3->1.4
 
        
libraries/javalib/external/classpath/native/jni/java-io/Makefile.in:1.19->1.20 
        
libraries/javalib/external/classpath/native/jni/java-lang/Makefile.in:1.18->1.19
 
        
libraries/javalib/external/classpath/native/jni/java-net/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/native/jni/java-nio/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/native/jni/java-util/Makefile.in:1.18->1.19
 
        
libraries/javalib/external/classpath/native/jni/midi-alsa/Makefile.in:1.18->1.19
 
        
libraries/javalib/external/classpath/native/jni/midi-dssi/Makefile.in:1.19->1.20
 
        
libraries/javalib/external/classpath/native/jni/qt-peer/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/native/jni/xmlj/Makefile.in:1.19->1.20 
        
libraries/javalib/external/classpath/native/target/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/native/target/Linux/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/native/target/generic/Makefile.in:1.18->1.19
 
        libraries/javalib/external/classpath/org/omg/CORBA/ORB.java:1.2->1.3 
        
libraries/javalib/external/classpath/org/omg/CORBA/ParameterMode.java:1.1->1.2 
        
libraries/javalib/external/classpath/org/omg/CosNaming/NamingContextOperations.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/CosNaming/_BindingIteratorStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/CosNaming/_NamingContextExtStub.java:1.2->1.3
 
        
libraries/javalib/external/classpath/org/omg/CosNaming/_NamingContextStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/DynamicAny/_DynAnyFactoryStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/DynamicAny/_DynAnyStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/DynamicAny/_DynArrayStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/DynamicAny/_DynEnumStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/DynamicAny/_DynFixedStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/DynamicAny/_DynSequenceStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/DynamicAny/_DynStructStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/DynamicAny/_DynUnionStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/DynamicAny/_DynValueStub.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/PortableInterceptor/ObjectReferenceFactory.java:1.1->1.2
 
        
libraries/javalib/external/classpath/org/omg/PortableInterceptor/ObjectReferenceFactoryOperations.java:1.1->1.2(DEAD)
 
        
libraries/javalib/external/classpath/org/omg/PortableServer/ServantActivatorPOA.java:1.2->1.3
 
        
libraries/javalib/external/classpath/org/omg/PortableServer/ServantLocatorPOA.java:1.2->1.3
 
        libraries/javalib/external/classpath/resource/Makefile.in:1.19->1.20 
        
libraries/javalib/external/classpath/resource/gnu/regexp/MessagesBundle_it.properties:1.25->1.26
 
        
libraries/javalib/external/classpath/resource/javax/imageio/plugins/jpeg/MessagesBundle.properties:INITIAL->1.1
 
        libraries/javalib/external/classpath/scripts/Makefile.in:1.18->1.19 
        
libraries/javalib/external/classpath/scripts/classpath.spec.in:1.25->1.26 
        libraries/javalib/external/classpath/tools/Makefile.in:1.6->1.7 
        
libraries/javalib/external/classpath/vm/reference/java/lang/VMClass.java:1.2->1.3
 
        
libraries/javalib/external/classpath/vm/reference/java/lang/VMThread.java:1.2->1.3
 
        
libraries/javalib/external/classpath/vm/reference/java/lang/reflect/Constructor.java:1.4->1.5
 
        
libraries/javalib/external/classpath/vm/reference/java/lang/reflect/Field.java:1.3->1.4
 
        
libraries/javalib/external/classpath/vm/reference/java/lang/reflect/Method.java:1.4->1.5
 
        
libraries/javalib/external/classpath/vm/reference/java/security/VMSecureRandom.java:INITIAL->1.1
 
        libraries/javalib/vmspecific/java/lang/Class.java:1.1->1.2(DEAD) 
        libraries/javalib/vmspecific/java/lang/VMClass.java:1.1->1.2 
        
libraries/javalib/vmspecific/java/lang/reflect/Constructor.java:1.2->1.3 
        libraries/javalib/vmspecific/java/lang/reflect/Field.java:1.3->1.4 
        libraries/javalib/vmspecific/java/lang/reflect/Method.java:1.2->1.3 
        
libraries/javalib/vmspecific/java/security/VMSecureRandom.java:INITIAL->1.1 
        test/internal/jit_stub.c:1.12->1.13 
        test/regression/IndexTest.java:1.5->1.6 
        test/regression/ProcessClassInst.java:1.16->1.17 
        test/regression/ProcessClassStop.java:1.16->1.17 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4735 kaffe/ChangeLog:1.4736
--- kaffe/ChangeLog:1.4735      Mon Apr 17 11:11:19 2006
+++ kaffe/ChangeLog     Mon Apr 17 17:57:01 2006
@@ -1,3 +1,62 @@
+2006-04-17  Guilhem Lavaux  <[EMAIL PROTECTED]>
+
+       * libraries/javalib/external/classpath: Resynchronized with GNU
+       Classpath.
+
+       * kaffe/kaffevm/access.h
+       (KFLAG_ANONYMOUS): New flag.
+
+       * kaffe/kaffevm/baseClasses.c
+       (EnclosingMethod_name): New attribute name.
+
+       * kaffe/kaffevm/classMethod.c
+       (setupClass, addMethod, addField): Shielded the usage of indexes.
+       (addInnerClasses): Remember anonymous classes.
+
+       * kaffe/kaffevm/classMethod.h
+       (Hjava_lang_Class): New fields enclosingClassIndex,
+       enclosingMethodIndex.
+       
+       * kaffe/kaffevm/constants.h
+       (CONSTANT_ResolvedMethod): New synthetic constant.
+
+       * kaffe/kaffevm/lookup.c
+       (getMethodSignatureClass): Shielded the usage of indexes.
+       (getClass): Likewise.
+       
+       * kaffe/kaffevm/readClass.c
+       (readEnclosingMethodAttribute): New function.
+       (readSignature): Shielded the usage of indexes.
+       
+       * libraries/clib/native/Class.c
+       (forName): Renamed from forName0. Adapted to VM layer.
+       (isSynthetic, isEnum, getEnclosingClass, getEnclosingConstructor,
+       getEnclosingMethod, getClassSignature, isAnonymousClass,
+       isLocalClass, isMemberClass): New functions.
+
+       * libraries/clib/native/Constructor.c,
+       libraries/clib/native/Method.c
+       (getModifiersInternal): Renamed from getModifiers.
+       
+       * libraries/javalib/vmspecific/java/lang/Class.java: Removed.
+
+       * libraries/javalib/vmspecific/java/lang/VMClass.java: Imported
+       new version from GNU Classpath.
+
+       * libraries/javalib/vmspecific/java/lang/reflect/Constructor.java,
+       libraries/javalib/vmspecific/java/lang/reflect/Method.java:
+       Imported from GNU Classpath and adapted to Kaffe's internals.
+
+       * libraries/javalib/vmspecific/java/security/VMSecureRandom.java:
+       Imported from GNU Classpath.
+
+       * test/internal/jit_stub.c: Upgraded to initialize
+       EnclosingMethod_name.
+
+       * test/regression/IndexTest.java,
+       test/regression/ProcessClassInst.java,
+       test/regression/ProcessClassStop.java: Fixed expected message.
+       
 2006-04-17  Dalibor Topic  <[EMAIL PROTECTED]>
 
        * libraries/clib/native/java_lang_VMDouble.c:
Index: kaffe/kaffe/kaffevm/access.h
diff -u kaffe/kaffe/kaffevm/access.h:1.12 kaffe/kaffe/kaffevm/access.h:1.13
--- kaffe/kaffe/kaffevm/access.h:1.12   Thu Mar 30 17:39:16 2006
+++ kaffe/kaffe/kaffevm/access.h        Mon Apr 17 17:57:05 2006
@@ -49,6 +49,7 @@
 /* either jitted or native method was found */
 #define        KFLAG_TRANSLATED        0x08
 #define        KFLAG_VERIFIED          0x10
+#define KFLAG_ANONYMOUS         0x20
 
 typedef enum {
        ACC_TYPE_CLASS,
Index: kaffe/kaffe/kaffevm/baseClasses.c
diff -u kaffe/kaffe/kaffevm/baseClasses.c:1.73 
kaffe/kaffe/kaffevm/baseClasses.c:1.74
--- kaffe/kaffe/kaffevm/baseClasses.c:1.73      Thu Mar 30 17:39:16 2006
+++ kaffe/kaffe/kaffevm/baseClasses.c   Mon Apr 17 17:57:05 2006
@@ -60,6 +60,7 @@
 Utf8Const* SourceFile_name;
 Utf8Const* InnerClasses_name;
 Utf8Const* Signature_name;
+Utf8Const* EnclosingMethod_name;
 Utf8Const* Synthetic_name;
 
 static struct _dispatchTable *ClassClass_vtable;
@@ -259,12 +260,13 @@
        InnerClasses_name = utf8ConstNew("InnerClasses", -1);
        Signature_name = utf8ConstNew("Signature", -1);
        Synthetic_name = utf8ConstNew("Synthetic", -1);
+       EnclosingMethod_name = utf8ConstNew("EnclosingMethod", -1);
 
        if (!(init_name && final_name && void_signature &&
              constructor_name && Code_name && LineNumberTable_name &&
              LocalVariableTable_name && ConstantValue_name &&
              Exceptions_name && SourceFile_name && InnerClasses_name && 
-             Signature_name && Synthetic_name)) {
+             Signature_name && Synthetic_name && EnclosingMethod_name)) {
                DBG(INIT, dprintf("not enough memory to run kaffe\n"); );
                KAFFEVM_ABORT();
        }
Index: kaffe/kaffe/kaffevm/classMethod.c
diff -u kaffe/kaffe/kaffevm/classMethod.c:1.153 
kaffe/kaffe/kaffevm/classMethod.c:1.154
--- kaffe/kaffe/kaffevm/classMethod.c:1.153     Thu Mar 30 17:39:16 2006
+++ kaffe/kaffe/kaffevm/classMethod.c   Mon Apr 17 17:57:05 2006
@@ -1019,7 +1019,8 @@
        pool = CLASS_CONSTANTS(cl);
 
        /* Find the name of the class */
-       if (pool->tags[c] != CONSTANT_Class) {
+       if (c >= CLASS_CONST_SIZE (cl)
+           || pool->tags[c] != CONSTANT_Class) {
                 postExceptionMessage(einfo, JAVA_LANG(ClassFormatError),
                                     "this class constant pool index is bogus");
                return (NULL);
@@ -1074,10 +1075,6 @@
 
 
 /*
- * Add a Java 1.5 signature to the class descriptor.
- */
-
-/*
  * Read in InnerClasses declares for a class
  */
 bool
@@ -1109,15 +1106,17 @@
        c->inner_classes = ic;
 
        for (i = 0; i < nr; i++, ic++) {
-               u2 dummy;
+               u2 inner_name_index;
 
                readu2(&ic->inner_class, fp);
                readu2(&ic->outer_class, fp);
-               readu2(&dummy, fp);
+               readu2(&inner_name_index, fp);
                readu2(&ic->inner_class_accflags, fp);
 
+               if (inner_name_index != 0)
+                 c->kFlags |= KFLAG_ANONYMOUS;
+
                if (c->this_index && ic->inner_class == c->this_index) {
-//                 c->accflags = (ic->inner_class_accflags & ACC_MASK);
                    c->this_inner_index = i;
                }
        }
@@ -1166,7 +1165,8 @@
        pool = CLASS_CONSTANTS (c);
 
        nc = name_index;
-       if (pool->tags[nc] != CONSTANT_Utf8) {
+       if (nc >= CLASS_CONST_SIZE (c)
+           || pool->tags[nc] != CONSTANT_Utf8) {
                /* XXX fill in einfo! */
 DBG(RESERROR,  dprintf("addMethod: no method name.\n");                );
                postExceptionMessage(einfo,
@@ -1175,7 +1175,8 @@
                return (NULL);
        }
        sc = signature_index;
-       if (pool->tags[sc] != CONSTANT_Utf8) {
+       if (sc >= CLASS_CONST_SIZE (c)
+           || pool->tags[sc] != CONSTANT_Utf8) {
                /* XXX fill in einfo! */
 DBG(RESERROR,  dprintf("addMethod: no signature name.\n");     );
                postExceptionMessage(einfo,
@@ -1239,7 +1240,8 @@
        pool = CLASS_CONSTANTS (c);
 
        nc = name_index;
-       if (pool->tags[nc] != CONSTANT_Utf8) {
+       if (nc >= CLASS_CONST_SIZE (c)
+           || pool->tags[nc] != CONSTANT_Utf8) {
 DBG(RESERROR,  dprintf("addField: no field name.\n");                  );
                postExceptionMessage(einfo,
                                     JAVA_LANG(ClassFormatError),
@@ -1263,7 +1265,8 @@
     );
 
        sc = signature_index;
-       if (pool->tags[sc] != CONSTANT_Utf8) {
+       if (pool->tags[sc] != CONSTANT_Utf8
+           || sc >=CLASS_CONST_SIZE(c)) {
 DBG(RESERROR,  dprintf("addField: no signature name.\n");              );
                postExceptionMessage(einfo,
                                     JAVA_LANG(ClassFormatError),
Index: kaffe/kaffe/kaffevm/classMethod.h
diff -u kaffe/kaffe/kaffevm/classMethod.h:1.88 
kaffe/kaffe/kaffevm/classMethod.h:1.89
--- kaffe/kaffe/kaffevm/classMethod.h:1.88      Thu Apr  6 03:11:03 2006
+++ kaffe/kaffe/kaffevm/classMethod.h   Mon Apr 17 17:57:07 2006
@@ -100,10 +100,12 @@
 
        Utf8Const*              name;
         Utf8Const*              extSignature;
+        constIndex              enclosingClassIndex;
+        constIndex              enclosingMethodIndex;
        unsigned int            packageLength;
        char*                   sourcefile;     /* source file name if known */
        accessFlags             accflags;
-        kaffeClassFlags         kFlags;
+        kaffeClassFlags         kFlags;        
 
        /* If non-NULL, a pointer to the superclass.
         * However, if state < CSTATE_DOING_PREPARE, then
@@ -698,6 +700,7 @@
 extern Utf8Const* InnerClasses_name;   /* "InnerClasses" */
 extern Utf8Const* Signature_name;       /* "Signature" */
 extern Utf8Const* Synthetic_name;       /* "Synthetic" */
+extern Utf8Const* EnclosingMethod_name;  /* "EnclosingMethod" */
 
 void initialiseSecurity (void);
 
===================================================================
Checking out kaffe/kaffe/kaffevm/constants.h
RCS:  /home/cvs/kaffe/kaffe/kaffe/kaffevm/constants.h,v
VERS: 1.10
***************
--- /dev/null   Sun Aug  4 19:57:58 2002
+++ kaffe/kaffe/kaffevm/constants.h     Mon Apr 17 18:32:57 2006
@@ -0,0 +1,123 @@
+/*
+ * cnstants.h
+ * Manage constants.
+ *
+ * Copyright (c) 1996, 1997
+ *     Transvirtual Technologies, Inc.  All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution 
+ * of this file. 
+ */
+
+#ifndef __constant_h
+#define __constant_h
+
+#include "gtypes.h"
+
+/*
+ * Constant pool definitions.
+ */
+#define        CONSTANT_Class                  7
+#define        CONSTANT_Fieldref               9
+#define        CONSTANT_Methodref              10
+#define        CONSTANT_InterfaceMethodref     11
+#define        CONSTANT_String                 8
+#define        CONSTANT_Integer                3
+#define        CONSTANT_Float                  4
+#define        CONSTANT_Long                   5
+#define        CONSTANT_Double                 6
+#define        CONSTANT_NameAndType            12
+#define        CONSTANT_Utf8                   1
+#define        CONSTANT_Unicode                2
+
+#define        CONSTANT_Unknown                0
+#define        CONSTANT_Error                  0
+#define CONSTANT_ResolvedString                (16+CONSTANT_String)
+#define CONSTANT_ResolvedClass         (16+CONSTANT_Class)
+#define CONSTANT_ResolvedMethod         (16+CONSTANT_NameAndType)
+
+#define WORDS_TO_LONG(HI, LO) (((uint64)(HI) << 32)|(uint64)(uint32)(LO))
+
+#define WORD2UTF(WORD) ((Utf8Const*) (WORD))
+
+typedef uintp ConstSlot;
+
+typedef struct _constants {
+       u4              size;
+       u1*             tags;
+       ConstSlot*      data;
+} constants;
+
+
+
+/*
+ * Macros to take constant pools apart.  XX prefix with CONST_
+ */
+#define CONST_TAG(idx, pool)                            (((idx) > 0 && (idx) < 
pool->size) ?  pool->tags[idx] : CONSTANT_Unknown)
+
+#define CLASS_CLASS(idx, pool)                          
((Hjava_lang_Class*)pool->data[idx])
+
+#define CLASS_NAME(idx, pool)                           
((uint16)pool->data[idx])
+#define CONST_STRING_NAME(idx, pool)                    CLASS_NAME(idx, pool)
+
+/* the actual character string pointed to by the data */
+#define UNRESOLVED_CLASS_NAMED(idx, pool)               
(WORD2UTF(pool->data[idx])->data)
+#define RESOLVED_CLASS_NAMED(idx, pool)                 ((CLASS_CLASS(idx, 
pool))->name->data)
+
+#define CLASS_NAMED(idx, pool)                          ((pool->tags[idx] == 
CONSTANT_ResolvedClass || pool->tags[idx] == CONSTANT_ResolvedString) ? 
RESOLVED_CLASS_NAMED(idx, pool) : UNRESOLVED_CLASS_NAMED(idx, pool))
+
+#define CONST_STRING_NAMED(idx, pool)                   CLASS_NAMED(idx, pool)
+
+
+#define FIELDREF_CLASS(idx, pool)                       
((uint16)pool->data[idx])
+#define METHODREF_CLASS(idx, pool)                      FIELDREF_CLASS(idx, 
pool)
+#define INTERFACEMETHODREF_CLASS(idx, pool)             FIELDREF_CLASS(idx, 
pool)
+
+#define FIELDREF_NAMEANDTYPE(idx, pool)                 
((uint16)(pool->data[idx] >> 16))
+#define METHODREF_NAMEANDTYPE(idx, pool)                
FIELDREF_NAMEANDTYPE(idx, pool)
+#define INTERFACEMETHODREF_NAMEANDTYPE(idx, pool)       
FIELDREF_NAMEANDTYPE(idx, pool)
+
+
+#define NAMEANDTYPE_NAME(idx, pool)                     
((uint16)pool->data[idx])
+#define NAMEANDTYPE_SIGNATURE(idx, pool)                
((uint16)(pool->data[idx] >> 16))
+
+/* the actual character string pointed to by the data */
+#define NAMEANDTYPE_NAMED(idx, pool)                    
(WORD2UTF(pool->data[NAMEANDTYPE_NAME(idx, pool)])->data)
+#define NAMEANDTYPE_SIGD(idx, pool)                     
(WORD2UTF(pool->data[NAMEANDTYPE_SIGNATURE(idx, pool)])->data)
+
+
+#define FIELDREF_NAME(idx, pool)                        
NAMEANDTYPE_NAME(FIELDREF_NAMEANDTYPE(idx, pool), pool)
+#define METHODREF_NAME(idx, pool)                       FIELDREF_NAME(idx, 
pool)
+#define INTERFACEMETHODREF_NAME(idx, pool)              FIELDREF_NAME(idx, 
pool)
+
+/* the actual character string pointed to by the data */
+#define FIELDREF_NAMED(idx, pool)                       
(WORD2UTF(pool->data[FIELDREF_NAME(idx, pool)])->data)
+#define METHODREF_NAMED(idx, pool)                      FIELDREF_NAMED(idx, 
pool)
+#define INTERFACEMETHODREF_NAMED(idx, pool)             FIELDREF_NAMED(idx, 
pool)
+
+#define FIELDREF_SIGNATURE(idx, pool)                   
NAMEANDTYPE_SIGNATURE(FIELDREF_NAMEANDTYPE(idx, pool), pool)
+#define METHODREF_SIGNATURE(idx, pool)                  
FIELDREF_SIGNATURE(idx, pool)
+#define INTERFACEMETHODREF_SIGNATURE(idx, pool)         
FIELDREF_SIGNATURE(idx, pool)
+
+/* aliases...make more sense in certain situations, like type checking */
+#define FIELDREF_TYPE(idx, pool)                        
FIELDREF_SIGNATURE(idx, pool)
+#define METHODREF_TYPE(idx, pool)                       FIELDREF_TYPE(idx, 
pool)
+#define INTERFACEMETHODREF_TYPE(idx, pool)              FIELDREF_TYPE(idx, 
pool)
+
+/* the actual character string pointed to by the data */
+#define FIELDREF_SIGD(idx, pool)                        
(WORD2UTF(pool->data[FIELDREF_SIGNATURE(idx, pool)])->data)
+#define METHODREF_SIGD(idx, pool)                       FIELDREF_SIGD(idx, 
pool)
+#define INTERFACEMETHODREF_SIGD(idx, pool)              FIELDREF_SIGD(idx, 
pool)
+
+
+#define CONST_UTF2CHAR(idx, pool)                       ((pool->data[idx] != 
0) ? (((Utf8Const*)pool->data[idx])->data) : "")
+
+
+
+struct classFile;
+struct _errorInfo;
+struct Hjava_lang_Class;
+
+extern bool readConstantPool(struct Hjava_lang_Class*, struct classFile*, 
struct _errorInfo*);
+
+#endif
Index: kaffe/kaffe/kaffevm/lookup.c
diff -u kaffe/kaffe/kaffevm/lookup.c:1.48 kaffe/kaffe/kaffevm/lookup.c:1.49
--- kaffe/kaffe/kaffevm/lookup.c:1.48   Sun Mar 19 16:16:21 2006
+++ kaffe/kaffe/kaffevm/lookup.c        Mon Apr 17 17:57:07 2006
@@ -58,16 +58,29 @@
        call->cname = NULL;
 
        pool = CLASS_CONSTANTS(this);
+       if (idx >= CLASS_CONST_SIZE(this))
+         {
+           postExceptionMessage(einfo, JAVA_LANG(ClassFormatError), "invalid 
method name index");
+           return false;
+         }
+
        if (pool->tags[idx] != CONSTANT_Methodref &&
            pool->tags[idx] != CONSTANT_InterfaceMethodref) {
 DBG(RESERROR,  dprintf("No Methodref found for idx=%d\n", idx);        );
                /* shouldn't that be ClassFormatError or something? */
                postExceptionMessage(einfo, JAVA_LANG(NoSuchMethodError),
-                       "method name unknown, tag = %d", pool->tags[idx]);
+                       "method name unknown, tag = %d",  pool->tags[idx]);
                 return (false);
        }
 
        ni = METHODREF_NAMEANDTYPE(idx, pool);
+       if (ni >= CLASS_CONST_SIZE(this))
+         {
+           postExceptionMessage(einfo, JAVA_LANG(ClassFormatError),
+                                "invalid method name index");
+           return false;
+         }
+
        name = WORD2UTF(pool->data[NAMEANDTYPE_NAME(ni, pool)]);
        sig = WORD2UTF(pool->data[NAMEANDTYPE_SIGNATURE(ni, pool)]);
 
@@ -157,6 +170,13 @@
        int tag;
 
        pool = CLASS_CONSTANTS(this);
+
+       if (idx >= CLASS_CONST_SIZE(this))
+         {
+           postExceptionMessage(einfo, JAVA_LANG(ClassFormatError),
+                                "invalid class name index");
+           return NULL;
+         }
 
        tag = pool->tags[idx];
 
Index: kaffe/kaffe/kaffevm/readClass.c
diff -u kaffe/kaffe/kaffevm/readClass.c:1.27 
kaffe/kaffe/kaffevm/readClass.c:1.28
--- kaffe/kaffe/kaffevm/readClass.c:1.27        Thu Apr  6 03:29:51 2006
+++ kaffe/kaffe/kaffevm/readClass.c     Mon Apr 17 17:57:07 2006
@@ -203,8 +203,9 @@
   constants* pool;
   
   pool = CLASS_CONSTANTS (this);
-  
-  if (pool->tags[idx] != CONSTANT_Utf8) {
+
+  if (idx >= CLASS_CONST_SIZE (this) ||
+      pool->tags[idx] != CONSTANT_Utf8) {
     postExceptionMessage(einfo, JAVA_LANG(ClassFormatError),
                         "invalid signature index: %d",
                         idx);
@@ -214,6 +215,36 @@
   *signature = WORD2UTF (pool->data[idx]);
   return true;
 }
+
+static bool
+readEnclosingMethodAttribute(classFile *fp, u4 len, Hjava_lang_Class* this, 
errorInfo *einfo)
+{
+  u2 class_index, method_index;
+
+  if (len != 4)
+    {
+      postExceptionMessage(einfo, JAVA_LANG(ClassFormatError),
+                          "invalid attribute size for %s",
+                          CLASS_CNAME(this));
+      return false;
+    }
+
+  readu2(&class_index, fp);
+  readu2(&method_index, fp);  
+
+  if (class_index >= CLASS_CONST_SIZE(this) || method_index >= 
CLASS_CONST_SIZE(this))
+    {
+      postExceptionMessage(einfo, JAVA_LANG(ClassFormatError),
+                          "invalid constant index for %s",
+                          CLASS_CNAME(this));
+      return false;
+    }
+
+  this->enclosingClassIndex = class_index;
+  this->enclosingMethodIndex = method_index;
+
+  return true;
+}
 #endif /* !defined(KAFFEH) */
 
 /*
@@ -306,6 +337,10 @@
                                }
                        }
 #if !defined(KAFFEH)
+                       else if (utf8ConstEqual(name, EnclosingMethod_name) && 
thingType == READATTR_CLASS) {
+                         if (!readEnclosingMethodAttribute(fp, len, (struct 
Hjava_lang_Class*)thing, einfo))
+                           return false;
+                       }
                        else if (utf8ConstEqual(name, Synthetic_name)) {
                          switch (thingType)
                            {
Index: kaffe/kaffe/kaffevm/reflect.c
diff -u kaffe/kaffe/kaffevm/reflect.c:1.3 kaffe/kaffe/kaffevm/reflect.c:1.4
--- kaffe/kaffe/kaffevm/reflect.c:1.3   Mon May 30 21:16:03 2005
+++ kaffe/kaffe/kaffevm/reflect.c       Mon Apr 17 17:57:08 2006
@@ -133,7 +133,7 @@
        meth = (Hjava_lang_reflect_Method*)
            AllocObject("java/lang/reflect/Method", NULL);
 
-       unhand(meth)->clazz = clazz;
+       unhand(meth)->declaringClass = clazz;
        unhand(meth)->slot = slot;
        unhand(meth)->name = checkPtr(utf8Const2Java(mth->name));
        unhand(meth)->parameterTypes = makeParameters(mth);
Index: kaffe/kaffe/kaffevm/jni/jni-helpers.c
diff -u kaffe/kaffe/kaffevm/jni/jni-helpers.c:1.12 
kaffe/kaffe/kaffevm/jni/jni-helpers.c:1.13
--- kaffe/kaffe/kaffevm/jni/jni-helpers.c:1.12  Tue Dec 20 02:43:31 2005
+++ kaffe/kaffe/kaffevm/jni/jni-helpers.c       Mon Apr 17 17:57:08 2006
@@ -116,7 +116,7 @@
   method_local = unveil(method);
   realMethod = (Hjava_lang_reflect_Method *)method_local;
 
-  id = (jmethodID) 
&(unhand(realMethod)->clazz->methods[unhand(realMethod)->slot]);
+  id = (jmethodID) 
&(unhand(realMethod)->declaringClass->methods[unhand(realMethod)->slot]);
 
   END_EXCEPTION_HANDLING();
 
Index: kaffe/libraries/clib/native/Class.c
diff -u kaffe/libraries/clib/native/Class.c:1.90 
kaffe/libraries/clib/native/Class.c:1.91
--- kaffe/libraries/clib/native/Class.c:1.90    Thu Mar 30 17:39:18 2006
+++ kaffe/libraries/clib/native/Class.c Mon Apr 17 17:57:08 2006
@@ -39,7 +39,7 @@
  * Convert string name to class object.
  */
 struct Hjava_lang_Class*
-java_lang_VMClass_forName0(struct Hjava_lang_String* str, struct 
Hjava_lang_ClassLoader* loader)
+java_lang_VMClass_forName(struct Hjava_lang_String* str, jboolean initialize, 
struct Hjava_lang_ClassLoader* loader)
 {
        errorInfo einfo;
        Hjava_lang_Class* clazz;
@@ -111,7 +111,7 @@
         * was introduced in 1.2, presumably for the convenience of
         * programs such as stub compilers.
         */
-       if (processClass(clazz, CSTATE_COMPLETE, &einfo) == false) {
+       if (initialize && processClass(clazz, CSTATE_COMPLETE, &einfo) == 
false) {
                throwError(&einfo);
        }
        return (clazz);
@@ -526,13 +526,184 @@
        throwExternalException(throwable);
 }
 
+jboolean
+java_lang_VMClass_isSynthetic (struct Hjava_lang_Class* klass)
+{
+  return (klass->accflags & ACC_SYNTHETIC) != 0;
+}
 
+jboolean
+java_lang_VMClass_isEnum(struct Hjava_lang_Class* klass)
+{
+  return (klass->accflags & ACC_ENUM) != 0;
+}
 
-void
-java_lang_VMClass_checkAccess (struct Hjava_lang_Class *clazz,
-                               struct Hjava_lang_Class *caller,
-                               jint flags)
+struct Hjava_lang_Class*
+java_lang_VMClass_getEnclosingClass(struct Hjava_lang_Class* klass)
 {
-       if (checkAccess (caller, clazz, flags) == 0)
-               SignalError (JAVA_LANG(IllegalAccessException), NULL);
+  errorInfo einfo;
+  struct Hjava_lang_Class *enclosing;
+
+  if (klass->enclosingClassIndex == 0)
+    return NULL;
+
+  enclosing = getClass(klass->enclosingClassIndex, klass, &einfo);
+  if (enclosing == NULL)
+    discardErrorInfo(&einfo);
+
+  return enclosing;
+}
+
+struct Hjava_lang_reflect_Constructor*
+java_lang_VMClass_getEnclosingConstructor(struct Hjava_lang_Class* klass)
+{
+  errorInfo einfo;
+  constants *pool;
+  constIndex emi = klass->enclosingMethodIndex;
+  constIndex eci = klass->enclosingClassIndex;
+  constIndex ni;
+  Utf8Const *name, *sig;
+  Hjava_lang_Class *enclosingClass;
+  Method *method;
+  int methodSlot;
+
+  if (emi == 0)
+    return NULL;
+
+  pool = CLASS_CONSTANTS (klass);
+
+  enclosingClass = getClass(eci, klass, &einfo);
+  if (enclosingClass == NULL)
+    {
+      discardErrorInfo(&einfo);
+      return NULL;
+    }
+  
+  switch (pool->tags[emi])
+    {
+    case CONSTANT_Methodref:
+      ni = METHODREF_NAMEANDTYPE(emi, pool);
+      name = WORD2UTF(pool->data[NAMEANDTYPE_NAME(ni, pool)]);
+      sig = WORD2UTF(pool->data[NAMEANDTYPE_SIGNATURE(ni, pool)]);
+      method = findMethodLocal(enclosingClass, name, sig);
+      if (method != NULL)
+       {
+         lockClass (klass);
+         if (pool->tags[emi] != CONSTANT_ResolvedMethod)
+           {
+             pool->tags[emi] = CONSTANT_ResolvedMethod;

*** Patch too long, truncated ***

_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe

Reply via email to