jfrijters
d0a44066a2
Use GetConstructors and GetMethods instead of GetMembers (which is needlessly expensive).
2009-12-31 08:20:32 +00:00
jfrijters
848c66b341
More changes to make future merge of IKVM.Reflection easier:
...
- added #if conditionals to remove runtime only methods from compiler
- added two missing JVM.Import()s.
2009-12-10 08:43:45 +00:00
jfrijters
e58a6a1d13
Don't cache inner classes.
2009-12-10 08:27:38 +00:00
jfrijters
8bc053d1b4
Don't automatically hide "op_Implicit" methods. Instead mark the ones we automatically generate with HideFromJavaAttribute.
2009-12-07 07:12:23 +00:00
jfrijters
dc588c31e0
Don't use Type.GetMembers(), instead of use GetMethods(), GetConstructor(), GetFields() and GetProperties() explicitly.
2009-12-07 06:59:11 +00:00
jfrijters
138f7143bc
Added LazyPublishMethods and LazyPublishFields to TypeWrapper and implemented the split in CompiledTypeWrapper.
2009-12-07 06:39:46 +00:00
jfrijters
44efece100
We have room for a free bool, so it makes more sense to only get the __<clinit> method when we really need to (and not trigger a LazyPublishMembers).
2009-12-07 05:54:04 +00:00
jfrijters
2e99262649
Added two constructors to ThowsAttribute that take a Type and a Type[] for greater convenience when applying the attribute to user code and for compatibility with Grasshopper's ThrowsAttribute.
2009-12-02 05:48:50 +00:00
jfrijters
c7ae133d38
- Fixed IsPackageAccessibleFrom to consider class loaders, instead of InternalsVisibleToAttribute
...
- Added automatic access to internal accessibility members across assemblies in multi target compilation (previously this was only done for -sharedclassloader scenarios)
- Cleaned up existing field access stubs (now known as "type 1") and added type 2 access stubs to make public fields that have a non-public field type accessible.
2009-11-13 15:08:20 +00:00
jfrijters
73112679ae
- Moved enum helper methods into new EnumHelper class.
...
- Changed .NET EnumEnum field to call ByteCodeHelper method, instead of emitting code in place.
2009-11-09 08:52:17 +00:00
jfrijters
ab25242ac2
Implemented enum parsing.
2009-11-09 07:49:32 +00:00
jfrijters
1d979c5789
Use IKVM.Reflection.Emit's new-style declarative security APIs.
2009-11-09 06:39:17 +00:00
jfrijters
6dccbf20d5
Removed unused methods.
2009-11-06 07:46:39 +00:00
jfrijters
f293dcb61d
Changed CompiledTypeWrapper.Interfaces to avoid using the class loader to resolve the interface names. Moved common code to get interface type wrappers into GetImplementedInterfacesAsTypeWrappers() helper method.
2009-11-04 06:06:22 +00:00
jfrijters
e38521ae81
Fixed exception message.
2009-10-20 05:17:27 +00:00
jfrijters
9089864b8c
More type funneling.
2009-10-16 07:06:50 +00:00
jfrijters
dac3109b6b
Replaced most type literals with static field access (in Types class) or warpped JVM.Import() around them.
2009-10-14 14:58:41 +00:00
jfrijters
a4ba87a35f
Moved GetAssemblyClassLoader() (and related stuff) from ClassLoaderWrapper to AssemblyClassLoader and renamed it to FromAssembly().
2009-09-07 04:46:01 +00:00
jfrijters
8068af56fa
Moved DotNetTypeWrapper class into its own source file.
2009-08-31 06:16:04 +00:00
jfrijters
4fe0cf25d1
Moved BakedTypeCleanupHack to DynamicTypeWrapper.
2009-08-31 06:05:15 +00:00
jfrijters
cb448cb209
Moved ImplementInterfaceMethodStubs and ImplementInterfaceMethodStubsImpl to DynamicTypeWrapper.
2009-08-31 05:49:19 +00:00
jfrijters
ee524d3032
Made ImplementInterfaceMethodStubs and ImplementInterfaceMethodStubsImpl static in preparation of moving them to DynamicTypeWrapper.
2009-08-31 05:46:20 +00:00
jfrijters
014283d425
Moved DynamicTypeWrapper class into its own source file.
2009-08-31 05:10:11 +00:00
jfrijters
b9ceecc098
Removed EmitHelper class and moved its methods into CodeEmitter.
2009-08-31 05:02:34 +00:00
jfrijters
db9c796794
Removed vestigial compact framework support.
2009-08-28 06:47:16 +00:00
jfrijters
35d71675e8
Small code cleanup. Changed a couple of abstract methods in TypeWrapper to virtual and provided a default implementation and removed the implementation from a number of subclasses.
2009-08-28 06:20:22 +00:00
jfrijters
585c7f5c21
ArrayTypeWrapper: Fixed a race condition and avoid holding the lock while calling external code.
2009-08-28 06:06:35 +00:00
jfrijters
285bf4dfbb
Added support for exposing open generic types as Java classes (special "handle" classes that can only be used for stack walking).
2009-08-27 14:40:42 +00:00
jfrijters
8a9fc7420b
Implemented automatically enabling .NET serialization support for Java classes that are trivially serializable.
2009-07-30 13:14:14 +00:00
jfrijters
43fd0daf07
Implemented support for .NET serialization of Java enums.
...
(The CreateEnumEnum move in FakeTypes.cs is because java.lang.Enum now has a dependency on custom attribute annotations.)
2009-07-29 09:36:56 +00:00
jfrijters
568cff8e34
- Make IsFastClassLiteralSafe return true for various fake annotation types.
...
- Pass Type to java.lang.Class for "forbidden" and reflection-only types. This is now needed for Class serialization.
2009-07-29 07:06:44 +00:00
jfrijters
9c28395a5a
Fix NRE when getting annotations on delegate constructor for delegates defined in Java (because these constructors don't really exist).
2009-07-27 08:04:30 +00:00
jfrijters
88729b4059
Optimized primitive class literals.
2009-07-16 06:29:32 +00:00
jfrijters
28e5b235d7
Implemented optimization to remove .cctor when it is empty (and the class isn't serializable or has a serialVersionUID).
2009-07-16 06:26:47 +00:00
jfrijters
1e003bbb98
Made callerID initialization lazy.
2009-07-14 08:25:04 +00:00
jfrijters
64e5615aaa
Moved responsibility for creating java.lang.Class instances for "fast literal" enable types into ClassLiteral<T>, this allows class literals to be really cheap, because non of the underlying reflection is needed, the class will cache the Type and lazily resolve it to its TypeWrapper.
2009-07-14 06:27:41 +00:00
jfrijters
d76b454d72
Made some classes sealed.
2009-07-13 13:34:41 +00:00
jfrijters
04ca4a71f9
Moved class literal emit code to TypeWrapper and added checks to prevent types that are illegal in type instantations from being used with ClassLiteral<T>.
2009-07-13 08:34:37 +00:00
jfrijters
6dee819903
Removed ByteCodeHelperMethods.GetClassFromTypeHandle usage from static compiler.
2009-07-07 08:02:18 +00:00
jfrijters
ba363faf74
Replaced last usage of ByteCodeHelperMethods.GetClassFromTypeHandle in runtime with LazyEmitLoadClass.
2009-07-07 07:44:30 +00:00
jfrijters
99c7df5de9
Added "RuntimeCompatibilityAttribute(WrapNonExceptionThrows = true)" to generated assemblies.
2009-06-18 06:14:55 +00:00
jfrijters
b75fb48ee8
Implemented class gc (available only when compiling on .NET 4.0).
2009-06-02 07:38:21 +00:00
jfrijters
7b120d5942
Added JavaModuleAttribute to dynamic module to make detection of Java types more straightforward.
2009-05-29 07:47:20 +00:00
jfrijters
6a5ce00091
- When building for .NET 4.0, don't use DefineDynamicAssembly() overload that takes assembly permission sets, because .NET 4.0 ignores them anyway.
...
- Fixed BakedTypeCleanupHack to work for .NET 2.0 SP2.
- Changes to remove warnings when building on .NET 4.0
2009-05-26 05:00:38 +00:00
jfrijters
d33c145753
Added support for declarative security pseudo custom attribute annotations.
2009-05-17 06:05:52 +00:00
jfrijters
da7552b32c
- Added hook to allow subclass of DynamicTypeWrapper to inject a different base class.
...
- Added support to CompiledTypeWrapper.GetBaseTypeWrapper() to skip base classes that aren't visible to Java.
2009-05-12 04:03:48 +00:00
jfrijters
c1553b7f1a
Refactored method call replacement to allow it to be used by others than xml mapping stuff.
2009-05-12 04:00:01 +00:00
jfrijters
95ddd4293c
Fix for bug #2777171 .
...
- Use custom enum value decoding because Enum.Parse() doesn't work for ReflectionOnly types.
- Handle enums that use unsigned integer underlying type properly.
2009-04-22 04:34:06 +00:00
jfrijters
4ec50d326a
AttributeTargets.Interface wasn't mapped correctly to @Target(TYPE).
...
Fixes bug #2777128 .
2009-04-21 07:26:29 +00:00
jfrijters
62e4bc8b12
Removed jsr/ret support.
2009-04-16 05:44:48 +00:00