ikvm-commit Mailing List for IKVM.NET (Page 230)
Brought to you by:
jfrijters
You can subscribe to this list here.
2007 |
Jan
(25) |
Feb
(22) |
Mar
(32) |
Apr
(77) |
May
(111) |
Jun
(129) |
Jul
(223) |
Aug
(109) |
Sep
(60) |
Oct
(60) |
Nov
(36) |
Dec
(55) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(23) |
Feb
(76) |
Mar
(42) |
Apr
(49) |
May
(33) |
Jun
(64) |
Jul
(19) |
Aug
(124) |
Sep
(16) |
Oct
|
Nov
(87) |
Dec
(54) |
2009 |
Jan
(53) |
Feb
(116) |
Mar
(86) |
Apr
(64) |
May
(101) |
Jun
(99) |
Jul
(105) |
Aug
(63) |
Sep
(20) |
Oct
(110) |
Nov
(102) |
Dec
(36) |
2010 |
Jan
(87) |
Feb
(67) |
Mar
(5) |
Apr
(100) |
May
(178) |
Jun
(95) |
Jul
(22) |
Aug
(85) |
Sep
(82) |
Oct
(99) |
Nov
(119) |
Dec
(132) |
2011 |
Jan
(130) |
Feb
(18) |
Mar
(114) |
Apr
(8) |
May
(21) |
Jun
(53) |
Jul
(127) |
Aug
(111) |
Sep
(29) |
Oct
(28) |
Nov
(64) |
Dec
(94) |
2012 |
Jan
(56) |
Feb
(8) |
Mar
(65) |
Apr
(48) |
May
(22) |
Jun
(52) |
Jul
(73) |
Aug
(38) |
Sep
(18) |
Oct
(59) |
Nov
(16) |
Dec
(21) |
2013 |
Jan
(83) |
Feb
(151) |
Mar
(102) |
Apr
(13) |
May
(37) |
Jun
(1) |
Jul
(7) |
Aug
(42) |
Sep
(28) |
Oct
(13) |
Nov
(5) |
Dec
(3) |
2014 |
Jan
(3) |
Feb
(39) |
Mar
(11) |
Apr
(40) |
May
(62) |
Jun
(54) |
Jul
(21) |
Aug
(3) |
Sep
|
Oct
(15) |
Nov
(26) |
Dec
(7) |
2015 |
Jan
(6) |
Feb
(12) |
Mar
(51) |
Apr
(15) |
May
(7) |
Jun
(41) |
Jul
(2) |
Aug
(8) |
Sep
(5) |
Oct
(6) |
Nov
(11) |
Dec
(1) |
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
(19) |
Aug
(2) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jeroen F. <jfr...@us...> - 2007-03-11 14:14:59
|
Update of /cvsroot/ikvm/ikvm/classpath/ikvm/lang In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10983/classpath/ikvm/lang Added Files: IterableEnumerator.java Log Message: Implemented support in ikvmc to automatically add an implementation of IDisposable or IEnumerable to classes that implement java.io.Closeable or java.lang.Iterable. --- NEW FILE: IterableEnumerator.java --- /* Copyright (C) 2007 Jeroen Frijters This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jeroen Frijters je...@fr... */ package ikvm.lang; import cli.System.Collections.IEnumerator; import cli.System.InvalidOperationException; import java.util.Iterator; public final class IterableEnumerator implements IEnumerator { private static final Object UNDEFINED = new Object(); private final Iterable src; private Iterator iter; private Object current; public IterableEnumerator(Iterable src) { this.src = src; Reset(); } public boolean MoveNext() { if (iter.hasNext()) { current = iter.next(); return true; } current = UNDEFINED; return false; } public Object get_Current() { if (current == UNDEFINED) { // HACK we abuse Thread.stop() to throw a checked exception Thread.currentThread().stop(new InvalidOperationException()); } return current; } public void Reset() { iter = src.iterator(); current = UNDEFINED; } } |
From: Jeroen F. <jfr...@us...> - 2007-03-11 14:14:59
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10983/runtime Modified Files: TypeWrapper.cs Log Message: Implemented support in ikvmc to automatically add an implementation of IDisposable or IEnumerable to classes that implement java.io.Closeable or java.lang.Iterable. Index: TypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/TypeWrapper.cs,v retrieving revision 1.162 retrieving revision 1.163 diff -C2 -d -r1.162 -r1.163 *** TypeWrapper.cs 8 Mar 2007 07:42:27 -0000 1.162 --- TypeWrapper.cs 11 Mar 2007 14:14:54 -0000 1.163 *************** *** 3717,3721 **** } } - ImplementInterfaces(wrapper.Interfaces, new ArrayList()); #if STATIC_COMPILER if(outer == null && mangledTypeName != wrapper.Name) --- 3717,3720 ---- *************** *** 3864,3888 **** } - private void ImplementInterfaces(TypeWrapper[] interfaces, ArrayList interfaceList) - { - foreach(TypeWrapper iface in interfaces) - { - if(!interfaceList.Contains(iface)) - { - interfaceList.Add(iface); - // skip interfaces that don't really exist - // (e.g. delegate "Method" and attribute "Annotation" inner interfaces) - if(!iface.IsDynamicOnly) - { - // NOTE we're using TypeAsBaseType for the interfaces! - typeBuilder.AddInterfaceImplementation(iface.TypeAsBaseType); - } - // NOTE we're recursively "implementing" all interfaces that we inherit from the interfaces we implement. - // The C# compiler also does this and the Compact Framework requires it. - ImplementInterfaces(iface.Interfaces, interfaceList); - } - } - } - private ClassFile.InnerClass getOuterClass() { --- 3863,3866 ---- *************** *** 4736,4739 **** --- 4714,4721 ---- } } + + // add all interfaces that we implement (including the magic ones) and handle ghost conversions + ImplementInterfaces(wrapper.Interfaces, new ArrayList()); + // NOTE non-final fields aren't allowed in interfaces so we don't have to initialize constant fields if(!classFile.IsInterface) *************** *** 4789,4808 **** for(int i = 0; i < interfaces.Length; i++) { - #if STATIC_COMPILER - // if we implement a ghost interface, add an implicit conversion to the ghost reference value type - // TODO do this for indirectly implemented interfaces (interfaces implemented by interfaces) as well - if(interfaces[i].IsGhost && wrapper.IsPublic) - { - MethodBuilder mb = typeBuilder.DefineMethod("op_Implicit", MethodAttributes.HideBySig | MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.SpecialName, interfaces[i].TypeAsSignatureType, new Type[] { wrapper.TypeAsSignatureType }); - ILGenerator ilgen = mb.GetILGenerator(); - LocalBuilder local = ilgen.DeclareLocal(interfaces[i].TypeAsSignatureType); - ilgen.Emit(OpCodes.Ldloca, local); - ilgen.Emit(OpCodes.Ldarg_0); - ilgen.Emit(OpCodes.Stfld, interfaces[i].GhostRefField); - ilgen.Emit(OpCodes.Ldloca, local); - ilgen.Emit(OpCodes.Ldobj, interfaces[i].TypeAsSignatureType); - ilgen.Emit(OpCodes.Ret); - } - #endif interfaces[i].ImplementInterfaceMethodStubs(typeBuilder, wrapper, doneSet); } --- 4771,4774 ---- *************** *** 5010,5013 **** --- 4976,5052 ---- } + private void ImplementInterfaces(TypeWrapper[] interfaces, ArrayList interfaceList) + { + foreach (TypeWrapper iface in interfaces) + { + if (!interfaceList.Contains(iface)) + { + interfaceList.Add(iface); + // skip interfaces that don't really exist + // (e.g. delegate "Method" and attribute "Annotation" inner interfaces) + if (!iface.IsDynamicOnly) + { + // NOTE we're using TypeAsBaseType for the interfaces! + typeBuilder.AddInterfaceImplementation(iface.TypeAsBaseType); + } + #if STATIC_COMPILER + if (!wrapper.IsInterface) + { + // look for "magic" interfaces that imply a .NET interface + if (iface.GetClassLoader() == CoreClasses.java.lang.Object.Wrapper.GetClassLoader()) + { + if (iface.Name == "java.lang.Iterable" + && !wrapper.ImplementsInterface(ClassLoaderWrapper.GetWrapperFromType(typeof(IEnumerable)))) + { + TypeWrapper enumeratorType = ClassLoaderWrapper.GetBootstrapClassLoader().LoadClassByDottedNameFast("ikvm.lang.IterableEnumerator"); + if (enumeratorType != null) + { + typeBuilder.AddInterfaceImplementation(typeof(IEnumerable)); + MethodBuilder mb = typeBuilder.DefineMethod("__<>GetEnumerator", MethodAttributes.Private | MethodAttributes.Virtual | MethodAttributes.NewSlot | MethodAttributes.Final | MethodAttributes.SpecialName, typeof(IEnumerator), Type.EmptyTypes); + typeBuilder.DefineMethodOverride(mb, typeof(IEnumerable).GetMethod("GetEnumerator")); + ILGenerator ilgen = mb.GetILGenerator(); + ilgen.Emit(OpCodes.Ldarg_0); + MethodWrapper mw = enumeratorType.GetMethodWrapper("<init>", "(Ljava.lang.Iterable;)V", false); + mw.Link(); + mw.EmitNewobj(ilgen); + ilgen.Emit(OpCodes.Ret); + } + } + else if (iface.Name == "java.io.Closeable" + && !wrapper.ImplementsInterface(ClassLoaderWrapper.GetWrapperFromType(typeof(IDisposable)))) + { + typeBuilder.AddInterfaceImplementation(typeof(IDisposable)); + MethodBuilder mb = typeBuilder.DefineMethod("__<>Dispose", MethodAttributes.Private | MethodAttributes.Virtual | MethodAttributes.NewSlot | MethodAttributes.Final | MethodAttributes.SpecialName, typeof(void), Type.EmptyTypes); + typeBuilder.DefineMethodOverride(mb, typeof(IDisposable).GetMethod("Dispose")); + ILGenerator ilgen = mb.GetILGenerator(); + ilgen.Emit(OpCodes.Ldarg_0); + MethodWrapper mw = iface.GetMethodWrapper("close", "()V", false); + mw.Link(); + mw.EmitCallvirt(ilgen); + ilgen.Emit(OpCodes.Ret); + } + } + // if we implement a ghost interface, add an implicit conversion to the ghost reference value type + if(iface.IsGhost && wrapper.IsPublic) + { + MethodBuilder mb = typeBuilder.DefineMethod("op_Implicit", MethodAttributes.HideBySig | MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.SpecialName, iface.TypeAsSignatureType, new Type[] { wrapper.TypeAsSignatureType }); + ILGenerator ilgen = mb.GetILGenerator(); + LocalBuilder local = ilgen.DeclareLocal(iface.TypeAsSignatureType); + ilgen.Emit(OpCodes.Ldloca, local); + ilgen.Emit(OpCodes.Ldarg_0); + ilgen.Emit(OpCodes.Stfld, iface.GhostRefField); + ilgen.Emit(OpCodes.Ldloca, local); + ilgen.Emit(OpCodes.Ldobj, iface.TypeAsSignatureType); + ilgen.Emit(OpCodes.Ret); + } + } + #endif // STATIC_COMPILER + // NOTE we're recursively "implementing" all interfaces that we inherit from the interfaces we implement. + // The C# compiler also does this and the Compact Framework requires it. + ImplementInterfaces(iface.Interfaces, interfaceList); + } + } + } + private void AddUnsupportedAbstractMethods() { |
From: Jeroen F. <jfr...@us...> - 2007-03-11 14:14:58
|
Update of /cvsroot/ikvm/ikvm/classpath In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv10983/classpath Modified Files: allsources.lst vm.lst Log Message: Implemented support in ikvmc to automatically add an implementation of IDisposable or IEnumerable to classes that implement java.io.Closeable or java.lang.Iterable. Index: allsources.lst =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/allsources.lst,v retrieving revision 1.173 retrieving revision 1.174 diff -C2 -d -r1.173 -r1.174 *** allsources.lst 5 Mar 2007 14:56:40 -0000 1.173 --- allsources.lst 11 Mar 2007 14:14:52 -0000 1.174 *************** *** 4994,4997 **** --- 4994,4998 ---- ikvm/lang/CIL.java ikvm/lang/Internal.java + ikvm/lang/IterableEnumerator.java ikvm/runtime/Startup.java ikvm/runtime/Util.java Index: vm.lst =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/vm.lst,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** vm.lst 5 Mar 2007 14:56:40 -0000 1.33 --- vm.lst 11 Mar 2007 14:14:54 -0000 1.34 *************** *** 50,53 **** --- 50,54 ---- ikvm/lang/CIL.java ikvm/lang/Internal.java + ikvm/lang/IterableEnumerator.java ikvm/runtime/Startup.java ikvm/runtime/Util.java |
From: Jeroen F. <jfr...@us...> - 2007-03-11 13:31:33
|
Update of /cvsroot/ikvm/ikvm/ikvmc In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26984 Modified Files: Compiler.cs Log Message: Added -time option to ikvmc. Index: Compiler.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/ikvmc/Compiler.cs,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** Compiler.cs 6 Jan 2007 07:11:25 -0000 1.64 --- Compiler.cs 11 Mar 2007 13:31:32 -0000 1.65 *************** *** 36,39 **** --- 36,40 ---- private static Hashtable classes = new Hashtable(); private static Hashtable resources = new Hashtable(); + private static bool time; private static ArrayList GetArgs(string[] args) *************** *** 63,69 **** static void Main(string[] args) { // FXBUG if we run a static initializer that starts a thread, we would never end, // so we force an exit here ! Environment.Exit(RealMain(args)); } --- 64,77 ---- static void Main(string[] args) { + DateTime start = DateTime.Now; + int rc = RealMain(args); + if (time) + { + Console.WriteLine("Total cpu time: {0}", System.Diagnostics.Process.GetCurrentProcess().TotalProcessorTime); + Console.WriteLine("Total wall clock time: {0}", DateTime.Now - start); + } // FXBUG if we run a static initializer that starts a thread, we would never end, // so we force an exit here ! Environment.Exit(rc); } *************** *** 158,161 **** --- 166,170 ---- Console.Error.WriteLine(" -nowarn:<warning[:key]> Suppress specified warnings"); Console.Error.WriteLine(" -warnaserror:<warning[:key]> Treat specified warnings as errors"); + Console.Error.WriteLine(" -time Display timing statistics"); return 1; } *************** *** 484,487 **** --- 493,500 ---- options.runtimeAssembly = s.Substring(9); } + else if(s == "-time") + { + time = true; + } else { |
From: Jeroen F. <jfr...@us...> - 2007-03-09 07:11:53
|
Update of /cvsroot/ikvm/ikvm/awt In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1969 Modified Files: toolkit.cs Log Message: Set AWT/WinForms thread as Background to stop it from keeping the process alive. Index: toolkit.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/awt/toolkit.cs,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** toolkit.cs 28 Jan 2007 09:57:28 -0000 1.50 --- toolkit.cs 9 Mar 2007 07:11:52 -0000 1.51 *************** *** 159,163 **** thread.ApartmentState = ApartmentState.STA; thread.Name = "IKVM AWT WinForms Message Loop"; ! //thread.IsBackground = true; thread.Start(); // TODO don't use polling... --- 159,163 ---- thread.ApartmentState = ApartmentState.STA; thread.Name = "IKVM AWT WinForms Message Loop"; ! thread.IsBackground = true; thread.Start(); // TODO don't use polling... |
From: Jeroen F. <jfr...@us...> - 2007-03-08 15:44:20
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6484 Modified Files: ByteCode.cs Log Message: Fix for bug #1676377 (reported by Dennis Ushakov) Index: ByteCode.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/ByteCode.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ByteCode.cs 20 Apr 2006 13:20:58 -0000 1.10 --- ByteCode.cs 8 Mar 2007 15:44:17 -0000 1.11 *************** *** 634,643 **** new ByteCodeMetaData(ByteCode.__fmul, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); new ByteCodeMetaData(ByteCode.__dmul, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); ! new ByteCodeMetaData(ByteCode.__idiv, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); ! new ByteCodeMetaData(ByteCode.__ldiv, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); new ByteCodeMetaData(ByteCode.__fdiv, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); new ByteCodeMetaData(ByteCode.__ddiv, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); ! new ByteCodeMetaData(ByteCode.__irem, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); ! new ByteCodeMetaData(ByteCode.__lrem, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); new ByteCodeMetaData(ByteCode.__frem, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); new ByteCodeMetaData(ByteCode.__drem, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); --- 634,643 ---- new ByteCodeMetaData(ByteCode.__fmul, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); new ByteCodeMetaData(ByteCode.__dmul, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); ! new ByteCodeMetaData(ByteCode.__idiv, ByteCodeMode.Simple, ByteCodeModeWide.Unused, false); ! new ByteCodeMetaData(ByteCode.__ldiv, ByteCodeMode.Simple, ByteCodeModeWide.Unused, false); new ByteCodeMetaData(ByteCode.__fdiv, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); new ByteCodeMetaData(ByteCode.__ddiv, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); ! new ByteCodeMetaData(ByteCode.__irem, ByteCodeMode.Simple, ByteCodeModeWide.Unused, false); ! new ByteCodeMetaData(ByteCode.__lrem, ByteCodeMode.Simple, ByteCodeModeWide.Unused, false); new ByteCodeMetaData(ByteCode.__frem, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); new ByteCodeMetaData(ByteCode.__drem, ByteCodeMode.Simple, ByteCodeModeWide.Unused, true); |
From: Jeroen F. <jfr...@us...> - 2007-03-08 07:42:35
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv17941/runtime Modified Files: TypeWrapper.cs Log Message: Fixed previous fix. Index: TypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/TypeWrapper.cs,v retrieving revision 1.161 retrieving revision 1.162 diff -C2 -d -r1.161 -r1.162 *** TypeWrapper.cs 7 Mar 2007 15:41:18 -0000 1.161 --- TypeWrapper.cs 8 Mar 2007 07:42:27 -0000 1.162 *************** *** 3717,3721 **** } } ! ImplementInterfaces(wrapper.Interfaces, null); #if STATIC_COMPILER if(outer == null && mangledTypeName != wrapper.Name) --- 3717,3721 ---- } } ! ImplementInterfaces(wrapper.Interfaces, new ArrayList()); #if STATIC_COMPILER if(outer == null && mangledTypeName != wrapper.Name) *************** *** 3868,3895 **** foreach(TypeWrapper iface in interfaces) { ! if(iface.IsDynamicOnly) { // skip interfaces that don't really exist // (e.g. delegate "Method" and attribute "Annotation" inner interfaces) ! } ! else if(interfaceList != null && interfaceList.Contains(iface)) ! { ! // we've already done this interface ! } ! else ! { ! // NOTE we're using TypeAsBaseType for the interfaces! ! typeBuilder.AddInterfaceImplementation(iface.TypeAsBaseType); ! } ! // NOTE we're recursively "implementing" all interfaces that we inherit from the interfaces we implement. ! // The C# compiler also does this and the Compact Framework requires it. ! TypeWrapper[] inheritedInterfaces = iface.Interfaces; ! if(inheritedInterfaces.Length > 0) ! { ! if(interfaceList == null) { ! interfaceList = new ArrayList(); } ! ImplementInterfaces(inheritedInterfaces, interfaceList); } } --- 3868,3884 ---- foreach(TypeWrapper iface in interfaces) { ! if(!interfaceList.Contains(iface)) { + interfaceList.Add(iface); // skip interfaces that don't really exist // (e.g. delegate "Method" and attribute "Annotation" inner interfaces) ! if(!iface.IsDynamicOnly) { ! // NOTE we're using TypeAsBaseType for the interfaces! ! typeBuilder.AddInterfaceImplementation(iface.TypeAsBaseType); } ! // NOTE we're recursively "implementing" all interfaces that we inherit from the interfaces we implement. ! // The C# compiler also does this and the Compact Framework requires it. ! ImplementInterfaces(iface.Interfaces, interfaceList); } } |
From: Jeroen F. <jfr...@us...> - 2007-03-07 15:41:23
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1067/runtime Modified Files: TypeWrapper.cs Log Message: Fixed interface implementation to recurse all the way up. Index: TypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/TypeWrapper.cs,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -d -r1.160 -r1.161 *** TypeWrapper.cs 5 Mar 2007 12:37:03 -0000 1.160 --- TypeWrapper.cs 7 Mar 2007 15:41:18 -0000 1.161 *************** *** 3717,3720 **** --- 3717,3721 ---- } } + ImplementInterfaces(wrapper.Interfaces, null); #if STATIC_COMPILER if(outer == null && mangledTypeName != wrapper.Name) *************** *** 3728,3772 **** ((CompilerClassLoader)wrapper.GetClassLoader()).AddNameMapping(wrapper.Name, typeBuilder.FullName); } - #endif // STATIC_COMPILER - ArrayList interfaceList = null; - TypeWrapper[] interfaces = wrapper.Interfaces; - for(int i = 0; i < interfaces.Length; i++) - { - // skip interfaces that don't really exist - // (e.g. delegate "Method" and attribute "Annotation" inner interfaces) - if(!interfaces[i].IsDynamicOnly) - { - // NOTE we're using TypeAsBaseType for the interfaces! - typeBuilder.AddInterfaceImplementation(interfaces[i].TypeAsBaseType); - } - // NOTE we're also "implementing" all interfaces that we inherit from the interfaces we implement. - // The C# compiler also does this and the Compact Framework requires it. - TypeWrapper[] inheritedInterfaces = interfaces[i].Interfaces; - if(inheritedInterfaces.Length > 0) - { - if(interfaceList == null) - { - interfaceList = new ArrayList(); - foreach(TypeWrapper tw1 in interfaces) - { - if(!tw1.IsDynamicOnly) - { - interfaceList.Add(tw1.TypeAsBaseType); - } - } - } - foreach(TypeWrapper tw in inheritedInterfaces) - { - if(!tw.IsDynamicOnly && !interfaceList.Contains(tw.TypeAsBaseType)) - { - interfaceList.Add(tw.TypeAsBaseType); - // NOTE we don't have to recurse upwards, because we assume that - // all interfaces follow this rule (of explicitly listed all of the base interfaces) - typeBuilder.AddInterfaceImplementation(tw.TypeAsBaseType); - } - } - } - } - #if STATIC_COMPILER string annotationAttributeType = null; if(f.IsAnnotation && Annotation.HasRetentionPolicyRuntime(f.Annotations)) --- 3729,3732 ---- *************** *** 3804,3807 **** --- 3764,3768 ---- } } + TypeWrapper[] interfaces = wrapper.Interfaces; string[] implements = new string[interfaces.Length]; for(int i = 0; i < implements.Length; i++) *************** *** 3903,3906 **** --- 3864,3899 ---- } + private void ImplementInterfaces(TypeWrapper[] interfaces, ArrayList interfaceList) + { + foreach(TypeWrapper iface in interfaces) + { + if(iface.IsDynamicOnly) + { + // skip interfaces that don't really exist + // (e.g. delegate "Method" and attribute "Annotation" inner interfaces) + } + else if(interfaceList != null && interfaceList.Contains(iface)) + { + // we've already done this interface + } + else + { + // NOTE we're using TypeAsBaseType for the interfaces! + typeBuilder.AddInterfaceImplementation(iface.TypeAsBaseType); + } + // NOTE we're recursively "implementing" all interfaces that we inherit from the interfaces we implement. + // The C# compiler also does this and the Compact Framework requires it. + TypeWrapper[] inheritedInterfaces = iface.Interfaces; + if(inheritedInterfaces.Length > 0) + { + if(interfaceList == null) + { + interfaceList = new ArrayList(); + } + ImplementInterfaces(inheritedInterfaces, interfaceList); + } + } + } + private ClassFile.InnerClass getOuterClass() { |
From: Jeroen F. <jfr...@us...> - 2007-03-07 07:54:37
|
Update of /cvsroot/ikvm/ikvm/classpath In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv31912 Modified Files: classpath.build Log Message: Changed mscorlib reference from path to partial name to work around build problem on x64 Index: classpath.build =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/classpath.build,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** classpath.build 15 Jan 2007 05:52:01 -0000 1.65 --- classpath.build 7 Mar 2007 07:54:34 -0000 1.66 *************** *** 50,54 **** <arg value="-recurse:${Classpath.dir}/resource/javax.*" /> <arg value="-recurse:${Classpath.dir}/resource/org.xml.*" /> ! <arg value="-r:${framework::get-assembly-directory(framework::get-target-framework())}/mscorlib.dll" /> <arg value="-r:${framework::get-assembly-directory(framework::get-target-framework())}/System.dll" /> <!-- --- 50,54 ---- <arg value="-recurse:${Classpath.dir}/resource/javax.*" /> <arg value="-recurse:${Classpath.dir}/resource/org.xml.*" /> ! <arg value="-r:mscorlib" /> <arg value="-r:${framework::get-assembly-directory(framework::get-target-framework())}/System.dll" /> <!-- |
From: Jeroen F. <jfr...@us...> - 2007-03-05 14:56:44
|
Update of /cvsroot/ikvm/ikvm/classpath/gnu/java/awt/peer In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26456/classpath/gnu/java/awt/peer Added Files: ClasspathDesktopPeer.java Log Message: Updated for current GNU Classpath cvs. --- NEW FILE: ClasspathDesktopPeer.java --- /* Copyright (C) 2007 Jeroen Frijters This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jeroen Frijters je...@fr... */ package gnu.java.awt.peer; // HACK this class exists solely to get ClasspathToolkit to compile, // which inexplicably decides to call this factory method instead // of leaving that to the subclasses. public class ClasspathDesktopPeer { public static java.awt.peer.DesktopPeer getDesktop() { throw new Error(); } } |
From: Jeroen F. <jfr...@us...> - 2007-03-05 14:56:42
|
Update of /cvsroot/ikvm/ikvm/classpath In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26456/classpath Modified Files: allsources.lst skip.lst vm.lst Log Message: Updated for current GNU Classpath cvs. Index: allsources.lst =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/allsources.lst,v retrieving revision 1.172 retrieving revision 1.173 diff -C2 -d -r1.172 -r1.173 *** allsources.lst 1 Feb 2007 08:35:04 -0000 1.172 --- allsources.lst 5 Mar 2007 14:56:40 -0000 1.173 *************** *** 261,265 **** ../../classpath/gnu/classpath/debug/TeeReader.java ../../classpath/gnu/classpath/debug/TeeWriter.java - ../../classpath/gnu/classpath/ListenerData.java ../../classpath/gnu/classpath/NotImplementedException.java ../../classpath/gnu/classpath/Pair.java --- 261,264 ---- *************** *** 435,438 **** --- 434,438 ---- ../../classpath/gnu/java/awt/BitwiseXORComposite.java ../../classpath/gnu/java/awt/Buffers.java + ../../classpath/gnu/java/awt/ClasspathGraphicsEnvironment.java ../../classpath/gnu/java/awt/ClasspathToolkit.java ../../classpath/gnu/java/awt/color/CieXyzConverter.java *************** *** 1025,1028 **** --- 1025,1029 ---- ../../classpath/gnu/java/util/regex/UncheckedRE.java ../../classpath/gnu/java/util/WeakIdentityHashMap.java + ../../classpath/gnu/java/util/ZoneInfo.java ../../classpath/gnu/javax/crypto/assembly/Assembly.java ../../classpath/gnu/javax/crypto/assembly/Cascade.java *************** *** 1356,1360 **** --- 1357,1363 ---- ../../classpath/gnu/javax/imageio/png/PNGPhys.java ../../classpath/gnu/javax/imageio/png/PNGTime.java + ../../classpath/gnu/javax/management/ListenerData.java ../../classpath/gnu/javax/management/Server.java + ../../classpath/gnu/javax/management/Translator.java ../../classpath/gnu/javax/naming/giop/ContextContinuation.java ../../classpath/gnu/javax/naming/giop/CorbalocParser.java *************** *** 2054,2057 **** --- 2057,2061 ---- ../../classpath/java/awt/DefaultFocusTraversalPolicy.java ../../classpath/java/awt/DefaultKeyboardFocusManager.java + ../../classpath/java/awt/Desktop.java ../../classpath/java/awt/Dialog.java ../../classpath/java/awt/Dimension.java *************** *** 2281,2284 **** --- 2285,2289 ---- ../../classpath/java/awt/peer/ComponentPeer.java ../../classpath/java/awt/peer/ContainerPeer.java + ../../classpath/java/awt/peer/DesktopPeer.java ../../classpath/java/awt/peer/DialogPeer.java ../../classpath/java/awt/peer/FileDialogPeer.java *************** *** 3297,3300 **** --- 3302,3308 ---- ../../classpath/javax/management/BadStringOperationException.java ../../classpath/javax/management/DefaultLoaderRepository.java + ../../classpath/javax/management/Descriptor.java + ../../classpath/javax/management/DescriptorAccess.java + ../../classpath/javax/management/DescriptorRead.java ../../classpath/javax/management/DynamicMBean.java ../../classpath/javax/management/InstanceAlreadyExistsException.java *************** *** 3305,3308 **** --- 3313,3317 ---- ../../classpath/javax/management/JMException.java ../../classpath/javax/management/JMRuntimeException.java + ../../classpath/javax/management/JMX.java ../../classpath/javax/management/ListenerNotFoundException.java ../../classpath/javax/management/loading/ClassLoaderRepository.java *************** *** 3325,3331 **** --- 3334,3342 ---- ../../classpath/javax/management/MBeanServerDelegateMBean.java ../../classpath/javax/management/MBeanServerFactory.java + ../../classpath/javax/management/MBeanServerInvocationHandler.java ../../classpath/javax/management/MBeanServerNotification.java ../../classpath/javax/management/MBeanServerPermission.java ../../classpath/javax/management/MBeanTrustPermission.java + ../../classpath/javax/management/MXBean.java ../../classpath/javax/management/NotCompliantMBeanException.java ../../classpath/javax/management/Notification.java *************** *** 3363,3366 **** --- 3374,3378 ---- ../../classpath/javax/management/OperationsException.java ../../classpath/javax/management/PersistentMBean.java + ../../classpath/javax/management/Query.java ../../classpath/javax/management/QueryEval.java ../../classpath/javax/management/QueryExp.java *************** *** 4943,4946 **** --- 4955,4959 ---- gnu/classpath/VMStackWalker.java gnu/classpath/VMSystemProperties.java + gnu/java/awt/peer/ClasspathDesktopPeer.java gnu/java/awt/peer/gtk/CairoSurface.java gnu/java/lang/reflect/VMField.java Index: skip.lst =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/skip.lst,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** skip.lst 11 Dec 2006 13:13:27 -0000 1.11 --- skip.lst 5 Mar 2007 14:56:40 -0000 1.12 *************** *** 8,11 **** --- 8,14 ---- /classpath/external/jsr166/java/util/concurrent/locks/LockSupport.java /classpath/gnu/java/awt/dnd/ + /classpath/gnu/java/awt/peer/ClasspathDesktopPeer.java + /classpath/gnu/java/awt/peer/GnomeDesktopPeer.java + /classpath/gnu/java/awt/peer/KDEDesktopPeer.java /classpath/gnu/java/awt/peer/gtk/ /classpath/gnu/java/awt/peer/qt/ Index: vm.lst =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/vm.lst,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** vm.lst 4 Jan 2007 07:46:39 -0000 1.32 --- vm.lst 5 Mar 2007 14:56:40 -0000 1.33 *************** *** 11,14 **** --- 11,15 ---- gnu/classpath/VMStackWalker.java gnu/classpath/VMSystemProperties.java + gnu/java/awt/peer/ClasspathDesktopPeer.java gnu/java/awt/peer/gtk/CairoSurface.java gnu/java/lang/reflect/VMField.java |
From: Jeroen F. <jfr...@us...> - 2007-03-05 12:37:10
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4271/runtime Modified Files: TypeWrapper.cs Log Message: Made method parameter name handling robust against invalid or incomplete local variables tables. Index: TypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/TypeWrapper.cs,v retrieving revision 1.159 retrieving revision 1.160 diff -C2 -d -r1.159 -r1.160 *** TypeWrapper.cs 20 Feb 2007 16:11:49 -0000 1.159 --- TypeWrapper.cs 5 Mar 2007 12:37:03 -0000 1.160 *************** *** 6990,7033 **** if(localVars != null) { ! int bias = 1; ! if(m.IsStatic) { ! bias = 0; } ! ParameterBuilder[] parameterBuilders = new ParameterBuilder[m.ArgMap.Length - bias]; ! for(int i = bias; i < m.ArgMap.Length; i++) { if(m.ArgMap[i] != -1) { ! for(int j = 0; j < localVars.Length; j++) { ! if(localVars[j].index == i && parameterBuilders[i - bias] == null) { ! string name = localVars[j].name; ! if(parameterNames != null && parameterNames[i - bias] != null) ! { ! name = parameterNames[i - bias]; ! } ! ParameterBuilder pb; ! if(mb is MethodBuilder) ! { ! pb = ((MethodBuilder)mb).DefineParameter(m.ArgMap[i] + 1 - bias, ParameterAttributes.None, name); ! } ! else { ! pb = ((ConstructorBuilder)mb).DefineParameter(m.ArgMap[i], ParameterAttributes.None, name); } - parameterBuilders[i - bias] = pb; - break; } } } } - return parameterBuilders; - } - else - { - return AddParameterNames(mb, m.Signature, parameterNames); } } --- 6990,7020 ---- if(localVars != null) { ! if(parameterNames == null) { ! // we're allocating the worst case length here ! // (double & long args take two slots and for instance methods there's the this arg) ! parameterNames = new string[m.ArgMap.Length]; } ! for(int i = m.IsStatic ? 0 : 1, pos = 0; i < m.ArgMap.Length; i++) { + // skip double & long fillers if(m.ArgMap[i] != -1) { ! if(parameterNames[pos] == null) { ! for(int j = 0; j < localVars.Length; j++) { ! if(localVars[j].index == i) { ! parameterNames[pos] = localVars[j].name; ! break; } } } + pos++; } } } + return AddParameterNames(mb, m.Signature, parameterNames); } |
From: Jeroen F. <jfr...@us...> - 2007-02-20 16:11:52
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv18007/runtime Modified Files: TypeWrapper.cs Log Message: - Regenerated mscorlib.jar and System.jar - Changed RetentionPolicy on .NET custom attribute annotations to RUNTIME, so that ikvmc sees them (fixes a regression). - Handled method signature clashes in .NET types. Index: TypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/TypeWrapper.cs,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -d -r1.158 -r1.159 *** TypeWrapper.cs 19 Feb 2007 11:31:38 -0000 1.158 --- TypeWrapper.cs 20 Feb 2007 16:11:49 -0000 1.159 *************** *** 9239,9243 **** return new object[] { target, ! JVM.Library.newAnnotation(GetClassLoader().GetJavaClassLoader(), new object[] { AnnotationDefaultAttribute.TAG_ANNOTATION, "java.lang.annotation.Retention", "value", new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/RetentionPolicy;", "CLASS" } }) }; } --- 9239,9243 ---- return new object[] { target, ! JVM.Library.newAnnotation(GetClassLoader().GetJavaClassLoader(), new object[] { AnnotationDefaultAttribute.TAG_ANNOTATION, "java.lang.annotation.Retention", "value", new object[] { AnnotationDefaultAttribute.TAG_ENUM, "Ljava/lang/annotation/RetentionPolicy;", "RUNTIME" } }) }; } *************** *** 9712,9717 **** protected override void LazyPublishMembers() { - ArrayList fieldsList = new ArrayList(); - ArrayList methodsList = new ArrayList(); // special support for enums if(type.IsEnum) --- 9712,9715 ---- *************** *** 9736,9739 **** --- 9734,9738 ---- TypeWrapper fieldType = ClassLoaderWrapper.GetWrapperFromType(underlyingType); FieldInfo[] fields = type.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Static); + ArrayList fieldsList = new ArrayList(); for(int i = 0; i < fields.Length; i++) { *************** *** 9758,9765 **** } fieldsList.Add(new EnumValueFieldWrapper(this, fieldType)); ! methodsList.Add(new EnumWrapMethodWrapper(this, fieldType)); } else { FieldInfo[] fields = type.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance); for(int i = 0; i < fields.Length; i++) --- 9757,9766 ---- } fieldsList.Add(new EnumValueFieldWrapper(this, fieldType)); ! SetFields((FieldWrapper[])fieldsList.ToArray(typeof(FieldWrapper))); ! SetMethods(new MethodWrapper[] { new EnumWrapMethodWrapper(this, fieldType) }); } else { + ArrayList fieldsList = new ArrayList(); FieldInfo[] fields = type.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance); for(int i = 0; i < fields.Length; i++) *************** *** 9776,9779 **** --- 9777,9783 ---- } } + SetFields((FieldWrapper[])fieldsList.ToArray(typeof(FieldWrapper))); + + Hashtable methodsList = new Hashtable(); // special case for delegate constructors! *************** *** 9781,9789 **** { TypeWrapper iface = InnerClasses[0]; ! methodsList.Add(new DelegateMethodWrapper(this, (DelegateInnerClassTypeWrapper)iface)); } - bool fabricateDefaultCtor = type.IsValueType; - ConstructorInfo[] constructors = type.GetConstructors(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance); for(int i = 0; i < constructors.Length; i++) --- 9785,9792 ---- { TypeWrapper iface = InnerClasses[0]; ! DelegateMethodWrapper mw = new DelegateMethodWrapper(this, (DelegateInnerClassTypeWrapper)iface); ! methodsList.Add(mw.Name + mw.Signature, mw); } ConstructorInfo[] constructors = type.GetConstructors(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance); for(int i = 0; i < constructors.Length; i++) *************** *** 9795,9811 **** if(MakeMethodDescriptor(constructors[i], out name, out sig, out args, out ret)) { ! if(fabricateDefaultCtor && !constructors[i].IsStatic && sig == "()V") { ! fabricateDefaultCtor = false; } - // TODO handle name/signature clash - methodsList.Add(CreateMethodWrapper(name, sig, args, ret, constructors[i], false)); } } ! if(fabricateDefaultCtor) { // Value types have an implicit default ctor ! methodsList.Add(new ValueTypeDefaultCtor(this)); } --- 9798,9814 ---- if(MakeMethodDescriptor(constructors[i], out name, out sig, out args, out ret)) { ! MethodWrapper mw = CreateMethodWrapper(name, sig, args, ret, constructors[i], false); ! string key = mw.Name + mw.Signature; ! if(!methodsList.ContainsKey(key)) { ! methodsList.Add(key, mw); } } } ! if(type.IsValueType && !methodsList.ContainsKey("<init>()V")) { // Value types have an implicit default ctor ! methodsList.Add("<init>()V", new ValueTypeDefaultCtor(this)); } *************** *** 9833,9838 **** } } ! // TODO handle name/signature clash ! methodsList.Add(CreateMethodWrapper(name, sig, args, ret, methods[i], false)); } else if(methods[i].IsAbstract) --- 9836,9846 ---- } } ! MethodWrapper mw = CreateMethodWrapper(name, sig, args, ret, methods[i], false); ! string key = mw.Name + mw.Signature; ! MethodWrapper existing = (MethodWrapper)methodsList[key]; ! if(existing == null || existing is ByRefMethodWrapper) ! { ! methodsList[key] = mw; ! } } else if(methods[i].IsAbstract) *************** *** 9847,9851 **** if(!type.IsInterface) { - Hashtable clash = null; Type[] interfaces = type.GetInterfaces(); for(int i = 0; i < interfaces.Length; i++) --- 9855,9858 ---- *************** *** 9872,9887 **** } } ! if(clash == null) ! { ! clash = new Hashtable(); ! foreach(MethodWrapper mw in methodsList) ! { ! clash.Add(mw.Name + mw.Signature, null); ! } ! } ! if(!clash.ContainsKey(name + sig)) { ! clash.Add(name + sig, null); ! methodsList.Add(CreateMethodWrapper(name, sig, args, ret, map.InterfaceMethods[j], true)); } } --- 9879,9887 ---- } } ! string key = name + sig; ! MethodWrapper existing = (MethodWrapper)methodsList[key]; ! if(existing == null || existing is ByRefMethodWrapper) { ! methodsList[key] = CreateMethodWrapper(name, sig, args, ret, map.InterfaceMethods[j], true); } } *************** *** 9899,9903 **** // Finish the type, to make sure the methods are populated this.BaseTypeWrapper.Finish(); - Hashtable h = new Hashtable(); TypeWrapper baseTypeWrapper = this.BaseTypeWrapper; while(baseTypeWrapper != null) --- 9899,9902 ---- *************** *** 9907,9923 **** if(!m.IsStatic && !m.IsFinal && (m.IsPublic || m.IsProtected) && m.Name != "<init>") { ! if(!h.ContainsKey(m.Name + m.Signature)) { - h.Add(m.Name + m.Signature, ""); - // TODO handle name/sig clash (what should we do?) if(m.IsProtected) { if(m.Name == "finalize" && m.Signature == "()V") { ! methodsList.Add(new FinalizeMethodWrapper(this)); } else if(m.Name == "clone" && m.Signature == "()Ljava.lang.Object;") { ! methodsList.Add(new CloneMethodWrapper(this)); } else --- 9906,9921 ---- if(!m.IsStatic && !m.IsFinal && (m.IsPublic || m.IsProtected) && m.Name != "<init>") { ! string key = m.Name + m.Signature; ! if(!methodsList.ContainsKey(key)) { if(m.IsProtected) { if(m.Name == "finalize" && m.Signature == "()V") { ! methodsList.Add(key, new FinalizeMethodWrapper(this)); } else if(m.Name == "clone" && m.Signature == "()Ljava.lang.Object;") { ! methodsList.Add(key, new CloneMethodWrapper(this)); } else *************** *** 9929,9933 **** else { ! methodsList.Add(new BaseFinalMethodWrapper(this, m)); } } --- 9927,9931 ---- else { ! methodsList.Add(key, new BaseFinalMethodWrapper(this, m)); } } *************** *** 9937,9943 **** } } } - SetMethods((MethodWrapper[])methodsList.ToArray(typeof(MethodWrapper))); - SetFields((FieldWrapper[])fieldsList.ToArray(typeof(FieldWrapper))); } --- 9935,9942 ---- } } + MethodWrapper[] methodArray = new MethodWrapper[methodsList.Count]; + methodsList.Values.CopyTo(methodArray, 0); + SetMethods(methodArray); } } |
From: Jeroen F. <jfr...@us...> - 2007-02-20 16:11:51
|
Update of /cvsroot/ikvm/ikvm/classpath In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv18007/classpath Modified Files: System.jar mscorlib.jar Log Message: - Regenerated mscorlib.jar and System.jar - Changed RetentionPolicy on .NET custom attribute annotations to RUNTIME, so that ikvmc sees them (fixes a regression). - Handled method signature clashes in .NET types. Index: System.jar =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/System.jar,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 Binary files /tmp/cvsl3z0no and /tmp/cvsr1seGO differ Index: mscorlib.jar =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/mscorlib.jar,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 Binary files /tmp/cvsqQ8Z8s and /tmp/cvsFlcwET differ |
From: Jeroen F. <jfr...@us...> - 2007-02-19 11:31:41
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv17658/runtime Modified Files: TypeWrapper.cs Log Message: Added support for stubbing abstract methods that contain unsupported argument types (ByRef and Pointers) Index: TypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/TypeWrapper.cs,v retrieving revision 1.157 retrieving revision 1.158 diff -C2 -d -r1.157 -r1.158 *** TypeWrapper.cs 16 Feb 2007 07:42:33 -0000 1.157 --- TypeWrapper.cs 19 Feb 2007 11:31:38 -0000 1.158 *************** *** 1596,1599 **** --- 1596,1600 ---- VerifyError = 8, ClassFormatError = 16, + HasUnsupportedAbstractMethods = 32, } *************** *** 1689,1692 **** --- 1690,1720 ---- } + internal bool HasUnsupportedAbstractMethods + { + get + { + foreach(TypeWrapper iface in this.Interfaces) + { + if(iface.HasUnsupportedAbstractMethods) + { + return true; + } + } + return (flags & TypeFlags.HasUnsupportedAbstractMethods) != 0 || (baseWrapper != null && baseWrapper.HasUnsupportedAbstractMethods); + } + set + { + // TODO do we need locking here? + if(value) + { + flags |= TypeFlags.HasUnsupportedAbstractMethods; + } + else + { + flags &= ~TypeFlags.HasUnsupportedAbstractMethods; + } + } + } + internal virtual bool HasStaticInitializer { *************** *** 4808,4811 **** --- 4836,4843 ---- baseTypeWrapper = baseTypeWrapper.BaseTypeWrapper; } + if(!wrapper.IsAbstract && wrapper.HasUnsupportedAbstractMethods) + { + AddUnsupportedAbstractMethods(); + } foreach(MethodWrapper mw in methods) { *************** *** 4996,4999 **** --- 5028,5076 ---- } + private void AddUnsupportedAbstractMethods() + { + foreach(MethodBase mb in wrapper.BaseTypeWrapper.TypeAsBaseType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) + { + if(DotNetTypeWrapper.IsUnsupportedAbstractMethod(mb)) + { + GenerateUnsupportedAbstractMethodStub(mb); + } + } + Hashtable h = new Hashtable(); + TypeWrapper tw = wrapper; + while(tw != null) + { + foreach(TypeWrapper iface in tw.Interfaces) + { + foreach(MethodBase mb in iface.TypeAsBaseType.GetMethods(BindingFlags.Public | BindingFlags.Instance)) + { + if(!h.ContainsKey(mb)) + { + h.Add(mb, mb); + if(DotNetTypeWrapper.IsUnsupportedAbstractMethod(mb)) + { + GenerateUnsupportedAbstractMethodStub(mb); + } + } + } + } + tw = tw.BaseTypeWrapper; + } + } + + private void GenerateUnsupportedAbstractMethodStub(MethodBase mb) + { + ParameterInfo[] parameters = mb.GetParameters(); + Type[] parameterTypes = new Type[parameters.Length]; + for(int i = 0; i < parameters.Length; i++) + { + parameterTypes[i] = parameters[i].ParameterType; + } + MethodAttributes attr = MethodAttributes.NewSlot | MethodAttributes.Virtual | MethodAttributes.Private; + MethodBuilder m = typeBuilder.DefineMethod("__<unsupported>" + mb.DeclaringType.FullName + "/" + mb.Name, attr, ((MethodInfo)mb).ReturnType, parameterTypes); + EmitHelper.Throw(m.GetILGenerator(), "java.lang.AbstractMethodError", "Method " + mb.DeclaringType.FullName + "." + mb.Name + " is unsupported by IKVM."); + typeBuilder.DefineMethodOverride(m, (MethodInfo)mb); + } + class TraceHelper { *************** *** 9759,9762 **** --- 9836,9843 ---- methodsList.Add(CreateMethodWrapper(name, sig, args, ret, methods[i], false)); } + else if(methods[i].IsAbstract) + { + this.HasUnsupportedAbstractMethods = true; + } } } *************** *** 9894,9897 **** --- 9975,9998 ---- } + internal static bool IsUnsupportedAbstractMethod(MethodBase mb) + { + if(mb.IsAbstract) + { + MethodInfo mi = (MethodInfo)mb; + if(mi.ReturnType.IsPointer || mi.ReturnType.IsByRef) + { + return true; + } + foreach(ParameterInfo p in mi.GetParameters()) + { + if(p.ParameterType.IsByRef || p.ParameterType.IsPointer) + { + return true; + } + } + } + return false; + } + private bool MakeMethodDescriptor(MethodBase mb, out string name, out string sig, out TypeWrapper[] args, out TypeWrapper ret) { |
From: Jeroen F. <jfr...@us...> - 2007-02-16 07:44:53
|
Update of /cvsroot/ikvm/ikvm/classpath/java/io In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv24548/classpath/java/io Modified Files: VMFile.java Log Message: Fixed setReadable & setWritable to return success if the requested operation is a no-op. Index: VMFile.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/java/io/VMFile.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** VMFile.java 10 Feb 2007 05:54:59 -0000 1.9 --- VMFile.java 16 Feb 2007 07:44:53 -0000 1.10 *************** *** 644,648 **** { // TODO consider using Mono.Posix on Linux ! return false; } --- 644,648 ---- { // TODO consider using Mono.Posix on Linux ! return readable; } *************** *** 682,686 **** { // TODO consider using Mono.Posix on Linux ! return false; } --- 682,686 ---- { // TODO consider using Mono.Posix on Linux ! return executable; } |
From: Jeroen F. <jfr...@us...> - 2007-02-16 07:42:34
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23711/runtime Modified Files: ClassLoaderWrapper.cs TypeWrapper.cs classpath.cs runtime.build Log Message: Restructured mutual dependency of IKVM.Runtime and IKVM.GNU.Classpath to work around Mono C# compiler limitation. Index: TypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/TypeWrapper.cs,v retrieving revision 1.156 retrieving revision 1.157 diff -C2 -d -r1.156 -r1.157 *** TypeWrapper.cs 1 Feb 2007 12:41:22 -0000 1.156 --- TypeWrapper.cs 16 Feb 2007 07:42:33 -0000 1.157 *************** *** 8647,8655 **** if(type.Assembly == typeof(DotNetTypeWrapper).Assembly) { - // HACK make an exception for the vm/library interface - if(type == typeof(ikvm.@internal.LibraryVMInterface)) - { - return true; - } return false; } --- 8647,8650 ---- Index: classpath.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/classpath.cs,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** classpath.cs 16 Jan 2007 08:53:15 -0000 1.93 --- classpath.cs 16 Feb 2007 07:42:33 -0000 1.94 *************** *** 1727,1730 **** --- 1727,1731 ---- } + #if FIRST_PASS namespace ikvm.@internal { *************** *** 1797,1798 **** --- 1798,1800 ---- } } + #endif // !FIRST_PASS Index: ClassLoaderWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/ClassLoaderWrapper.cs,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** ClassLoaderWrapper.cs 16 Jan 2007 10:14:47 -0000 1.87 --- ClassLoaderWrapper.cs 16 Feb 2007 07:42:33 -0000 1.88 *************** *** 970,982 **** } - #if STATIC_COMPILER - internal static void PublishLibraryImplementationHelperType(Type type) - { - CompiledTypeWrapper typeWrapper = CompiledTypeWrapper.newInstance(type.FullName, type); - SetWrapperForType(type, typeWrapper); - GetBootstrapClassLoader().types[type.FullName] = typeWrapper; - } - #endif // STATIC_COMPILER - internal static TypeWrapper LoadClassCritical(string name) { --- 970,973 ---- Index: runtime.build =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/runtime.build,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** runtime.build 15 Feb 2007 09:09:45 -0000 1.10 --- runtime.build 16 Feb 2007 07:42:33 -0000 1.11 *************** *** 34,38 **** <property name="defs" value="${defs};WHIDBEY" /> </if> ! <csc target="library" output="../bin/IKVM.Runtime.dll" define="${defs}" optimize="true" unsafe="true" rebuild="true"> <sources> <include name="AssemblyInfo.cs" /> --- 34,38 ---- <property name="defs" value="${defs};WHIDBEY" /> </if> ! <csc target="library" output="IKVM.Runtime.dll" define="${defs}" optimize="true" unsafe="true" rebuild="true"> <sources> <include name="AssemblyInfo.cs" /> *************** *** 62,65 **** --- 62,66 ---- </references> </csc> + <copy file="IKVM.Runtime.dll" todir="../bin" /> </target> </project> |
From: Jeroen F. <jfr...@us...> - 2007-02-16 07:42:34
|
Update of /cvsroot/ikvm/ikvm/classpath In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23711/classpath Modified Files: exclude.lst Log Message: Restructured mutual dependency of IKVM.Runtime and IKVM.GNU.Classpath to work around Mono C# compiler limitation. Index: exclude.lst =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/exclude.lst,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** exclude.lst 1 Feb 2007 08:35:05 -0000 1.3 --- exclude.lst 16 Feb 2007 07:42:32 -0000 1.4 *************** *** 3,5 **** java.lang.VMThrowable java.math.BigInteger\$NativeMPI - ikvm.internal.LibraryVMInterface --- 3,4 ---- |
From: Jeroen F. <jfr...@us...> - 2007-02-16 07:42:34
|
Update of /cvsroot/ikvm/ikvm/ikvmc In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23711/ikvmc Modified Files: CompilerClassLoader.cs Log Message: Restructured mutual dependency of IKVM.Runtime and IKVM.GNU.Classpath to work around Mono C# compiler limitation. Index: CompilerClassLoader.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/ikvmc/CompilerClassLoader.cs,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** CompilerClassLoader.cs 1 Feb 2007 07:13:02 -0000 1.36 --- CompilerClassLoader.cs 16 Feb 2007 07:42:33 -0000 1.37 *************** *** 2338,2349 **** } - // NOTE types from IKVM.Runtime that are "published" should also be added to - // the white list in DotNetTypeWrapper.IsAllowedOutside() - Type libvminterface = StaticCompiler.runtimeAssembly.GetType("ikvm.internal.LibraryVMInterface"); - if(libvminterface != null) - { - ClassLoaderWrapper.PublishLibraryImplementationHelperType(libvminterface); - } - Tracer.Info(Tracer.Compiler, "Compiling class files (1)"); ArrayList allwrappers = new ArrayList(); --- 2338,2341 ---- |
From: Jeroen F. <jfr...@us...> - 2007-02-15 09:09:47
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv11829/runtime Modified Files: IKVM.Runtime.csproj runtime.build vm.cs Log Message: Changed the build process to build IKVM.Runtime in two passes to enable it to reference IKVM.GNU.Classpath (which also references IKVM.Runtime). This removes the need to do reflection to find the loaded IKVM.GNU.Classpath from IKVM.Runtime and completes the ability to run different versions of IKVM side-by-side in the same AppDomain. This should also fix bug 1659196. Index: vm.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/vm.cs,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** vm.cs 16 Jan 2007 12:12:08 -0000 1.84 --- vm.cs 15 Feb 2007 09:09:45 -0000 1.85 *************** *** 1,4 **** /* ! Copyright (C) 2002, 2003, 2004, 2005, 2006 Jeroen Frijters This software is provided 'as-is', without any express or implied --- 1,4 ---- /* ! Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Jeroen Frijters This software is provided 'as-is', without any express or implied *************** *** 78,84 **** private static bool enableReflectionOnMethodsWithUnloadableTypeParameters; private static bool finishingForDebugSave; private static ikvm.@internal.LibraryVMInterface lib; - internal static bool IsSaveDebugImage; #endif private static Assembly coreAssembly; --- 78,86 ---- private static bool enableReflectionOnMethodsWithUnloadableTypeParameters; private static bool finishingForDebugSave; + #if !FIRST_PASS private static ikvm.@internal.LibraryVMInterface lib; #endif + internal static bool IsSaveDebugImage; + #endif // STATIC_COMPILER private static Assembly coreAssembly; *************** *** 113,160 **** } - #if COMPACT_FRAMEWORK - internal static ikvm.@internal.LibraryVMInterface Library - { - get - { - return ikvm.@internal.Library.getImpl(); - } - } - - internal static Assembly CoreAssembly - { - get - { - return Library.GetType().Assembly; - } - } - #else - - private static Assembly[] UnsafeGetAssemblies() - { - new ReflectionPermission(ReflectionPermissionFlag.MemberAccess).Assert(); - #if WHIDBEY && STATIC_COMPILER - return AppDomain.CurrentDomain.ReflectionOnlyGetAssemblies(); - #else - return AppDomain.CurrentDomain.GetAssemblies(); - #endif - } - - private static Type UnsafeGetType(Assembly asm, string name) - { - new ReflectionPermission(ReflectionPermissionFlag.MemberAccess - #if !WHIDBEY - | ReflectionPermissionFlag.TypeInformation - #endif - ).Assert(); - return asm.GetType(name); - } - - private static object UnsafeCreateInstance(Type type) - { - new ReflectionPermission(ReflectionPermissionFlag.MemberAccess).Assert(); - return Activator.CreateInstance(type, true); - } - internal static Assembly CoreAssembly { --- 115,118 ---- *************** *** 164,174 **** if(coreAssembly == null) { ! object lib = Library; ! if(lib != null) ! { ! coreAssembly = lib.GetType().Assembly; ! } ! } #endif return coreAssembly; } --- 122,132 ---- if(coreAssembly == null) { ! #if FIRST_PASS ! throw new InvalidOperationException("This version of IKVM.Runtime.dll was compiled with FIRST_PASS defined."); ! #else ! coreAssembly = typeof(ikvm.@internal.Library).Assembly; #endif + } + #endif // !STATIC_COMPILER return coreAssembly; } *************** *** 184,216 **** get { if(lib == null) { ! foreach(Assembly asm in UnsafeGetAssemblies()) ! { ! Type type = UnsafeGetType(asm, "java.lang.LibraryVMInterfaceImpl"); ! if(type != null) ! { ! lib = UnsafeCreateInstance(type) as ikvm.@internal.LibraryVMInterface; ! if(lib == null) ! { ! // If the "as" fails, this is most likely due to an IKVM.GNU.Classpath.dll version ! // that was linked against an incompatible version of IKVM.Runtime.dll. ! JVM.CriticalFailure("Incompatible core library version", null); ! } ! break; ! } ! } ! if(lib == null) ! { ! JVM.CriticalFailure("Unable to find java.lang.LibraryVMInterfaceImpl", null); ! } } return lib; } } - #endif // STATIC_COMPILER - #endif // COMPACT_FRAMEWORK - #if !STATIC_COMPILER public static bool EnableReflectionOnMethodsWithUnloadableTypeParameters { --- 142,157 ---- get { + #if FIRST_PASS + throw new InvalidOperationException("This version of IKVM.Runtime.dll was compiled with FIRST_PASS defined."); + #else if(lib == null) { ! lib = ikvm.@internal.Library.getImpl(); } return lib; + #endif } } public static bool EnableReflectionOnMethodsWithUnloadableTypeParameters { *************** *** 337,342 **** #if WHIDBEY && STATIC_COMPILER return StaticCompiler.GetType(type.FullName); ! #endif return type; } } --- 278,284 ---- #if WHIDBEY && STATIC_COMPILER return StaticCompiler.GetType(type.FullName); ! #else return type; + #endif } } Index: IKVM.Runtime.csproj =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/IKVM.Runtime.csproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** IKVM.Runtime.csproj 28 Dec 2006 07:46:27 -0000 1.9 --- IKVM.Runtime.csproj 15 Feb 2007 09:09:45 -0000 1.10 *************** *** 69,72 **** --- 69,77 ---- AssemblyName = "System" /> + <Reference + Name = "IKVM.GNU.Classpath" + AssemblyName = "IKVM.GNU.Classpath" + HintPath = "..\bin\IKVM.GNU.Classpath.dll" + /> </References> </Build> Index: runtime.build =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/runtime.build,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** runtime.build 10 Apr 2006 09:09:10 -0000 1.9 --- runtime.build 15 Feb 2007 09:09:45 -0000 1.10 *************** *** 1,4 **** --- 1,8 ---- <?xml version="1.0"?> <project name="IKVM.Runtime" default="IKVM.Runtime"> + <target name="first-pass"> + <property name="first-pass" value="true" /> + <call target="IKVM.Runtime" /> + </target> <target name="generics"> <property name="generics" value="true" /> *************** *** 16,19 **** --- 20,24 ---- <property overwrite="false" name="generics" value="false" /> <property overwrite="false" name="cfnet" value="false" /> + <property overwrite="false" name="first-pass" value="false" /> <property name="defs" value="TRACE" /> <if test="${property::exists('signed')}"> *************** *** 23,30 **** <property name="defs" value="${defs};GENERICS" /> </if> <if test="${framework::get-target-framework()=='net-2.0'}"> <property name="defs" value="${defs};WHIDBEY" /> </if> ! <csc target="library" output="../bin/IKVM.Runtime.dll" define="${defs}" optimize="true" unsafe="true"> <sources> <include name="AssemblyInfo.cs" /> --- 28,38 ---- <property name="defs" value="${defs};GENERICS" /> </if> + <if test="${first-pass}"> + <property name="defs" value="${defs};FIRST_PASS" /> + </if> <if test="${framework::get-target-framework()=='net-2.0'}"> <property name="defs" value="${defs};WHIDBEY" /> </if> ! <csc target="library" output="../bin/IKVM.Runtime.dll" define="${defs}" optimize="true" unsafe="true" rebuild="true"> <sources> <include name="AssemblyInfo.cs" /> *************** *** 50,53 **** --- 58,64 ---- <include name="vm.cs" /> </sources> + <references> + <include unless="${first-pass}" name="../bin/IKVM.GNU.Classpath.dll" asis="true" /> + </references> </csc> </target> |
From: Jeroen F. <jfr...@us...> - 2007-02-15 09:09:47
|
Update of /cvsroot/ikvm/ikvm In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv11829 Modified Files: ikvm.build Log Message: Changed the build process to build IKVM.Runtime in two passes to enable it to reference IKVM.GNU.Classpath (which also references IKVM.Runtime). This removes the need to do reflection to find the loaded IKVM.GNU.Classpath from IKVM.Runtime and completes the ability to run different versions of IKVM side-by-side in the same AppDomain. This should also fix bug 1659196. Index: ikvm.build =================================================================== RCS file: /cvsroot/ikvm/ikvm/ikvm.build,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ikvm.build 11 Dec 2006 13:13:27 -0000 1.20 --- ikvm.build 15 Feb 2007 09:09:45 -0000 1.21 *************** *** 9,16 **** <target name="all"> <nant buildfile="tools/tools.build" /> ! <nant buildfile="runtime/runtime.build" /> <nant buildfile="native/native.build" /> <nant buildfile="ikvmc/ikvmc.build" /> <nant buildfile="classpath/classpath.build" /> <nant buildfile="ikvm/ikvm.build" /> <nant buildfile="ikvmstub/ikvmstub.build" /> --- 9,17 ---- <target name="all"> <nant buildfile="tools/tools.build" /> ! <nant buildfile="runtime/runtime.build" target="first-pass" /> <nant buildfile="native/native.build" /> <nant buildfile="ikvmc/ikvmc.build" /> <nant buildfile="classpath/classpath.build" /> + <nant buildfile="runtime/runtime.build" /> <nant buildfile="ikvm/ikvm.build" /> <nant buildfile="ikvmstub/ikvmstub.build" /> |
From: Jeroen F. <jfr...@us...> - 2007-02-10 05:55:02
|
Update of /cvsroot/ikvm/ikvm/classpath/java/io In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv12215/classpath/java/io Modified Files: VMFile.java Log Message: Added new VMFile methods. Index: VMFile.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/java/io/VMFile.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** VMFile.java 23 Jan 2007 09:51:46 -0000 1.8 --- VMFile.java 10 Feb 2007 05:54:59 -0000 1.9 *************** *** 640,642 **** --- 640,692 ---- + (file.isDirectory() ? "/" : "")); } + + static boolean setReadable(String path, boolean readable, boolean ownerOnly) + { + // TODO consider using Mono.Posix on Linux + return false; + } + + static boolean setWritable(String path, boolean writable, boolean ownerOnly) + { + try + { + // TODO consider using Mono.Posix on Linux + cli.System.IO.FileInfo file = newFileInfo(path); + int attr = file.get_Attributes().Value & ~cli.System.IO.FileAttributes.ReadOnly; + if (!writable) + { + attr |= cli.System.IO.FileAttributes.ReadOnly; + } + file.set_Attributes(cli.System.IO.FileAttributes.wrap(attr)); + return true; + } + catch(cli.System.Security.SecurityException _) + { + } + catch(cli.System.ArgumentException _) + { + } + catch(cli.System.UnauthorizedAccessException _) + { + } + catch(cli.System.IO.IOException _) + { + } + catch(cli.System.NotSupportedException _) + { + } + return false; + } + + static boolean setExecutable(String path, boolean executable, boolean ownerOnly) + { + // TODO consider using Mono.Posix on Linux + return false; + } + + static boolean canExecute(String path) + { + // TODO consider using Mono.Posix on Linux + return true; + } } |
From: Jeroen F. <jfr...@us...> - 2007-02-07 07:28:03
|
Update of /cvsroot/ikvm/ikvm/classpath/gnu/classpath In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23298/classpath/gnu/classpath Modified Files: VMStackWalker.java Log Message: Fixed firstNonNullClassLoader to handle reflection scenarios. Index: VMStackWalker.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/gnu/classpath/VMStackWalker.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** VMStackWalker.java 14 Aug 2006 07:57:03 -0000 1.5 --- VMStackWalker.java 7 Feb 2007 07:28:01 -0000 1.6 *************** *** 1,4 **** /* ! Copyright (C) 2005, 2006 Jeroen Frijters This software is provided 'as-is', without any express or implied --- 1,4 ---- /* ! Copyright (C) 2005, 2006, 2007 Jeroen Frijters This software is provided 'as-is', without any express or implied *************** *** 42,51 **** { StackFrame frame = stack.GetFrame(i); - // TODO handle reflection scenarios MethodBase method = frame.GetMethod(); if(!isHideFromJava(method)) { cli.System.Type type = method.get_DeclaringType(); ! if(type != null) { ClassLoader loader = (ClassLoader)getClassLoaderFromType(type); --- 42,52 ---- { StackFrame frame = stack.GetFrame(i); MethodBase method = frame.GetMethod(); if(!isHideFromJava(method)) { cli.System.Type type = method.get_DeclaringType(); ! // We skip mscorlib types, because they account for reflection and there ! // are no other scenarios in which it is meaningful for mscorlib to be returned. ! if(type != null && type.get_Assembly() != mscorlib) { ClassLoader loader = (ClassLoader)getClassLoaderFromType(type); |
From: Jeroen F. <jfr...@us...> - 2007-02-03 14:26:29
|
Update of /cvsroot/ikvm/ikvm/ikvmc In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv8093/ikvmc Modified Files: AssemblyInfo.cs Log Message: Updated year in copyright messages. Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/ikvmc/AssemblyInfo.cs,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** AssemblyInfo.cs 11 Dec 2006 13:13:28 -0000 1.32 --- AssemblyInfo.cs 3 Feb 2007 14:26:18 -0000 1.33 *************** *** 35,39 **** [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("IKVM.NET")] ! [assembly: AssemblyCopyright("Copyright (C) 2002-2006 Jeroen Frijters")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] --- 35,39 ---- [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("IKVM.NET")] ! [assembly: AssemblyCopyright("Copyright (C) 2002-2007 Jeroen Frijters")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] |
From: Jeroen F. <jfr...@us...> - 2007-02-03 14:26:20
|
Update of /cvsroot/ikvm/ikvm/classpath In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv8093/classpath Modified Files: AssemblyInfo.java Log Message: Updated year in copyright messages. Index: AssemblyInfo.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/classpath/AssemblyInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AssemblyInfo.java 20 Jun 2006 14:31:58 -0000 1.1 --- AssemblyInfo.java 3 Feb 2007 14:26:17 -0000 1.2 *************** *** 26,31 **** "This software is licensed under the GNU General Public License + GNU Classpath exception.\r\n" + "See http://www.gnu.org/software/classpath/license.html for details.\r\n" + ! "Copyright (C) 1998-2006 Free Software Foundation, Inc.\r\n" + ! "Copyright (C) 2002-2006 Jeroen Frijters" ) --- 26,31 ---- "This software is licensed under the GNU General Public License + GNU Classpath exception.\r\n" + "See http://www.gnu.org/software/classpath/license.html for details.\r\n" + ! "Copyright (C) 1998-2007 Free Software Foundation, Inc.\r\n" + ! "Copyright (C) 2002-2007 Jeroen Frijters" ) |