A new development snapshot. I made many changes (way too many) since the last snapshot. The diff was over 13,000 lines (and I had already checked in part of the changes).
This is an important step towards 1.0, but there is still much to be done.
BTW, Eclipse 3.0 starts up with this version, but that's pretty much it, it doesn't do anything useful yet.
- Changed version numbers to 0.9.* (I'm using a Linux kernel version scheme, even numbers are used for releases, odd numbers are used during development.)
- Resynchronized with GNU Classpath cvs.
- Made String.compareTo(Object) redirect to my own implementation instead of System.String.CompareTo (including when the method is invoked through the java.lang.Comparable interface, which is still remapped to System.IComparable).
- Fixed exception remapping handling of java.lang.ExceptionInInitializer.
- Added dummy (but safe) implementations of getHostAddress and hostsEqual to ikvmres protocol handler.
- Removed work around for Classpath serialization bug from Throwable cause serialization. The state of whether the cause was set is now properly serialized.
- Fixed deserialization of exceptions serialized with pre-1.4 JDKs.
- Fixed integer overflow bugs in the various argument tests in the String(byte, ...) constructors.
- Added missing argument check to String.startsWith(String prefix, int offset).
- Added -Xbreak option to ikvm, to fire the debugger on startup.
- Added support for automatically generating build and revision numbers to ikvmc (e.g. -version:0.9.*)
- Fixed ikvmstub bug that caused invalid max_locals to be set in constructor definitions if the constructor took long or double arguments.
- Fixed visibility handling of nested types. A public nested type nested inside a non-public type was incorrectly treated as public.
- Fixed reflection bug. Statically compiled classes had private methods incorrectly reported as final.
- Fixed method override resolver bug. Having a private final method in a base class with a similar name/signature as a virtual method in the subclass caused a VerifyError (which was presented as a critical failure).
- Fixed another method override resolver bug. Only interfaces implemented by direct base class were searched, not those implemented by all base classes.
- Added workaround for deserializing incorrectly serialized java.lang.String objects (strings are supposed to be special cased by serialization, but if you manually construct a serialization stream that contains a TC_OBJECT of class java.lang.String, previously you'd get a weird exception.)
- Added (untested) implementation of VMAccessController.
- Fixed small compiler bug. Ldarg/Starg instruction was emitted with int argument, instead of short. This caused two bogus nops in the CIL stream to follow each Ldarg/Starg instruction (in exceptional cases).
- Fixed Tracer to handle messages without formatting characters.
- Fixed lame typo in JVM.CompilerClassLoader.EmitRedirect. (Call to Debug.CompareTo(...) instead of System.Diagnostics.Debug.Assert(...)).
- Added nonvirtualAlternateBody support to map.xml parser.
- Added nonvirtualAlternateBody to map.xml for java.lang.Object.toString().
- Added exceptionBlock support to map.xml parser.
- Added exception handler to map.xml for java.lang.ThreadDeath exception mapping code, to catch ThreadStateException if Thread.Abort is called while it isn't required.
- Removed unnecessary path name check from FileChannelImpl.open().
- Removed VMFile.demangle(). Normalization is now part of Classpath java.io.File.
- Added exception handling to VMFile.isHidden().
- Added VMFile.toCanonicalForm(). Now used by Classpath java.io.File.getCanonicalPath().
- Added protection domain support to VMClass.createClass().
- Removed VMClass.loadBootstrapClass().
- Removed unused deprecated version of VMClassLoader.defineClass().
- Added bootstrap classloader resource support to VMClassLoader.
- Implemented VMClassLoader.getSystemClassLoader() in VMClassLoader. The system classloader is now always available, not just if the application was started with ikvm.exe.
- Added app.config appSettings support to VMRuntime.insertSystemProperties(). Java properties can now be specified in your .NET application .config file:
<add key="ikvm:<propertyname>" value="<propertyvalue>" />
- In VMThread, removed cleanupDataStoreSlot static and always do lookup of the LocalDataStoreSlot by name, to handle scenario where the IKVM main thread is the first one to lookup the LocalDataStoreSlot (and previously that would cause the static initializer of VMThread to fail, because AllocateNamedDataSlot would fail, as the name was already in use).
- Fixed Field.checkAccess() when caller is a global method.
- Removed ExtClassLoader and AppClassLoader from starter.cs (ikvm.exe).
- Added hack to set the priority of the ikvmdump.exe writing thread to AboveNormal, to deal with a spinning thread in Eclipse on shutdown.
- Don't add CLASSPATH to java.class.path is the -jar option is specified.
- Removed support for DLLs in the bootclasspath.
- Fixed exception handling compilation options for IKVM.JNI.CLR-Win32 in clr-win32.build.
- Major rewrite of local and global ref support in Win32 JNI provider.
- Implemented most of the remaining JNI functions in Win32 JNI provider.
- Fixed class file parser to disallow native constructors.
- Rewrote class loading and method/field linking in ClassFile.cs.
- Fixed most of the thread safety issues in class loading/reflection.
- The runtime no longer throws Java exceptions, instead it throws its own exception, which are converted to Java exceptions at the runtime/Java boundaries. This makes ikvmc compilation of Classpath more robust (previously, if an exception required by the runtime was missing, it would often result in infinite recursion).
- Simplified MethodDescriptor. It is now only a name/signature tuple.
- MethodWrapper now uses virtual methods instead of delegates to emit call/callvirt/newobj sequences.
- Major rewrite of method resolving/linking and MethodWrapper infrastructure. Loader constraints are now properly enforced and LinkageErrors are thrown in the right places at the right times.
- Renamed HideFromReflectionAttribute to HideFromJavaAttribute and made the semantics consistent. It now means that the method is totally invisible from Java (either through reflection or statically). The new MirandaMethodAttribute signals that a method is invisible from reflection, but callable by Java byte code.
- Added new NameSigAttribute that is used to recover the original method name or signature when a method name is mangled or when a signature is changed in such a way that at runtime the original signature cannot be reconstructed anymore.
- Fixed TypeWrapper.IsInSamePackage() to understand that a package with the same name but in different assemblies, really isn't the same package.
- Fixed ininst instruction in map.xml. Now works the same for Java and .NET types.
I'm sure I forgot many changes/fixes. This change set was just too large. I promise to check in more frequently in future
New snapshots: just the binaries and source plus binaries.