ikvm-commit Mailing List for IKVM.NET (Page 3)
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...> - 2015-09-02 11:19:44
|
Update of /cvsroot/ikvm/ikvm In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9666 Modified Files: THANKYOU Log Message: Patch by Christopher Boumenot to split platform specific binaries into a separate nuget package and build support to copy them into the output directory. Index: THANKYOU =================================================================== RCS file: /cvsroot/ikvm/ikvm/THANKYOU,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** THANKYOU 12 Jan 2012 06:48:55 -0000 1.16 --- THANKYOU 2 Sep 2015 11:19:41 -0000 1.17 *************** *** 10,13 **** --- 10,14 ---- Michael Kay Chris Laffra + Christopher Boumenot Nat Luengnaruemitchai Alan Macek |
From: Small S. <sma...@us...> - 2015-09-01 12:37:30
|
Update of /cvsroot/ikvm/ikvm/openjdk/java/awt/image In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11024/openjdk/java/awt/image Modified Files: Tag: v8_0 BufferedImage.java Log Message: free resources on call of flush Index: BufferedImage.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/openjdk/java/awt/image/BufferedImage.java,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** BufferedImage.java 23 Oct 2014 12:54:02 -0000 1.20 --- BufferedImage.java 1 Sep 2015 12:37:26 -0000 1.20.2.1 *************** *** 1807,1811 **** } ! public void flush(){ } } --- 1807,1816 ---- } ! public void flush() { ! if( bitmap != null ) { ! toRaster(); ! bitmap.Dispose(); ! bitmap = null; ! } } } |
From: Small S. <sma...@us...> - 2015-09-01 11:02:42
|
Update of /cvsroot/ikvm/ikvm/awt In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5640/awt Modified Files: Tag: v8_0 graphics.cs Log Message: Dispose temporary Bitmap objects immediately to prevent OutOfMemoryException Index: graphics.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/awt/graphics.cs,v retrieving revision 1.75 retrieving revision 1.75.2.1 diff -C2 -d -r1.75 -r1.75.2.1 *** graphics.cs 17 Nov 2014 16:46:31 -0000 1.75 --- graphics.cs 1 Sep 2015 11:02:40 -0000 1.75.2.1 *************** *** 89,98 **** public override void copyArea(int x, int y, int width, int height, int dx, int dy) { ! Bitmap copy = new Bitmap(width, height); ! using (Graphics gCopy = Graphics.FromImage(copy)) { ! gCopy.DrawImage(bitmap, new Rectangle(0, 0, width, height), x, y, width, height, GraphicsUnit.Pixel); } - g.DrawImageUnscaled(copy, x + dx, y + dy); } } --- 89,100 ---- public override void copyArea(int x, int y, int width, int height, int dx, int dy) { ! using (Bitmap copy = new Bitmap(width, height)) { ! using (Graphics gCopy = Graphics.FromImage(copy)) ! { ! gCopy.DrawImage(bitmap, new Rectangle(0, 0, width, height), x, y, width, height, GraphicsUnit.Pixel); ! } ! g.DrawImageUnscaled(copy, x + dx, y + dy); } } } *************** *** 133,142 **** Matrix t = g.Transform; Point src = getPointToScreen(new Point(x + (int)t.OffsetX, y + (int)t.OffsetY)); ! Bitmap copy = new Bitmap(width, height); ! using (Graphics gCopy = Graphics.FromImage(copy)) { ! gCopy.CopyFromScreen(src, new Point(0, 0), new Size(width, height)); } - g.DrawImageUnscaled(copy, x + dx, y + dy); } --- 135,146 ---- Matrix t = g.Transform; Point src = getPointToScreen(new Point(x + (int)t.OffsetX, y + (int)t.OffsetY)); ! using (Bitmap copy = new Bitmap(width, height)) { ! using (Graphics gCopy = Graphics.FromImage(copy)) ! { ! gCopy.CopyFromScreen(src, new Point(0, 0), new Size(width, height)); ! } ! g.DrawImageUnscaled(copy, x + dx, y + dy); } } *************** *** 2008,2038 **** const int h = 3; ! Bitmap bitmap = new Bitmap(w, h); ! Graphics g = Graphics.FromImage(bitmap); ! g.TextRenderingHint = hint; ! g.FillRectangle(new SolidBrush(Color.White), 0, 0, w, h); ! g.DrawString("A", font, new SolidBrush(Color.Black), 0, -baseline, FORMAT); ! g.DrawString("X", font, new SolidBrush(Color.Black), 0, -baseline, FORMAT); ! g.Dispose(); ! ! int y = 0; ! LINE: ! while (y < h) { ! for (int x = 0; x < w; x++) { ! Color color = bitmap.GetPixel(x, y); ! if (color.GetBrightness() < 0.5) { ! //there is a black pixel, we continue in the next line. ! baseline++; ! y++; ! goto LINE; } } - break; // there was a line without black pixel } - baselines[key] = baseline; } --- 2012,2044 ---- const int h = 3; ! using (Bitmap bitmap = new Bitmap(w, h)) { ! Graphics g = Graphics.FromImage(bitmap); ! g.TextRenderingHint = hint; ! g.FillRectangle(new SolidBrush(Color.White), 0, 0, w, h); ! g.DrawString("A", font, new SolidBrush(Color.Black), 0, -baseline, FORMAT); ! g.DrawString("X", font, new SolidBrush(Color.Black), 0, -baseline, FORMAT); ! g.Dispose(); ! ! ! int y = 0; ! LINE: ! while (y < h) { ! for (int x = 0; x < w; x++) { ! Color color = bitmap.GetPixel(x, y); ! if (color.GetBrightness() < 0.5) ! { ! //there is a black pixel, we continue in the next line. ! baseline++; ! y++; ! goto LINE; ! } } + break; // there was a line without black pixel } } baselines[key] = baseline; } |
From: Jeroen F. <jfr...@us...> - 2015-08-27 12:15:47
|
Update of /cvsroot/ikvm/ikvm/reflect/Writer In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1359/Writer Modified Files: Heaps.cs MetadataWriter.cs ModuleWriter.cs TextSection.cs Log Message: Use uint for file position to support >2GB files. Note that PE spec says that 2GB is the maximum valid size. Index: TextSection.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/reflect/Writer/TextSection.cs,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** TextSection.cs 17 Feb 2015 13:48:31 -0000 1.24 --- TextSection.cs 27 Aug 2015 12:15:45 -0000 1.25 *************** *** 276,280 **** } ! internal void Write(MetadataWriter mw, uint sdataRVA, out int guidHeapOffset) { // Now that we're ready to start writing, we need to do some fix ups --- 276,280 ---- } ! internal void Write(MetadataWriter mw, uint sdataRVA, out uint guidHeapOffset) { // Now that we're ready to start writing, we need to do some fix ups Index: Heaps.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/reflect/Writer/Heaps.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Heaps.cs 13 Oct 2012 20:12:32 -0000 1.7 --- Heaps.cs 27 Aug 2015 12:15:45 -0000 1.8 *************** *** 37,41 **** internal void Write(MetadataWriter mw) { ! int pos = mw.Position; WriteImpl(mw); Debug.Assert(mw.Position == pos + unalignedlength); --- 37,41 ---- internal void Write(MetadataWriter mw) { ! uint pos = mw.Position; WriteImpl(mw); Debug.Assert(mw.Position == pos + unalignedlength); *************** *** 137,141 **** if (table != null && table.RowCount > 0) { ! int pos = mw.Position; table.Write(mw); Debug.Assert(mw.Position - pos == table.GetLength(mw)); --- 137,141 ---- if (table != null && table.RowCount > 0) { ! uint pos = mw.Position; table.Write(mw); Debug.Assert(mw.Position - pos == table.GetLength(mw)); Index: ModuleWriter.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/reflect/Writer/ModuleWriter.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ModuleWriter.cs 17 Feb 2015 13:48:31 -0000 1.28 --- ModuleWriter.cs 27 Aug 2015 12:15:45 -0000 1.29 *************** *** 314,318 **** stream.Seek(text.PointerToRawData, SeekOrigin.Begin); ! int guidHeapOffset; code.Write(mw, sdata.VirtualAddress, out guidHeapOffset); --- 314,318 ---- stream.Seek(text.PointerToRawData, SeekOrigin.Begin); ! uint guidHeapOffset; code.Write(mw, sdata.VirtualAddress, out guidHeapOffset); Index: MetadataWriter.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/reflect/Writer/MetadataWriter.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MetadataWriter.cs 27 Jan 2015 09:54:44 -0000 1.8 --- MetadataWriter.cs 27 Aug 2015 12:15:45 -0000 1.9 *************** *** 49,55 **** } ! internal int Position { ! get { return (int)stream.Position; } } --- 49,55 ---- } ! internal uint Position { ! get { return (uint)stream.Position; } } |
From: Jeroen F. <jfr...@us...> - 2015-08-27 12:10:13
|
Update of /cvsroot/ikvm/ikvm/runtime/openjdk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1044 Modified Files: java.net.cs Log Message: Don't report IPv4 addresses on interfaces that aren't up. This matches JDK behavior. Index: java.net.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/openjdk/java.net.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** java.net.cs 27 Aug 2015 12:08:24 -0000 1.6 --- java.net.cs 27 Aug 2015 12:10:10 -0000 1.7 *************** *** 515,518 **** --- 515,525 ---- if (addr.AddressFamily == AddressFamily.InterNetwork) { + if (ifaces[i].OperationalStatus != OperationalStatus.Up) + { + // HACK on Windows, OpenJDK seems to only return IPv4 addresses for interfaces that are up. + // This is possibly the result of their usage of the (legacy) Win32 API GetIpAddrTable. + // Not doing this filtering causes some OpenJDK tests to fail. + continue; + } java.net.Inet4Address address = new java.net.Inet4Address(null, addr.GetAddressBytes()); java.net.InterfaceAddress binding = new java.net.InterfaceAddress(); |
From: Jeroen F. <jfr...@us...> - 2015-08-27 12:08:26
|
Update of /cvsroot/ikvm/ikvm/runtime/openjdk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv938 Modified Files: java.net.cs Log Message: Use "wlan" prefix for wireless network interface names. Index: java.net.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/openjdk/java.net.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** java.net.cs 9 Jun 2015 09:28:44 -0000 1.5 --- java.net.cs 27 Aug 2015 12:08:24 -0000 1.6 *************** *** 467,470 **** --- 467,471 ---- int ppp = 0; int sl = 0; + int wlan = 0; int net = 0; for (int i = 0; i < ifaces.Length; i++) *************** *** 496,499 **** --- 497,503 ---- name = "sl" + sl++; break; + case NetworkInterfaceType.Wireless80211: + name = "wlan" + wlan++; + break; default: name = "net" + net++; |
From: Jeroen F. <jfr...@us...> - 2015-08-26 10:55:58
|
Update of /cvsroot/ikvm/ikvm In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv29760 Modified Files: Tag: v8_1 CommonAssemblyInfo.cs.in Log Message: Fixed build number to 5717. Index: CommonAssemblyInfo.cs.in =================================================================== RCS file: /cvsroot/ikvm/ikvm/CommonAssemblyInfo.cs.in,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -d -r1.14 -r1.14.2.1 *** CommonAssemblyInfo.cs.in 24 Mar 2015 09:43:14 -0000 1.14 --- CommonAssemblyInfo.cs.in 26 Aug 2015 10:55:56 -0000 1.14.2.1 *************** *** 30,34 **** [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] ! [assembly: AssemblyVersion("8.1.@BUILD@.0")] #if SIGNCODE --- 30,34 ---- [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] ! [assembly: AssemblyVersion("8.1.5717.0")] #if SIGNCODE |
From: Jeroen F. <jfr...@us...> - 2015-08-26 10:21:07
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28251/runtime Modified Files: Tag: v8_1 TypeWrapper.cs Log Message: Ported from main branch: - Fix for #303. Don't crash when trying to get interfaces from type from missing assembly reference. - Implemented atomic file move (on Windows). Index: TypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/TypeWrapper.cs,v retrieving revision 1.488 retrieving revision 1.488.2.1 diff -C2 -d -r1.488 -r1.488.2.1 *** TypeWrapper.cs 22 Jun 2015 13:17:59 -0000 1.488 --- TypeWrapper.cs 26 Aug 2015 10:21:04 -0000 1.488.2.1 *************** *** 3656,3659 **** --- 3656,3666 ---- get { + #if STATIC_COMPILER + if (missingType != null) + { + StaticCompiler.IssueMissingTypeMessage(missingType); + return TypeWrapper.EmptyArray; + } + #endif throw new InvalidOperationException("get_Interfaces called on UnloadableTypeWrapper: " + Name); } |
From: Jeroen F. <jfr...@us...> - 2015-08-26 10:21:06
|
Update of /cvsroot/ikvm/ikvm/openjdk/sun/nio/fs In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28251/openjdk/sun/nio/fs Modified Files: Tag: v8_1 NetFileSystemProvider.java Log Message: Ported from main branch: - Fix for #303. Don't crash when trying to get interfaces from type from missing assembly reference. - Implemented atomic file move (on Windows). Index: NetFileSystemProvider.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/openjdk/sun/nio/fs/NetFileSystemProvider.java,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -C2 -d -r1.19 -r1.19.2.1 *** NetFileSystemProvider.java 9 Jun 2015 09:28:44 -0000 1.19 --- NetFileSystemProvider.java 26 Aug 2015 10:21:03 -0000 1.19.2.1 *************** *** 37,40 **** --- 37,42 ---- import cli.System.IO.FileStream; import cli.System.IO.FileOptions; + import cli.System.Runtime.InteropServices.DllImportAttribute; + import cli.System.Runtime.InteropServices.Marshal; import cli.System.Security.AccessControl.FileSystemRights; import com.sun.nio.file.ExtendedOpenOption; *************** *** 629,632 **** --- 631,635 ---- NetPath ntarget = NetPath.from(target); boolean overwrite = false; + boolean atomicMove = false; for (CopyOption opt : options) { *************** *** 637,641 **** else if (opt == StandardCopyOption.ATOMIC_MOVE) { ! throw new AtomicMoveNotSupportedException(nsource.path, ntarget.path, "Unsupported copy option"); } else --- 640,651 ---- else if (opt == StandardCopyOption.ATOMIC_MOVE) { ! if (WINDOWS) ! { ! atomicMove = true; ! } ! else ! { ! throw new AtomicMoveNotSupportedException(nsource.path, ntarget.path, "Unsupported copy option"); ! } } else *************** *** 652,655 **** --- 662,695 ---- sm.checkWrite(ntarget.path); } + if (atomicMove) + { + int MOVEFILE_REPLACE_EXISTING = 1; + if (MoveFileEx(nsource.path, ntarget.path, MOVEFILE_REPLACE_EXISTING) == 0) + { + final int ERROR_FILE_NOT_FOUND = 2; + final int ERROR_PATH_NOT_FOUND = 3; + final int ERROR_ACCESS_DENIED = 5; + final int ERROR_NOT_SAME_DEVICE = 17; + final int ERROR_FILE_EXISTS = 80; + final int ERROR_ALREADY_EXISTS = 183; + int lastError = Marshal.GetLastWin32Error(); + switch (lastError) + { + case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + throw new NoSuchFileException(nsource.path, ntarget.path, null); + case ERROR_ACCESS_DENIED: + throw new AccessDeniedException(nsource.path, ntarget.path, null); + case ERROR_NOT_SAME_DEVICE: + throw new AtomicMoveNotSupportedException(nsource.path, ntarget.path, "Unsupported copy option"); + case ERROR_FILE_EXISTS: + case ERROR_ALREADY_EXISTS: + throw new FileAlreadyExistsException(nsource.path, ntarget.path, null); + default: + throw new FileSystemException(nsource.path, ntarget.path, "Error " + lastError); + } + } + return; + } try { *************** *** 712,715 **** --- 752,758 ---- } + @DllImportAttribute.Annotation(value="kernel32", SetLastError=true) + private static native int MoveFileEx(String lpExistingFileName, String lpNewFileName, int dwFlags); + public boolean isSameFile(Path path, Path path2) throws IOException { |
From: Jeroen F. <jfr...@us...> - 2015-08-26 10:19:13
|
Update of /cvsroot/ikvm/ikvm/openjdk/sun/nio/fs In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28142 Modified Files: NetFileSystemProvider.java Log Message: Implemented atomic file move (on Windows). Index: NetFileSystemProvider.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/openjdk/sun/nio/fs/NetFileSystemProvider.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** NetFileSystemProvider.java 9 Jun 2015 09:28:44 -0000 1.19 --- NetFileSystemProvider.java 26 Aug 2015 10:19:11 -0000 1.20 *************** *** 37,40 **** --- 37,42 ---- import cli.System.IO.FileStream; import cli.System.IO.FileOptions; + import cli.System.Runtime.InteropServices.DllImportAttribute; + import cli.System.Runtime.InteropServices.Marshal; import cli.System.Security.AccessControl.FileSystemRights; import com.sun.nio.file.ExtendedOpenOption; *************** *** 629,632 **** --- 631,635 ---- NetPath ntarget = NetPath.from(target); boolean overwrite = false; + boolean atomicMove = false; for (CopyOption opt : options) { *************** *** 637,641 **** else if (opt == StandardCopyOption.ATOMIC_MOVE) { ! throw new AtomicMoveNotSupportedException(nsource.path, ntarget.path, "Unsupported copy option"); } else --- 640,651 ---- else if (opt == StandardCopyOption.ATOMIC_MOVE) { ! if (WINDOWS) ! { ! atomicMove = true; ! } ! else ! { ! throw new AtomicMoveNotSupportedException(nsource.path, ntarget.path, "Unsupported copy option"); ! } } else *************** *** 652,655 **** --- 662,695 ---- sm.checkWrite(ntarget.path); } + if (atomicMove) + { + int MOVEFILE_REPLACE_EXISTING = 1; + if (MoveFileEx(nsource.path, ntarget.path, MOVEFILE_REPLACE_EXISTING) == 0) + { + final int ERROR_FILE_NOT_FOUND = 2; + final int ERROR_PATH_NOT_FOUND = 3; + final int ERROR_ACCESS_DENIED = 5; + final int ERROR_NOT_SAME_DEVICE = 17; + final int ERROR_FILE_EXISTS = 80; + final int ERROR_ALREADY_EXISTS = 183; + int lastError = Marshal.GetLastWin32Error(); + switch (lastError) + { + case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + throw new NoSuchFileException(nsource.path, ntarget.path, null); + case ERROR_ACCESS_DENIED: + throw new AccessDeniedException(nsource.path, ntarget.path, null); + case ERROR_NOT_SAME_DEVICE: + throw new AtomicMoveNotSupportedException(nsource.path, ntarget.path, "Unsupported copy option"); + case ERROR_FILE_EXISTS: + case ERROR_ALREADY_EXISTS: + throw new FileAlreadyExistsException(nsource.path, ntarget.path, null); + default: + throw new FileSystemException(nsource.path, ntarget.path, "Error " + lastError); + } + } + return; + } try { *************** *** 712,715 **** --- 752,758 ---- } + @DllImportAttribute.Annotation(value="kernel32", SetLastError=true) + private static native int MoveFileEx(String lpExistingFileName, String lpNewFileName, int dwFlags); + public boolean isSameFile(Path path, Path path2) throws IOException { |
From: Jeroen F. <jfr...@us...> - 2015-08-26 10:08:43
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27648 Modified Files: TypeWrapper.cs Log Message: Fix for #303. Don't crash when trying to get interfaces from type from missing assembly reference. Index: TypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/TypeWrapper.cs,v retrieving revision 1.488 retrieving revision 1.489 diff -C2 -d -r1.488 -r1.489 *** TypeWrapper.cs 22 Jun 2015 13:17:59 -0000 1.488 --- TypeWrapper.cs 26 Aug 2015 10:08:40 -0000 1.489 *************** *** 3656,3659 **** --- 3656,3666 ---- get { + #if STATIC_COMPILER + if (missingType != null) + { + StaticCompiler.IssueMissingTypeMessage(missingType); + return TypeWrapper.EmptyArray; + } + #endif throw new InvalidOperationException("get_Interfaces called on UnloadableTypeWrapper: " + Name); } |
From: Jeroen F. <jfr...@us...> - 2015-07-07 07:42:03
|
Update of /cvsroot/ikvm/ikvm/reflect In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12708 Modified Files: Signature.cs Log Message: Skip custom modifiers in MethodSpec. Index: Signature.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/reflect/Signature.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Signature.cs 21 Apr 2015 10:23:23 -0000 1.26 --- Signature.cs 7 Jul 2015 07:42:00 -0000 1.27 *************** *** 151,154 **** --- 151,155 ---- for (int i = 0; i < args.Length; i++) { + CustomModifiers.Skip(br); args[i] = ReadType(module, br, context); } |
From: Jeroen F. <jfr...@us...> - 2015-07-02 07:21:20
|
Update of /cvsroot/ikvm/ikvm/openjdk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11534/openjdk Modified Files: response.txt Log Message: Improved -removeassertions ikvmc optimization to remove more code (esp. allow otherwise empty <clinit> methods to be optimized away). Index: response.txt =================================================================== RCS file: /cvsroot/ikvm/ikvm/openjdk/response.txt,v retrieving revision 1.185 retrieving revision 1.186 diff -C2 -d -r1.185 -r1.186 *** response.txt 20 Jun 2015 05:18:30 -0000 1.185 --- response.txt 2 Jul 2015 07:21:17 -0000 1.186 *************** *** 194,198 **** { -out:IKVM.OpenJDK.Corba.dll ! -baseaddress:0x57350000 -recurse:resources.zip/com/sun/corba/* -recurse:resources.zip/com/sun/jndi/cosnaming/jndiprovider.properties --- 194,198 ---- { -out:IKVM.OpenJDK.Corba.dll ! -baseaddress:0x57320000 -recurse:resources.zip/com/sun/corba/* -recurse:resources.zip/com/sun/jndi/cosnaming/jndiprovider.properties *************** *** 315,319 **** { -out:IKVM.OpenJDK.XML.API.dll ! -baseaddress:0x57980000 -resource:META-INF/services/sun.util.spi.XmlPropertiesProvider=@OPENJDK@/jdk/src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider @OPENJDK@/jaxp/src/javax/xml/*.class --- 315,319 ---- { -out:IKVM.OpenJDK.XML.API.dll ! -baseaddress:0x57950000 -resource:META-INF/services/sun.util.spi.XmlPropertiesProvider=@OPENJDK@/jdk/src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider @OPENJDK@/jaxp/src/javax/xml/*.class *************** *** 350,354 **** { -out:IKVM.OpenJDK.XML.XPath.dll ! -baseaddress:0x57A40000 -recurse:resources.zip/com/sun/org/apache/xalan/internal/res/* @OPENJDK@/jaxp/src/com/sun/org/apache/xalan/internal/extensions/*.class --- 350,354 ---- { -out:IKVM.OpenJDK.XML.XPath.dll ! -baseaddress:0x57A10000 -recurse:resources.zip/com/sun/org/apache/xalan/internal/res/* @OPENJDK@/jaxp/src/com/sun/org/apache/xalan/internal/extensions/*.class *************** *** 375,379 **** { -out:IKVM.OpenJDK.XML.Parse.dll ! -baseaddress:0x57DA0000 -recurse:resources.zip/com/sun/org/apache/xerces/* -recurse:resources.zip/com/sun/org/apache/xml/internal/* --- 375,379 ---- { -out:IKVM.OpenJDK.XML.Parse.dll ! -baseaddress:0x57D70000 -recurse:resources.zip/com/sun/org/apache/xerces/* -recurse:resources.zip/com/sun/org/apache/xml/internal/* *************** *** 438,442 **** { -out:IKVM.OpenJDK.XML.Transform.dll ! -baseaddress:0x58580000 @OPENJDK@/jaxp/src/com/sun/java_cup/internal/runtime/*.class @OPENJDK@/jaxp/src/com/sun/org/apache/bcel/internal/*.class --- 438,442 ---- { -out:IKVM.OpenJDK.XML.Transform.dll ! -baseaddress:0x58550000 @OPENJDK@/jaxp/src/com/sun/java_cup/internal/runtime/*.class @OPENJDK@/jaxp/src/com/sun/org/apache/bcel/internal/*.class *************** *** 462,466 **** { -out:IKVM.OpenJDK.XML.Bind.dll ! -baseaddress:0x589D0000 -recurse:resources.zip/javax/xml/bind/* -recurse:resources.zip/com/sun/xml/internal/bind/* --- 462,466 ---- { -out:IKVM.OpenJDK.XML.Bind.dll ! -baseaddress:0x589A0000 -recurse:resources.zip/javax/xml/bind/* -recurse:resources.zip/com/sun/xml/internal/bind/* *************** *** 521,525 **** { -out:IKVM.OpenJDK.XML.WebServices.dll ! -baseaddress:0x58DF0000 -recurse:resources.zip/com/sun/xml/internal/messaging/* -recurse:resources.zip/com/sun/xml/internal/ws/* --- 521,525 ---- { -out:IKVM.OpenJDK.XML.WebServices.dll ! -baseaddress:0x58DC0000 -recurse:resources.zip/com/sun/xml/internal/messaging/* -recurse:resources.zip/com/sun/xml/internal/ws/* *************** *** 662,666 **** { -out:IKVM.OpenJDK.XML.Crypto.dll ! -baseaddress:0x59600000 @OPENJDK@/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/*.class @OPENJDK@/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/*.class --- 662,666 ---- { -out:IKVM.OpenJDK.XML.Crypto.dll ! -baseaddress:0x595D0000 @OPENJDK@/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/*.class @OPENJDK@/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/*.class *************** *** 698,702 **** { -out:IKVM.OpenJDK.SwingAWT.dll ! -baseaddress:0x59780000 -remap:swingawt.xml -resource:META-INF/services/sun.java2d.pipe.RenderingEngine=resources/META-INF/services/sun.java2d.pipe.RenderingEngine --- 698,702 ---- { -out:IKVM.OpenJDK.SwingAWT.dll ! -baseaddress:0x59750000 -remap:swingawt.xml -resource:META-INF/services/sun.java2d.pipe.RenderingEngine=resources/META-INF/services/sun.java2d.pipe.RenderingEngine *************** *** 798,802 **** { -out:IKVM.OpenJDK.Charsets.dll ! -baseaddress:0x5A9B0000 -resource:sun/nio/cs/ext/sjis0213.dat=@OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/nio/cs/ext/sjis0213.dat @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/nio/cs/ext/*.class --- 798,802 ---- { -out:IKVM.OpenJDK.Charsets.dll ! -baseaddress:0x5A980000 -resource:sun/nio/cs/ext/sjis0213.dat=@OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/nio/cs/ext/sjis0213.dat @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/nio/cs/ext/*.class *************** *** 805,809 **** { -out:IKVM.OpenJDK.Util.dll ! -baseaddress:0x5AEC0000 -recurse:resources.zip/com/sun/java/util/jar/pack/intrinsic.properties -recurse:resources.zip/sun/launcher/resources/* --- 805,809 ---- { -out:IKVM.OpenJDK.Util.dll ! -baseaddress:0x5AE90000 -recurse:resources.zip/com/sun/java/util/jar/pack/intrinsic.properties -recurse:resources.zip/sun/launcher/resources/* *************** *** 831,835 **** { -out:IKVM.OpenJDK.Text.dll ! -baseaddress:0x5B190000 -recurse:resources.zip/sun/text/resources/* @OPENJDK@/jdk/src/share/classes/java/text/*.class --- 831,835 ---- { -out:IKVM.OpenJDK.Text.dll ! -baseaddress:0x5B160000 -recurse:resources.zip/sun/text/resources/* @OPENJDK@/jdk/src/share/classes/java/text/*.class *************** *** 843,847 **** { -out:IKVM.OpenJDK.Security.dll ! -baseaddress:0x5B340000 -remap:security.xml sun/security/jgss/wrapper/*.class --- 843,847 ---- { -out:IKVM.OpenJDK.Security.dll ! -baseaddress:0x5B310000 -remap:security.xml sun/security/jgss/wrapper/*.class *************** *** 917,921 **** { -out:IKVM.OpenJDK.Management.dll ! -baseaddress:0x5BB80000 java/lang/management/*.class sun/management/*.class --- 917,921 ---- { -out:IKVM.OpenJDK.Management.dll ! -baseaddress:0x5BB50000 java/lang/management/*.class sun/management/*.class *************** *** 951,955 **** { -out:IKVM.OpenJDK.Misc.dll ! -baseaddress:0x5BF10000 @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/misc/resources/*.class @OPENJDK@/corba/src/share/classes/javax/activity/*.class --- 951,955 ---- { -out:IKVM.OpenJDK.Misc.dll ! -baseaddress:0x5BEE0000 @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/misc/resources/*.class @OPENJDK@/corba/src/share/classes/javax/activity/*.class *************** *** 982,986 **** { -out:IKVM.OpenJDK.Naming.dll ! -baseaddress:0x5BFD0000 -recurse:resources.zip/com/sun/jndi/ldap/jndiprovider.properties -resource:META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor=@OPENJDK@/jdk/src/share/classes/sun/net/spi/nameservice/dns/META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor --- 982,986 ---- { -out:IKVM.OpenJDK.Naming.dll ! -baseaddress:0x5BFA0000 -recurse:resources.zip/com/sun/jndi/ldap/jndiprovider.properties -resource:META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor=@OPENJDK@/jdk/src/share/classes/sun/net/spi/nameservice/dns/META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor *************** *** 1008,1012 **** { -out:IKVM.OpenJDK.Jdbc.dll ! -baseaddress:0x5C150000 -resource:META-INF/services/java.sql.Driver=resources/META-INF/services/java.sql.Driver -recurse:resources.zip/com/sun/rowset/* --- 1008,1012 ---- { -out:IKVM.OpenJDK.Jdbc.dll ! -baseaddress:0x5C120000 -resource:META-INF/services/java.sql.Driver=resources/META-INF/services/java.sql.Driver -recurse:resources.zip/com/sun/rowset/* *************** *** 1025,1029 **** { -out:IKVM.OpenJDK.Remoting.dll ! -baseaddress:0x5C2D0000 -recurse:resources.zip/sun/rmi/* rmistubs/com/sun/jndi/rmi/registry/*.class --- 1025,1029 ---- { -out:IKVM.OpenJDK.Remoting.dll ! -baseaddress:0x5C2A0000 -recurse:resources.zip/sun/rmi/* rmistubs/com/sun/jndi/rmi/registry/*.class *************** *** 1051,1055 **** { -out:IKVM.OpenJDK.Beans.dll ! -baseaddress:0x5C420000 -resource:META-INF/mailcap.default=@OPENJDK@/jaxws/src/share/jaf_classes/META-INF/mailcap.default -resource:META-INF/mimetypes.default=@OPENJDK@/jaxws/src/share/jaf_classes/META-INF/mimetypes.default --- 1051,1055 ---- { -out:IKVM.OpenJDK.Beans.dll ! -baseaddress:0x5C3F0000 -resource:META-INF/mailcap.default=@OPENJDK@/jaxws/src/share/jaf_classes/META-INF/mailcap.default -resource:META-INF/mimetypes.default=@OPENJDK@/jaxws/src/share/jaf_classes/META-INF/mimetypes.default *************** *** 1067,1071 **** { -out:IKVM.OpenJDK.Media.dll ! -baseaddress:0x5C510000 -resource:META-INF/services/javax.print.PrintServiceLookup=@OPENJDK@/jdk/src/windows/classes/sun/print/services/javax.print.PrintServiceLookup -resource:META-INF/services/javax.print.StreamPrintServiceFactory=@OPENJDK@/jdk/src/windows/classes/sun/print/services/javax.print.StreamPrintServiceFactory --- 1067,1071 ---- { -out:IKVM.OpenJDK.Media.dll ! -baseaddress:0x5C4E0000 -resource:META-INF/services/javax.print.PrintServiceLookup=@OPENJDK@/jdk/src/windows/classes/sun/print/services/javax.print.PrintServiceLookup -resource:META-INF/services/javax.print.StreamPrintServiceFactory=@OPENJDK@/jdk/src/windows/classes/sun/print/services/javax.print.StreamPrintServiceFactory *************** *** 1114,1118 **** { -out:IKVM.OpenJDK.Nashorn.dll ! -baseaddress:0x5C780000 -resource:META-INF/services/javax.script.ScriptEngineFactory=@OPENJDK@/nashorn/src/META-INF/services/javax.script.ScriptEngineFactory -resource:jdk/nashorn/internal/runtime/resources/version.properties=resources/nashorn/version.properties --- 1114,1118 ---- { -out:IKVM.OpenJDK.Nashorn.dll ! -baseaddress:0x5C750000 -resource:META-INF/services/javax.script.ScriptEngineFactory=@OPENJDK@/nashorn/src/META-INF/services/javax.script.ScriptEngineFactory -resource:jdk/nashorn/internal/runtime/resources/version.properties=resources/nashorn/version.properties *************** *** 1152,1156 **** { -out:IKVM.OpenJDK.Localedata.dll ! -baseaddress:0x5CCF0000 @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/util/resources/*.class @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/util/resources/ar/*.class --- 1152,1156 ---- { -out:IKVM.OpenJDK.Localedata.dll ! -baseaddress:0x5CCC0000 @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/util/resources/*.class @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/util/resources/ar/*.class *************** *** 1253,1257 **** { -out:IKVM.OpenJDK.Cldrdata.dll ! -baseaddress:0x5D1D0000 @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/text/resources/cldr/*.class @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/text/resources/cldr/aa/*.class --- 1253,1257 ---- { -out:IKVM.OpenJDK.Cldrdata.dll ! -baseaddress:0x5D1A0000 @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/text/resources/cldr/*.class @OPENJDK@/build/linux-x86_64-normal-server-release/jdk/gensrc/sun/text/resources/cldr/aa/*.class |
From: Jeroen F. <jfr...@us...> - 2015-06-30 11:51:06
|
Update of /cvsroot/ikvm/ikvm/openjdk/sun/awt In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7357/sun/awt Added Files: DebugSettings.java Removed Files: SunToolkit.java Log Message: Unforked sun/awt/SunToolkit.java. --- SunToolkit.java DELETED --- --- NEW FILE: DebugSettings.java --- /* Copyright (C) 2015 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 sun.awt; final class DebugSettings { static void init() { } } |
From: Jeroen F. <jfr...@us...> - 2015-06-30 11:51:05
|
Update of /cvsroot/ikvm/ikvm/openjdk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7357 Modified Files: FORKED allsources.lst Log Message: Unforked sun/awt/SunToolkit.java. Index: allsources.lst =================================================================== RCS file: /cvsroot/ikvm/ikvm/openjdk/allsources.lst,v retrieving revision 1.275 retrieving revision 1.276 diff -C2 -d -r1.275 -r1.276 *** allsources.lst 26 Jun 2015 14:41:57 -0000 1.275 --- allsources.lst 30 Jun 2015 11:51:02 -0000 1.276 *************** *** 153,157 **** sun/awt/shell/Win32ShellFolder2.java sun/awt/shell/Win32ShellFolderManager2.java ! sun/awt/SunToolkit.java sun/awt/Win32FontManager.java sun/awt/X11FontManager.java --- 153,157 ---- sun/awt/shell/Win32ShellFolder2.java sun/awt/shell/Win32ShellFolderManager2.java ! sun/awt/DebugSettings.java sun/awt/Win32FontManager.java sun/awt/X11FontManager.java *************** *** 13064,13067 **** --- 13064,13068 ---- @OPENJDK@/jdk/src/share/classes/sun/awt/SunGraphicsCallback.java @OPENJDK@/jdk/src/share/classes/sun/awt/SunHints.java + @OPENJDK@/jdk/src/share/classes/sun/awt/SunToolkit.java @OPENJDK@/jdk/src/share/classes/sun/awt/Symbol.java @OPENJDK@/jdk/src/share/classes/sun/awt/TimedWindowEvent.java Index: FORKED =================================================================== RCS file: /cvsroot/ikvm/ikvm/openjdk/FORKED,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** FORKED 26 Jun 2015 14:41:57 -0000 1.12 --- FORKED 30 Jun 2015 11:51:02 -0000 1.13 *************** *** 59,63 **** jdk/src/share/classes/sun/awt/image/SunWritableRaster.java=sun/awt/image/SunWritableRaster.java jdk/src/share/classes/sun/awt/image/ToolkitImage.java=sun/awt/image/ToolkitImage.java - jdk/src/share/classes/sun/awt/SunToolkit.java=sun/awt/SunToolkit.java jdk/src/share/classes/sun/font/FontManager.java=sun/font/FontManager.java jdk/src/share/classes/sun/font/StrikeCache.java=sun/font/StrikeCache.java --- 59,62 ---- |
From: Jeroen F. <jfr...@us...> - 2015-06-30 10:18:08
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv2380 Modified Files: DynamicTypeWrapper.cs Log Message: Improved IsSideEffectFreeStaticInitializerOrNoop() to handle needless zero/null initialization of static fields. Removed bogus handling of incorrect return statements. Index: DynamicTypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/DynamicTypeWrapper.cs,v retrieving revision 1.278 retrieving revision 1.279 diff -C2 -d -r1.278 -r1.279 *** DynamicTypeWrapper.cs 29 Jun 2015 10:15:15 -0000 1.278 --- DynamicTypeWrapper.cs 30 Jun 2015 10:18:05 -0000 1.279 *************** *** 1177,1184 **** return false; } - if (!field.IsFinal || !field.IsStatic) - { - noop = false; - } } else if (field.IsProperty && field.PropertyGetter != null) --- 1177,1180 ---- *************** *** 1188,1200 **** } } - else if (bc == NormalizedByteCode.__areturn || - bc == NormalizedByteCode.__ireturn || - bc == NormalizedByteCode.__lreturn || - bc == NormalizedByteCode.__freturn || - bc == NormalizedByteCode.__dreturn) - { - noop = false; - return false; - } else if (ByteCodeMetaData.CanThrowException(bc)) { --- 1184,1187 ---- *************** *** 1203,1206 **** --- 1190,1194 ---- } else if (bc == NormalizedByteCode.__aconst_null + || (bc == NormalizedByteCode.__iconst && m.Instructions[i].Arg1 == 0) || bc == NormalizedByteCode.__return || bc == NormalizedByteCode.__nop) |
From: Jeroen F. <jfr...@us...> - 2015-06-30 07:44:55
|
Update of /cvsroot/ikvm/ikvm/runtime/openjdk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26350/runtime/openjdk Modified Files: java.lang.cs Log Message: Reduced the number of differences between upstream and our version of java/lang/System.java. Index: java.lang.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/openjdk/java.lang.cs,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** java.lang.cs 29 Jun 2015 09:56:13 -0000 1.24 --- java.lang.cs 30 Jun 2015 07:44:52 -0000 1.25 *************** *** 1175,1178 **** --- 1175,1237 ---- static class Java_java_lang_System { + public static void registerNatives() + { + } + + public static void setIn0(object @in) + { + #if !FIRST_PASS + java.lang.StdIO.@in = (java.io.InputStream)@in; + #endif + } + + public static void setOut0(object @out) + { + #if !FIRST_PASS + java.lang.StdIO.@out = (java.io.PrintStream)@out; + #endif + } + + public static void setErr0(object err) + { + #if !FIRST_PASS + java.lang.StdIO.err = (java.io.PrintStream)err; + #endif + } + + public static object initProperties(object props) + { + #if FIRST_PASS + return null; + #else + java.lang.VMSystemProperties.initProperties((java.util.Properties)props); + return props; + #endif + } + + public static string mapLibraryName(string libname) + { + #if FIRST_PASS + return null; + #else + if (libname == null) + { + throw new java.lang.NullPointerException(); + } + if (ikvm.@internal.Util.WINDOWS) + { + return libname + ".dll"; + } + else if (ikvm.@internal.Util.MACOSX) + { + return "lib" + libname + ".jnilib"; + } + else + { + return "lib" + libname + ".so"; + } + #endif + } + public static void arraycopy(object src, int srcPos, object dest, int destPos, int length) { |
From: Jeroen F. <jfr...@us...> - 2015-06-30 07:44:54
|
Update of /cvsroot/ikvm/ikvm/openjdk/java/lang In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26350/openjdk/java/lang Modified Files: System.java Log Message: Reduced the number of differences between upstream and our version of java/lang/System.java. Index: System.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/openjdk/java/lang/System.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** System.java 9 Jun 2015 09:28:43 -0000 1.27 --- System.java 30 Jun 2015 07:44:52 -0000 1.28 *************** *** 92,95 **** --- 92,107 ---- public final class System { + /* register the natives via the static initializer. + * + * VM will invoke the initializeSystemClass method to complete + * the initialization for this class separated from clinit. + * Note that to use properties set by the VM, see the constraints + * described in the initializeSystemClass method. + */ + private static native void registerNatives(); + static { + //registerNatives(); + } + /** Don't let anyone instantiate this class */ private System() { *************** *** 103,110 **** */ @ikvm.lang.Property(get="get_in") ! public final static InputStream in; ! ! static { in = null; } ! private static InputStream get_in() { --- 115,120 ---- */ @ikvm.lang.Property(get="get_in") ! public final static InputStream in = null; ! private static InputStream get_in() { *************** *** 138,145 **** */ @ikvm.lang.Property(get="get_out") ! public final static PrintStream out; ! ! static { out = null; } ! private static PrintStream get_out() { --- 148,153 ---- */ @ikvm.lang.Property(get="get_out") ! public final static PrintStream out = null; ! private static PrintStream get_out() { *************** *** 160,166 **** */ @ikvm.lang.Property(get="get_err") ! public final static PrintStream err; ! ! static { err = null ; } private static PrintStream get_err() --- 168,172 ---- */ @ikvm.lang.Property(get="get_err") ! public final static PrintStream err = null; private static PrintStream get_err() *************** *** 171,175 **** /* The security manager for the system. */ ! private static volatile SecurityManager security; /** --- 177,181 ---- /* The security manager for the system. */ ! private static volatile SecurityManager security = null; /** *************** *** 195,199 **** public static void setIn(InputStream in) { checkIO(); ! StdIO.in = in; } --- 201,205 ---- public static void setIn(InputStream in) { checkIO(); ! setIn0(in); } *************** *** 219,223 **** public static void setOut(PrintStream out) { checkIO(); ! StdIO.out = out; } --- 225,229 ---- public static void setOut(PrintStream out) { checkIO(); ! setOut0(out); } *************** *** 243,250 **** public static void setErr(PrintStream err) { checkIO(); ! StdIO.err = err; } ! private static volatile Console cons; /** * Returns the unique {@link java.io.Console Console} object associated --- 249,256 ---- public static void setErr(PrintStream err) { checkIO(); ! setErr0(err); } ! private static volatile Console cons = null; /** * Returns the unique {@link java.io.Console Console} object associated *************** *** 300,303 **** --- 306,313 ---- } + private static native void setIn0(InputStream in); + private static native void setOut0(PrintStream out); + private static native void setErr0(PrintStream err); + /** * Sets the System security. *************** *** 583,587 **** */ ! //private static native Properties initProperties(Properties props); /** --- 593,602 ---- */ ! @ikvm.lang.Property(get="get_props", set="set_props") ! private static Properties props; ! private static native Properties initProperties(Properties props); ! ! private static Properties get_props() { return Props.props; } ! private static void set_props(Properties value) { Props.props = value; } /** *************** *** 684,688 **** } ! return Props.props; } --- 699,703 ---- } ! return props; } *************** *** 699,705 **** */ public static String lineSeparator() { ! return Props.lineSeparator; } /** * Sets the system properties to the <code>Properties</code> --- 714,726 ---- */ public static String lineSeparator() { ! return lineSeparator; } + @ikvm.lang.Property(get="get_lineSeparator", set="set_lineSeparator") + private static String lineSeparator; + + private static String get_lineSeparator() { return Props.lineSeparator; } + private static void set_lineSeparator(String value) { Props.lineSeparator = value; } + /** * Sets the system properties to the <code>Properties</code> *************** *** 731,737 **** if (props == null) { props = new Properties(); ! VMSystemProperties.initProperties(props); } ! Props.props = props; } --- 752,758 ---- if (props == null) { props = new Properties(); ! initProperties(props); } ! System.props = props; } *************** *** 769,773 **** } ! return Props.props.getProperty(key); } --- 790,794 ---- } ! return props.getProperty(key); } *************** *** 805,809 **** } ! return Props.props.getProperty(key, def); } --- 826,830 ---- } ! return props.getProperty(key, def); } *************** *** 845,849 **** } ! return (String) Props.props.setProperty(key, value); } --- 866,870 ---- } ! return (String) props.setProperty(key, value); } *************** *** 882,886 **** } ! return (String) Props.props.remove(key); } --- 903,907 ---- } ! return (String) props.remove(key); } *************** *** 1186,1201 **** * @since 1.2 */ ! public static String mapLibraryName(String libname) { ! if (libname == null) { ! throw new NullPointerException(); ! } ! if (ikvm.internal.Util.WINDOWS) { ! return libname + ".dll"; ! } else if (ikvm.internal.Util.MACOSX) { ! return "lib" + libname + ".jnilib"; ! } else { ! return "lib" + libname + ".so"; ! } ! } /** --- 1207,1211 ---- * @since 1.2 */ ! public static native String mapLibraryName(String libname); /** |
From: Jeroen F. <jfr...@us...> - 2015-06-29 10:15:17
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16048 Modified Files: ClassFile.cs DynamicTypeWrapper.cs MemberWrapper.cs Log Message: Cleaned up static initializer optimization to use FieldWrapper.IsSerialVersionUID. Index: MemberWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/MemberWrapper.cs,v retrieving revision 1.209 retrieving revision 1.210 diff -C2 -d -r1.209 -r1.210 *** MemberWrapper.cs 29 Jun 2015 10:12:11 -0000 1.209 --- MemberWrapper.cs 29 Jun 2015 10:15:15 -0000 1.210 *************** *** 54,57 **** --- 54,58 ---- DelegateInvokeWithByRefParameter = 1024, Type2FinalField = 2048, + NoOp = 4096, // empty static initializer } *************** *** 297,300 **** --- 298,306 ---- } + internal bool IsNoOp + { + get { return (flags & MemberFlags.NoOp) != 0; } + } + internal Modifiers Modifiers { *************** *** 879,898 **** } - // placeholder for <clinit> method that exist in ClassFile but not in TypeWrapper - // (because it is optimized away) - sealed class DummyMethodWrapper : MethodWrapper - { - internal DummyMethodWrapper(TypeWrapper tw) - : base(tw, StringConstants.CLINIT, StringConstants.SIG_VOID, null, PrimitiveTypeWrapper.VOID, TypeWrapper.EmptyArray, Modifiers.Static, MemberFlags.None) - { - } - - protected override void DoLinkMethod() - { - // we're pre-linked (because we pass the signature types to the base constructor) - throw new InvalidOperationException(); - } - } - abstract class SmartMethodWrapper : MethodWrapper { --- 885,888 ---- Index: ClassFile.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/ClassFile.cs,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** ClassFile.cs 26 Jun 2015 11:22:19 -0000 1.137 --- ClassFile.cs 29 Jun 2015 10:15:15 -0000 1.138 *************** *** 3865,3877 **** return null; } - - internal bool HasSerialVersionUID - { - get - { - Field field = GetField("serialVersionUID", "J"); - return field != null && field.IsStatic && field.IsFinal; - } - } } } --- 3865,3868 ---- Index: DynamicTypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/DynamicTypeWrapper.cs,v retrieving revision 1.277 retrieving revision 1.278 diff -C2 -d -r1.277 -r1.278 *** DynamicTypeWrapper.cs 29 Jun 2015 10:12:11 -0000 1.277 --- DynamicTypeWrapper.cs 29 Jun 2015 10:15:15 -0000 1.278 *************** *** 498,502 **** internal void CreateStep1() { ! // process all methods bool hasclinit = wrapper.BaseTypeWrapper == null ? false : wrapper.BaseTypeWrapper.HasStaticInitializer; methods = new MethodWrapper[classFile.Methods.Length]; --- 498,502 ---- internal void CreateStep1() { ! // process all methods (needs to be done first, because property fields depend on being able to lookup the accessor methods) bool hasclinit = wrapper.BaseTypeWrapper == null ? false : wrapper.BaseTypeWrapper.HasStaticInitializer; methods = new MethodWrapper[classFile.Methods.Length]; *************** *** 504,507 **** --- 504,508 ---- for (int i = 0; i < methods.Length; i++) { + MemberFlags flags = MemberFlags.None; ClassFile.Method m = classFile.Methods[i]; if (m.IsClassInitializer) *************** *** 511,520 **** if (IsSideEffectFreeStaticInitializerOrNoop(m, out noop)) { ! // because we cannot affect serialVersionUID computation (which is the only way the presence of a <clinit> can surface) ! // we cannot do this optimization if the class is serializable but doesn't have a serialVersionUID ! if (noop && (!wrapper.IsSerializable || classFile.HasSerialVersionUID)) { ! methods[i] = new DummyMethodWrapper(wrapper); ! continue; } } --- 512,518 ---- if (IsSideEffectFreeStaticInitializerOrNoop(m, out noop)) { ! if (noop) { ! flags |= MemberFlags.NoOp; } } *************** *** 527,531 **** #endif } - MemberFlags flags = MemberFlags.None; if (m.IsInternal) { --- 525,528 ---- *************** *** 2913,2916 **** --- 2910,2914 ---- internal override MethodBase LinkMethod(MethodWrapper mw) { + Debug.Assert(mw != null); if (mw is DelegateConstructorMethodWrapper) { *************** *** 2922,2926 **** return ((DelegateInvokeStubMethodWrapper)mw).DoLink(typeBuilder); } ! Debug.Assert(mw != null); int index = GetMethodIndex(mw); if (baseMethods[index] != null) --- 2920,2930 ---- return ((DelegateInvokeStubMethodWrapper)mw).DoLink(typeBuilder); } ! if (mw.IsClassInitializer && mw.IsNoOp && (!wrapper.IsSerializable || HasSerialVersionUID)) ! { ! // we don't need to emit the <clinit>, because it is empty and we're not serializable or have an explicit serialVersionUID ! // (because we cannot affect serialVersionUID computation (which is the only way the presence of a <clinit> can surface) ! // we cannot do this optimization if the class is serializable but doesn't have a serialVersionUID) ! return null; ! } int index = GetMethodIndex(mw); if (baseMethods[index] != null) *************** *** 3078,3081 **** --- 3082,3100 ---- } + private bool HasSerialVersionUID + { + get + { + foreach (FieldWrapper field in fields) + { + if (field.IsSerialVersionUID) + { + return true; + } + } + return false; + } + } + private MethodBuilder GenerateConstructor(MethodWrapper mw) { |
From: Jeroen F. <jfr...@us...> - 2015-06-29 10:12:13
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15800 Modified Files: DynamicTypeWrapper.cs MemberWrapper.cs Log Message: Added FieldWrapper.IsSerialVersionUID property to properly (and consistently) detect serialVersionUID fields. Index: MemberWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/MemberWrapper.cs,v retrieving revision 1.208 retrieving revision 1.209 diff -C2 -d -r1.208 -r1.209 *** MemberWrapper.cs 29 Jun 2015 10:06:14 -0000 1.208 --- MemberWrapper.cs 29 Jun 2015 10:12:11 -0000 1.209 *************** *** 1532,1535 **** --- 1532,1550 ---- } + internal bool IsSerialVersionUID + { + get + { + // a serialVersionUID field must be static and final to be recognized (see ObjectStreamClass.getDeclaredSUID()) + return (Modifiers & (Modifiers.Static | Modifiers.Final)) == (Modifiers.Static | Modifiers.Final) + && Name == "serialVersionUID" + && (FieldTypeWrapper == PrimitiveTypeWrapper.LONG + || FieldTypeWrapper == PrimitiveTypeWrapper.INT + || FieldTypeWrapper == PrimitiveTypeWrapper.CHAR + || FieldTypeWrapper == PrimitiveTypeWrapper.SHORT + || FieldTypeWrapper == PrimitiveTypeWrapper.BYTE); + } + } + internal static FieldWrapper Create(TypeWrapper declaringType, TypeWrapper fieldType, FieldInfo fi, string name, string sig, ExModifiers modifiers) { Index: DynamicTypeWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/DynamicTypeWrapper.cs,v retrieving revision 1.276 retrieving revision 1.277 diff -C2 -d -r1.276 -r1.277 *** DynamicTypeWrapper.cs 26 Jun 2015 11:26:44 -0000 1.276 --- DynamicTypeWrapper.cs 29 Jun 2015 10:12:11 -0000 1.277 *************** *** 1525,1529 **** && fw.IsStatic && fw.IsFinal ! && fw.Name != "serialVersionUID" && classFile.Fields[fieldIndex].Annotations == null && !classFile.IsReferenced(classFile.Fields[fieldIndex])) --- 1525,1529 ---- && fw.IsStatic && fw.IsFinal ! && !fw.IsSerialVersionUID && classFile.Fields[fieldIndex].Annotations == null && !classFile.IsReferenced(classFile.Fields[fieldIndex])) |
From: Jeroen F. <jfr...@us...> - 2015-06-29 10:06:16
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15357 Modified Files: MemberWrapper.cs Log Message: Emit warning if property getter/setter is missing. Index: MemberWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/MemberWrapper.cs,v retrieving revision 1.207 retrieving revision 1.208 diff -C2 -d -r1.207 -r1.208 *** MemberWrapper.cs 29 Jun 2015 09:56:13 -0000 1.207 --- MemberWrapper.cs 29 Jun 2015 10:06:14 -0000 1.208 *************** *** 1805,1809 **** if(getter == null) { ! EmitThrowNoSuchMethodErrorForGetter(ilgen, this.FieldTypeWrapper, this.IsStatic); } else if(getter.IsStatic) --- 1805,1809 ---- if(getter == null) { ! EmitThrowNoSuchMethodErrorForGetter(ilgen, this.FieldTypeWrapper, this); } else if(getter.IsStatic) *************** *** 1817,1822 **** } ! internal static void EmitThrowNoSuchMethodErrorForGetter(CodeEmitter ilgen, TypeWrapper type, bool isStatic) { // HACK the branch around the throw is to keep the verifier happy CodeEmitterLabel label = ilgen.DefineLabel(); --- 1817,1825 ---- } ! internal static void EmitThrowNoSuchMethodErrorForGetter(CodeEmitter ilgen, TypeWrapper type, MemberWrapper member) { + #if STATIC_COMPILER + StaticCompiler.IssueMessage(Message.EmittedNoSuchMethodError, "<unknown>", member.DeclaringType.Name + "." + member.Name + member.Signature); + #endif // HACK the branch around the throw is to keep the verifier happy CodeEmitterLabel label = ilgen.DefineLabel(); *************** *** 1825,1829 **** ilgen.EmitThrow("java.lang.NoSuchMethodError"); ilgen.MarkLabel(label); ! if (!isStatic) { ilgen.Emit(OpCodes.Pop); --- 1828,1832 ---- ilgen.EmitThrow("java.lang.NoSuchMethodError"); ilgen.MarkLabel(label); ! if (!member.IsStatic) { ilgen.Emit(OpCodes.Pop); *************** *** 1846,1850 **** else { ! EmitThrowNoSuchMethodErrorForSetter(ilgen, this.IsStatic); } } --- 1849,1853 ---- else { ! EmitThrowNoSuchMethodErrorForSetter(ilgen, this); } } *************** *** 1859,1864 **** } ! internal static void EmitThrowNoSuchMethodErrorForSetter(CodeEmitter ilgen, bool isStatic) { // HACK the branch around the throw is to keep the verifier happy CodeEmitterLabel label = ilgen.DefineLabel(); --- 1862,1870 ---- } ! internal static void EmitThrowNoSuchMethodErrorForSetter(CodeEmitter ilgen, MemberWrapper member) { + #if STATIC_COMPILER + StaticCompiler.IssueMessage(Message.EmittedNoSuchMethodError, "<unknown>", member.DeclaringType.Name + "." + member.Name + member.Signature); + #endif // HACK the branch around the throw is to keep the verifier happy CodeEmitterLabel label = ilgen.DefineLabel(); *************** *** 1868,1872 **** ilgen.MarkLabel(label); ilgen.Emit(OpCodes.Pop); ! if (!isStatic) { ilgen.Emit(OpCodes.Pop); --- 1874,1878 ---- ilgen.MarkLabel(label); ilgen.Emit(OpCodes.Pop); ! if (!member.IsStatic) { ilgen.Emit(OpCodes.Pop); *************** *** 1914,1918 **** if(getter == null) { ! DynamicPropertyFieldWrapper.EmitThrowNoSuchMethodErrorForGetter(ilgen, this.FieldTypeWrapper, this.IsStatic); } else if(getter.IsStatic) --- 1920,1924 ---- if(getter == null) { ! DynamicPropertyFieldWrapper.EmitThrowNoSuchMethodErrorForGetter(ilgen, this.FieldTypeWrapper, this); } else if(getter.IsStatic) *************** *** 1941,1945 **** else { ! DynamicPropertyFieldWrapper.EmitThrowNoSuchMethodErrorForSetter(ilgen, this.IsStatic); } } --- 1947,1951 ---- else { ! DynamicPropertyFieldWrapper.EmitThrowNoSuchMethodErrorForSetter(ilgen, this); } } |
From: Jeroen F. <jfr...@us...> - 2015-06-29 09:59:15
|
Update of /cvsroot/ikvm/ikvm/runtime/openjdk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14670 Modified Files: misc.cs Log Message: Use new "native" method field binding support to avoid reflection. Index: misc.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/openjdk/misc.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** misc.cs 29 Jun 2015 09:43:16 -0000 1.8 --- misc.cs 29 Jun 2015 09:59:13 -0000 1.9 *************** *** 352,363 **** static class Java_com_sun_security_auth_module_NTSystem { ! public static void getCurrent(object thisObj, bool debug) { WindowsIdentity id = WindowsIdentity.GetCurrent(); string[] name = id.Name.Split('\\'); ! SetField(thisObj, "userName", name[1]); ! SetField(thisObj, "domain", name[0]); ! SetField(thisObj, "domainSID", id.User.AccountDomainSid.Value); ! SetField(thisObj, "userSID", id.User.Value); string[] groups = new string[id.Groups.Count]; for (int i = 0; i < groups.Length; i++) --- 352,363 ---- static class Java_com_sun_security_auth_module_NTSystem { ! public static void getCurrent(object thisObj, bool debug, ref string userName, ref string domain, ref string domainSID, ref string userSID, ref string[] groupIDs, ref string primaryGroupID) { WindowsIdentity id = WindowsIdentity.GetCurrent(); string[] name = id.Name.Split('\\'); ! userName = name[1]; ! domain = name[0]; ! domainSID = id.User.AccountDomainSid.Value; ! userSID = id.User.Value; string[] groups = new string[id.Groups.Count]; for (int i = 0; i < groups.Length; i++) *************** *** 365,376 **** groups[i] = id.Groups[i].Value; } ! SetField(thisObj, "groupIDs", groups); // HACK it turns out that Groups[0] is the primary group, but AFAIK this is not documented anywhere ! SetField(thisObj, "primaryGroupID", groups[0]); ! } ! ! private static void SetField(object thisObj, string field, object value) ! { ! thisObj.GetType().GetField(field, BindingFlags.NonPublic | BindingFlags.Instance).SetValue(thisObj, value); } --- 365,371 ---- groups[i] = id.Groups[i].Value; } ! groupIDs = groups; // HACK it turns out that Groups[0] is the primary group, but AFAIK this is not documented anywhere ! primaryGroupID = groups[0]; } |
From: Jeroen F. <jfr...@us...> - 2015-06-29 09:56:16
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14396 Modified Files: MemberWrapper.cs intrinsics.cs Log Message: Added MethodWrapper.IsClassInitializer and use it and IsConstructor instead of name comparisons. Index: intrinsics.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/intrinsics.cs,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** intrinsics.cs 18 Nov 2014 11:34:04 -0000 1.47 --- intrinsics.cs 29 Jun 2015 09:56:13 -0000 1.48 *************** *** 617,621 **** // it is only valid to replace a ThreadLocal instantiation by our ThreadStatic based version, if we can prove that the instantiation only happens once // (which is the case when we're in <clinit> and there aren't any branches that lead to the current position) ! if (eic.Caller.Name != StringConstants.CLINIT) { return false; --- 617,621 ---- // it is only valid to replace a ThreadLocal instantiation by our ThreadStatic based version, if we can prove that the instantiation only happens once // (which is the case when we're in <clinit> and there aren't any branches that lead to the current position) ! if (!eic.Caller.IsClassInitializer) { return false; Index: MemberWrapper.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/MemberWrapper.cs,v retrieving revision 1.206 retrieving revision 1.207 diff -C2 -d -r1.206 -r1.207 *** MemberWrapper.cs 31 May 2015 12:10:51 -0000 1.206 --- MemberWrapper.cs 29 Jun 2015 09:56:13 -0000 1.207 *************** *** 854,857 **** --- 854,862 ---- } + internal bool IsClassInitializer + { + get { return (object)Name == (object)StringConstants.CLINIT; } + } + internal bool IsVirtual { |
From: Jeroen F. <jfr...@us...> - 2015-06-29 09:43:18
|
Update of /cvsroot/ikvm/ikvm/runtime/openjdk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13617 Modified Files: misc.cs Log Message: RNGCryptoServiceProvider should be disposed on .NET 4. Index: misc.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/openjdk/misc.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** misc.cs 9 Jun 2015 09:28:44 -0000 1.7 --- misc.cs 29 Jun 2015 09:43:16 -0000 1.8 *************** *** 301,304 **** --- 301,307 ---- RNGCryptoServiceProvider csp = new RNGCryptoServiceProvider(); csp.GetBytes(result); + #if NET_4_0 + csp.Dispose(); + #endif return true; } |
From: Jeroen F. <jfr...@us...> - 2015-06-29 09:41:46
|
Update of /cvsroot/ikvm/ikvm/runtime/openjdk In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13485 Modified Files: java.util.prefs.cs Log Message: Minor clean up of UAC detection. Index: java.util.prefs.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/openjdk/java.util.prefs.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** java.util.prefs.cs 21 Mar 2013 08:20:32 -0000 1.1 --- java.util.prefs.cs 29 Jun 2015 09:41:44 -0000 1.2 *************** *** 334,344 **** } ! [DllImport("advapi32.dll", SetLastError = true)] ! private static extern bool GetTokenInformation( IntPtr TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, ! out uint TokenInformation, ! uint TokenInformationLength, ! out uint ReturnLength); internal static bool Enabled --- 334,344 ---- } ! [DllImport("advapi32.dll")] ! private static extern int GetTokenInformation( IntPtr TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, ! out int TokenInformation, ! int TokenInformationLength, ! out int ReturnLength); internal static bool Enabled *************** *** 352,358 **** return false; } ! uint enabled, length; ! GetTokenInformation(WindowsIdentity.GetCurrent().Token, TOKEN_INFORMATION_CLASS.TokenVirtualizationEnabled, out enabled, 4, out length); ! return enabled != 0; } } --- 352,358 ---- return false; } ! int enabled, length; ! return GetTokenInformation(WindowsIdentity.GetCurrent().Token, TOKEN_INFORMATION_CLASS.TokenVirtualizationEnabled, out enabled, 4, out length) != 0 ! && enabled != 0; } } |