jfrijters
6deb604258
Turn MethodAccessExceptions that happen during reflective method invocation (in partial trust scenarios) into java.lang.IllegalAccessExceptions.
2010-05-26 10:12:13 +00:00
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
add8b2963b
New snapshot version.
2010-05-25 04:31:23 +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
873c7828da
When we're compiling with the -sharedclassloader option we can't do the "effectively final" optimization, because classes in another assembly can be part of the same package (and hence extend the packge private class).
2010-05-21 06:27:22 +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
bc23b974ef
Three IsAssignableFrom fixes:
...
- non-vector arrays are not assignable to vector arrays
- value type arrays are not assignable to non-value type arrays (and v.v.)
- pointers can be boxed to ValueType as well as Object
2010-05-21 03:48:26 +00:00
jfrijters
5aa745c75f
Made specialized GetModifiers() variant reuse common GetModifiers() method.
2010-05-20 12:37:00 +00:00
jfrijters
e901c4a753
Added ICustomAttributeProvider interface.
2010-05-20 12:17:16 +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
a39f990601
Rewrote __GetCustomAttributes(MemberInfo, ...) to be more sensible (and more efficient).
2010-05-20 09:42:24 +00:00
jfrijters
a6c129ea68
Change IsInheritableAttribute() to use new (filtered) model.
2010-05-20 09:39:07 +00:00
jfrijters
3a9ec6abef
Change __GetCustomAttributes(ParameterInfo) to new model.
2010-05-20 09:37:07 +00:00
jfrijters
7bd6058bd9
Implemented Assembly/Module.IsDefined() in terms of __GetCustomAttributes().Count != 0 to improve efficiency and correctly handle subtyping.
2010-05-20 09:34:34 +00:00
jfrijters
c08cca1a9a
Added __GetCustomAttributes() overloads for Assembly and Module for ease of use and consistency.
2010-05-20 09:32:04 +00:00
jfrijters
4f4f667aa8
Copy/paste bug.
2010-05-20 09:28:44 +00:00
jfrijters
118db6d049
Implemented custom attribute filtering at the source. Added support for custom attribute sub typing.
2010-05-20 09:25:30 +00:00
jfrijters
651f73a990
Implemented Type.IsAssignableFrom() (minus co-/contravariance).
2010-05-20 09:05:09 +00:00
jfrijters
be1f4af4fc
Added support for importing generic type parameters.
2010-05-20 08:53:11 +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
2c28fc98a8
Custom attribute types in map.xml should be resolved via the referenced assemblies, not globally.
2010-05-20 04:58:12 +00:00
jfrijters
b105375099
Fixed regression introduced when ikvm.runtime.Startup.setProperties() signature was changed. It should also be changed here. Also changed to using Dictionary<string, string> instead of Hashtable.
2010-05-20 04:26:35 +00:00
jfrijters
ef1cad0880
Removed fake core class library types from ikvmstub and added a -bootstrap option to run without dependency on runtime/core class library.
2010-05-19 15:48:52 +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
de1c8224af
New snapshot version.
2010-05-18 15:01:02 +00:00
jfrijters
aaaedb90a9
If the locations don't match, canonicalize them and compare them again to make sure.
2010-05-18 06:55:15 +00:00
jfrijters
efc97771e1
Hook AssemblyResolve.Warning event to suppress the HigherVersion event, as we don't care about that one in this scenario.
...
Added check to avoid running on ourself, because it results in an exception.
2010-05-18 06:49:38 +00:00
jfrijters
8b6e49771b
Made all AssemblyResolver warnings into formal ikvmc warnings.
2010-05-18 06:48:40 +00:00
jfrijters
a74577ccfa
Protect against accidentally importing any IKVM.Reflection type, not just Type.
2010-05-16 07:47:49 +00:00
jfrijters
afd0317df2
Fix. Imported the wrong types.
2010-05-16 07:47:08 +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
5b2430d386
Made Universe.HasMscorlib internal and removed the now obsolete Universe.LoadMscorlib().
2010-05-12 15:23:54 +00:00
jfrijters
6bab77a5df
- Removed use of Universe.LoadMscorlib().
...
- Removed unncessary return value from Init().
2010-05-12 15:23:17 +00:00
jfrijters
8541f8b5ab
Moved resolver to StaticCompiler, because for ikvmstub we do want the more strict behavior (of warning/error generating) that AssemblyResolver.LoadFile() provides.
...
Also don't add specified assembly as a reference unless -nostdlib is specified, otherwise we end up with duplicate warnings if the assembly was loaded from elsewhere.
2010-05-12 15:22:06 +00:00