jfrijters
97b0466c35
Workaround x64 JIT bug.
2010-05-26 10:07:07 +00:00
jfrijters
4184d2c165
Added explicit cast to generated reflection argument conversion code, to improve partial trust compatibility and to avoid an x64 JIT bug.
2010-05-26 09:50:48 +00:00
jfrijters
fd4d23369a
When a fast method/constructor invoker throws an exception at the call site (e.g. MethodAccessException in partial trust scenarios) we shouldn't wrap it in an InvocationTargetException.
2010-05-26 05:42:56 +00:00
jfrijters
f1bffde708
Handle the case where the exception block ends at the end of the method (scala compiler generates code like this).
2010-05-21 13:38:46 +00:00
jfrijters
5cc1b2e805
The AssemblyClassLoader should not claim to be able to load .class resources for dynamically loaded classes.
2010-05-21 06:25:06 +00:00
jfrijters
b23c32c007
Store the generic metadata in a more robust format. The previous format was broken as it created a dependency between the number of methods in class file and in our internal representation (which doesn't alway match, because we add a.o. miranda methods). This fixes several Guice 2.0 test failures as reported by bug #3004682 .
2010-05-21 04:23:40 +00:00
jfrijters
1bf158bf1d
Class.getEnclosingMethod0() and Class.getGenericSignature() should finish the TypeWrapper, otherwise the metadata isn't yet available.
...
In addition, getGenericSignature() should not re-mangle the sig as that is not necessary.
This fixes several Guice 2.0 test case failures as reported in bug #3004682 .
2010-05-21 04:21:55 +00:00
jfrijters
5aa745c75f
Made specialized GetModifiers() variant reuse common GetModifiers() method.
2010-05-20 12:37:00 +00:00
jfrijters
92336d8fc7
Consolidated a couple of attribute helper overloads by using MemberInfo instead of specific sub types.
2010-05-20 12:16:27 +00:00
jfrijters
6207754bd9
Use __GetCustomAttributes() instead of doing our own attribute filtering.
2010-05-20 09:43:15 +00:00
jfrijters
d029e87abc
We don't need to use our own version of IsDefined to test for custom attributes, because there is no confusion about what runtime types to use anymore.
2010-05-20 06:00:48 +00:00
jfrijters
481158d99b
Added Types.SecurityAttribute.
2010-05-20 05:39:53 +00:00
jfrijters
75398c1efe
Use Types.IsVolatile instead of re-importing.
2010-05-20 05:36:37 +00:00
jfrijters
f8614df7c9
Fixed ikvmc/ikvmstub regression introduced with the switch to IKVM.Reflection (not IKVM.Reflection.Emit) in volatile field handling acros assemblies.
2010-05-20 05:34:31 +00:00
jfrijters
71ea18a0dc
Removed JVM.GetType().
2010-05-20 04:59:13 +00:00
jfrijters
f570d2c719
Allow ikvmstub to explicitly set the bootstrap class loader.
2010-05-19 15:46:27 +00:00
jfrijters
c676fb0ebc
It's not necessary to add the bootstrap class loader to the generic class loader key.
2010-05-19 15:45:25 +00:00
jfrijters
028b02bc06
Implemented a more reliable test for .NET types that have a Finalize method and extend our implementation helpers (i.e. java.lang.Object or java.lang.Throwable). The previous test only handled java.lang.Object.
2010-05-19 15:40:37 +00:00
jfrijters
8c526e9001
Removed .NET 1.1 restriction workaround.
2010-05-19 15:20:36 +00:00
jfrijters
999be08e21
MethodWrapper types need to be provided, as there is no link step for DotNetTypeWrapper members.
2010-05-19 15:16:02 +00:00
jfrijters
44a7beac75
For compiled Java types we can safely use GetWrapperFromType() to get the name and this also fixes the case where the type is a fake type.
2010-05-19 09:12:45 +00:00
jfrijters
a7e391870a
Added "documentation" assert.
2010-05-19 09:11:50 +00:00
jfrijters
b5625e2153
Changed StaticCompiler.GetType() to be multi-target aware. Instead of looking thru all assemblies currently loaded, only the relevant referenced assemblies are searched.
...
Note that this is a (minor) breaking change. Types referenced in -remap:map.xml file are now only resolved against directly referenced assemblies.
2010-05-16 06:31:20 +00:00
jfrijters
953fa3bbc3
We can't rely on System.dll being loaded. EditorBrowsableAttribute needs to be explicitly imported.
2010-05-15 09:28:29 +00:00
jfrijters
c5641ac723
Added a couple of checks to avoid problems when user code tries to convert .NET types that aren't supported into a Class.
2010-05-10 04:47:34 +00:00
jfrijters
183c9e66d8
Fixed EnumHelper.GetPrimitiveValue() to handle the case where the underlying type of an enum difference from the constants values attached to the fields.
2010-05-10 04:46:45 +00:00
jfrijters
3a314584f8
A generic type instance is loaded by the assembly class loader of the generic type definition, but it should not be registered there (as this causes name clashes and that class loader isn't reported as it's loader anyway), it should be registered by the generic class loader that it is associated with.
2010-05-10 04:45:49 +00:00
jfrijters
f6717df18f
Added warning to ikvmc when StructLayoutAttribute is ignored.
2010-05-07 05:53:33 +00:00
jfrijters
96d9ab24db
Added support for AssemblyVersionAttribute and AssemblyCultureAttribute to ikvmc.
...
Added warnings for AssemblyDelaySignAttribute, AssemblyKeyFileAttribute and AssemblyKeyNameAttribute.
Throw NotImplementedException for AssemblyAlgorithmIdAttribute and AssemblyFlagsAttribute (that exception isn't reachable because these two attributes are not exposed as annotations.)
2010-05-07 05:48:22 +00:00
jfrijters
b790897da7
Avoid depending on IKVM.Reflection specific pseudo custom attribute support that will be removed in the future (TypeForwardedToAttribute and DefaultParameterValueAttribute).
2010-05-06 06:11:56 +00:00
jfrijters
da5287c315
Added ikvmc option to disable automagic serialization.
2010-05-03 07:58:01 +00:00
jfrijters
68a8b9557a
Remove use of reflection for getting the slot of a java.lang.reflect.Field.
2010-04-28 14:22:51 +00:00
jfrijters
5a91126566
Removed lib/security/local_policy.jar from vfs.zip (because OpenJDK builds the restricted version, by default) and instead make a vfs alias for it that points to the unrestricted US_export_policy.jar.
2010-04-21 06:16:37 +00:00
jfrijters
c1bee9537f
Audited CriticalCtrlHandler and added .NET 4.0 security attributes.
2010-04-20 05:18:41 +00:00
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