Граф коммитов

907 Коммитов

Автор SHA1 Сообщение Дата
jfrijters 08f9a0706a Added null checks. 2010-04-13 12:51:26 +00:00
jfrijters 47f8f07749 When class GC is enabled (on .NET 4.0), certain CLR features are not available and cause Ref.Emit to throw. Check for these features and throw a VerifyError instead of dying with an unexpected Ref.Emit exception.
Removed previous "handling" of DllImportAttribute (which was to simply ignore it).
2010-04-12 13:49:10 +00:00
jfrijters 49612b6d85 Prep for .NET 4.0 security model:
- unverifiable dynamic methods need to be emitted in a critical assembly
2010-04-12 07:07:52 +00:00
jfrijters 001c4eef76 When compiled for .NET 4.0, we use an assembly per class loader, so we need access stubs in dynamic mode as well. 2010-04-12 07:06:58 +00:00
jfrijters b3f4be7dea If class GC is enabled, don't intrinsify thread locals, because the CLR doesn't support ThreadStaticAttribute in RunAndCollect assemblies. 2010-04-12 06:44:29 +00:00
jfrijters 6e4ffb2002 Prep for .NET 4.0 security model:
- added more SecurityCritical attributes
- added SecuritySafeCritical/TreatAsSafe attributes to Direct-X-Buffer classes
2010-04-12 06:38:46 +00:00
jfrijters c8619421d1 Prep for .NET 4.0 security model:
- modified build to run peverify on IKVM.Runtime.dll
2010-04-12 06:37:18 +00:00
jfrijters 562b15ceb2 Prep for .NET 4.0 security model:
- serialization methods must be critical.
2010-04-12 04:17:39 +00:00
jfrijters 617dc0c7e0 Removed workaround that is no longer needed. 2010-04-09 04:50:25 +00:00
jfrijters 393bfcc810 Moved Posix file flushing to C# to be able to use delegate instead of reflection to invoke the Mono.Posix method. Also added DangerousAddRef/Release to prevent the handle from being closed while flushing. 2010-04-08 13:06:36 +00:00
jfrijters ac3b45aae2 Partrial trust improvements:
- File.listRoots() now uses Environment.GetLogicalDrives() instead of Directory.GetLogicalDrives(). Both methods are semantically identical, but the former requires EnvironmentPermission(Unrestricted = true) and the latter SecurityPermission(UnmanagedCode = true). We also now swallow a SecurityException, should it occur.
- Getting the host name now falls back to "localhost" if we don't have permission to query the name (or if anything else causes GetHostName to fail).
2010-03-25 07:11:58 +00:00
jfrijters ceff3d0656 Fix for partial trust regression. 2010-03-25 07:08:58 +00:00
jfrijters 7d55464cd7 When running on .NET 3.5 or later, use TimeZoneInfo.Id to identify timezone, because that maps better to the Win32 names that the Java name mapping is based on. 2010-03-18 13:52:14 +00:00
jfrijters d64a970b7d If the current timezone is not one of the recognized names, we should return GMT+offset instead of null, because null maps to GMT. 2010-03-18 13:49:34 +00:00
jfrijters 73ce726ee9 IKVM.Reflection.Assembly doesn't have the IsDynamic property. 2010-03-18 13:43:54 +00:00
jfrijters 16ad3d2523 Replaced incorrect usages of Type.IsArray with ReflectUtil.IsVector(). 2010-02-26 13:31:39 +00:00
jfrijters 90761eac3b Fix for bug #2946842. 2010-02-19 08:07:37 +00:00
jfrijters 0751ab4d76 Intrinsified ThreadLocal (under specific circumstances). 2010-02-11 10:36:01 +00:00
jfrijters ff779a78f7 Introduced a base class for intrisified AtomitcReferenceFieldUpdaters. This reduces the size of the generates classes somewhat and allows for a public type to represent all intrinsified instances (instead of the HideFromJava nested type). 2010-02-11 10:20:24 +00:00
jfrijters ab73c7385e When an object is an instance of a HideFromJava type, hide that type and traverse up the type hierarchy to find the first non-HideFromJava non-abstract type. 2010-02-11 10:00:16 +00:00
jfrijters afe41d743d Made the IsHideFromJava(Type) test more consistent. 2010-02-11 09:59:12 +00:00
jfrijters 0047f376d8 It's illegal to call IsInterface on an Unloadable type, so we have to check that first. 2010-02-11 09:54:12 +00:00
jfrijters ff60212cd6 Ignore SecurityException when trying to register Ctrl-Break handler. 2010-02-11 09:50:26 +00:00
jfrijters 9ddff837c5 - Moved thread dump code from Thread.java to openjdk.cs.
- Changed thread dump code to write to System.Console.Out, instead of java.lang.System.out.
- Changed formatting slightly and added some info to make it more like the JDK output.
2010-02-04 05:08:55 +00:00
jfrijters 2ee02c9f0c Added optimization to avoid explicit <clinit> trigger when it isn't necessary. 2010-02-03 15:28:06 +00:00
jfrijters 8fa9aea6b0 Frame doesn't need to be unsafe anymore. 2010-02-03 14:31:39 +00:00
smallsql 725e68ccf6 use CriticalFinalizerObject for the case of AppDomain unloading 2010-02-01 19:48:00 +00:00
smallsql edafe5964b implements the signal handler for windows 2010-01-30 15:54:38 +00:00
jfrijters b1190ba610 Removed unused field. 2010-01-29 07:09:12 +00:00
jfrijters daf3ffcf28 Removed ReflectionOnly support from runtime. Now that ikvmstub no longer requires it, there's no good reason to allow Java code to see ReflectionOnly types. 2010-01-29 07:08:56 +00:00
jfrijters b7a691f5de - Moved ClassLoaderWrapper.IsVector() and TypeWrapper.IsReflectionOnly() to ReflectUtil.
- Fixed IsReflectionOnly() to handle more complicated constructed types.
- Optimized IsDynamic() to use a delegate to call get_IsDynamic when running on .NET 4.0
- Optimized IsVector() to use __IsVector when IKVM.Reflection is used.
2010-01-29 06:58:10 +00:00
jfrijters d1e163408f Removed IKVM_REF_EMIT, as STATIC_COMPILER or STUB_GENERATOR now always implies IKVM.Reflection. 2010-01-28 09:18:33 +00:00
jfrijters b4ad331f48 Removed "constant" instance field support (which was only used by ikvmstub and doesn't make any sense anyway). 2010-01-28 08:44:57 +00:00
jfrijters e5bea7a81b Removed support for "ikvm.stubgen.serialver" property that is no longer needed now that ikvmstub doesn't use the runtime to generate stubs. 2010-01-28 08:05:34 +00:00
jfrijters 1d05c1ed7b Last set of changes preparing for new stub generator. A massive amount of conditional compilation changes, to skip irrelevant code when building ikvmstub. 2010-01-28 07:14:37 +00:00
jfrijters f01904d51a More preparations for new stub generator.
- When compiling ikvmstub, do type comparisons by name only.
- Replace two cases of typeof() with references to Types fields.
- Added RemappedClassAttribute and RemappedTypeAttribute constructors that explicitly take System.Type (when compiling ikvmstub)
- Avoid unnecessary reference to System.Configuration.dll in tracer.cs (when compiling ikvmstub).
2010-01-28 07:10:31 +00:00
jfrijters 0cca1b39d8 Expose custom attribute annotation properties for use by new stub generator. 2010-01-28 06:52:51 +00:00
jfrijters 9dc2df605a Moved non-throwing signature parsing from ClassFile.cs to ClassLoaderWrapper.cs (and merged it with the throwing variant). This avoids new stub generator having to include ClassFile.cs. 2010-01-28 06:37:48 +00:00
jfrijters 55cd844b5a Moved StringConstants from ClassFile.cs to TypeWrapper.cs, to avoid new stub generator (to be checked in later) to have to include ClassFile.cs 2010-01-28 06:24:13 +00:00
jfrijters 05180f101b Moved VerifierTypeWrapper from verifier.cs to TypeWrapper.cs, to avoid new stub generator (to be checked in later) to have to include verifier.cs
(also made VerifierTypeWrapper sealed)
2010-01-28 06:09:20 +00:00
jfrijters 5895cfea86 Moved CodeGenOptions from DynamicClassLoader.cs to ClassLoaderWrapper.cs, to avoid new stub generator (to be checked in later) to have to include DynamicClassLoader.cs 2010-01-28 06:06:37 +00:00
jfrijters 7eb8c80322 The synthetic atomic update helper nested types should not be visible from Java, so they should have a name starting with "__<". 2010-01-27 09:03:32 +00:00
jfrijters 47655ecdb9 RemappedClassAttribute should have AllowMultiple = true. 2010-01-27 08:59:17 +00:00
jfrijters a68a03ef92 The "base final" methods in remapped types should never be abstract. 2010-01-27 08:58:31 +00:00
jfrijters dbd6df02ae Integrated new IKVM.Reflection implementation. 2010-01-25 07:52:27 +00:00
jfrijters eefa99cdcb Fixed exception sorter to be correct when invoked with two references to the same object. 2010-01-11 14:32:13 +00:00
jfrijters bdf10ccaa9 Added comment and made loop count down simpler. 2010-01-07 08:34:52 +00:00
jfrijters c6b0ca6f50 Added static UnwrapRef method that takes ManagedJNIEnv to avoid having to look it up when we already have it. 2010-01-07 08:10:21 +00:00
jfrijters 251e09bc64 - Moved local ref constants.
- Made local ref fields private.
- Renamed LOCAL_REF_BUCKET_SIZE to LOCAL_REF_MAX_BUCKET_SIZE.
2010-01-07 07:46:28 +00:00
jfrijters 5c7f2226e9 Optimized local ref handling. 2010-01-07 07:39:38 +00:00