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

157 Коммитов

Автор SHA1 Сообщение Дата
jfrijters b015884acb - Made CodeEmitter more "type safe" by adding specific EmitXxx methods instead of following the more general ILGenerator pattern.
- Added some new optimizations to CodeEmitter (disabled unless experimental optimizations are enabled).
- Added some invariant checks to CodeEmitter to help debug optimizations (and document the invariants).
2012-07-03 14:45:51 +00:00
jfrijters e97566642b Improved the handling of final fields that need to be wrapped by a property. 2012-06-20 12:01:15 +00:00
jfrijters b2b94c0221 Added support for type 2 access stubs for constructors. 2012-04-12 10:09:09 +00:00
jfrijters b9229a609b Intrinsified the unsafe.objectFieldOffset(XXX.class.getDeclaredField("xxx")) pattern to avoid expensive reflection field lookup in static initializers of common OpenJDK classes. 2012-02-23 11:51:07 +00:00
jfrijters e3d95f6da5 Add support for delegates with ByRef parameters. 2012-01-20 09:01:07 +00:00
jfrijters c4f685f776 Corrected comment. 2011-12-15 14:51:15 +00:00
jfrijters b8a9511680 - Removed BaseTypeWrapper.Finish() call from DotNetTypeWrapper.LazyPublishMembers(), because it is the wrong place to call Finish.
- Added explicit Link() calls where necessary.
2011-12-14 09:46:55 +00:00
jfrijters 6110e41d56 It turns out that it isn't a good idea to mutate the member types (and lose the fact that they are unloadable), so now we only do the conversion when generating the Java reflection wrapper for the member. 2011-12-08 07:56:09 +00:00
jfrijters bd816b24b3 Introduced DefineMethodHelper class as an abstraction over method signatures (the parameter/return types) to make it easier to start using modopt for methods. 2011-12-07 11:28:17 +00:00
jfrijters 6443499161 When a member with unloadable types in its signature is exposed via reflection, the unloadable types should be resolved to actual types. 2011-11-29 13:01:09 +00:00
jfrijters 050190d782 Stop mangling property names for access stubs (instead we rely on custom modifiers to make them unique). 2011-11-25 12:03:57 +00:00
jfrijters 60e2d4af9a Use modopt to reliably correlate type 2 access stub properties with the underlying field. This fixes a bug where annotations applied to fields with type 2 access stubs would not be visible at runtime (via reflection). 2011-11-24 15:14:03 +00:00
jfrijters 27f408b3a4 Removed legacy remap feature that allowed final fields as properties to be defined (long time ago this was used for the System.in/out/err fields). 2011-11-24 12:31:38 +00:00
jfrijters 44c6177691 Implemented type 2 access stubs for methods (not constructors) and rewrote how type 1 access stubs are handled. 2011-11-23 06:20:34 +00:00
jfrijters 242461074d Fixed several type 1 method access stub issues. 2011-11-18 15:22:46 +00:00
jfrijters 435c18d9ee Added a property to decide if we need a type 2 access stub to make sure the check is consistent (and this also fixes a bug where we needlessly create an access stub for field where the field type is unloadable). 2011-11-17 17:32:54 +00:00
jfrijters 608977ba72 Clarified that the NonPublicTypeInSignature does not get set for access stubs (because they've replaced the non-public types with their public base class). 2011-11-17 17:09:10 +00:00
jfrijters 8ea80f64cf Removed the need for access stubs in dynamic mode with CLASSGC enabled by dynamically adding InternalsVisibleToAttribute to the dynamic assemblies. 2011-11-17 13:53:02 +00:00
jfrijters 30c5543f03 Hardened runtime against asynchronous Thread.Abort() during critical operations. Fix for bug #3385353. 2011-08-16 13:40:05 +00:00
jfrijters 9be6d7f1ad Added experimental (and for the time being undocumented) support for having ikvmc pre-generate proxy classes. 2011-05-12 08:08:08 +00:00
jfrijters f111998725 Volatile stores require a memory barrier. Fix for #3086040. 2010-10-21 12:20:13 +00:00
jfrijters cec4f20c29 - Removed unnecessary methods from CodeEmitter.
- Removed "Lazy" prefixes in CodeEmitter.
2010-10-01 08:11:49 +00:00
jfrijters 3888406d95 Wrapped LocalBuilder in new CodeEmitterLocal class to allow CodeEmitter to encapsulate the ILGenerator fully. 2010-09-29 07:21:51 +00:00
jfrijters f77b2d0291 Move construction of EmitIntrinsicContext to compiler. 2010-09-14 14:15:07 +00:00
jfrijters 3a5fc585a9 Added extra indirection thru MethodWrapper for intrinsic method call emitting to allow .NET delegate constructor optimization to use instrinsic infrastructure instead of requiring EmitNewobj to pass a MethodAnalyzer and opcode index. 2010-09-14 12:29:22 +00:00
jfrijters 82e70c4908 Renamed IsProtectedFieldAccessible to IsPublicOrProtectedMemberAccessible, because it is for methods as well as fields and should also be applied to public members. 2010-07-15 12:36:58 +00:00
jfrijters a86e056ffe When a protected field is accessed in a non-public base class in another assembly that is simultaneously compiled, we need to add an InternalsVisibleTo to the callee assembly for the caller assembly. 2010-07-12 06:58:48 +00:00
jfrijters 32d5017b91 More .NET 4.0 security model attributes. 2010-06-08 12:47:51 +00:00
jfrijters 53021cbad9 Made constructor security critical, instead of the type to avoid problem with .NET 4.0 verifier complaining about IKVM.Runtime.dll built for .NET 2.0 2010-05-29 13:59:27 +00:00
jfrijters 40dcf95916 More type safety. TypeWrapper.ClassObject is now typed as java.lang.Class. 2010-05-27 09:25:15 +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 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 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 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 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 dbd6df02ae Integrated new IKVM.Reflection implementation. 2010-01-25 07:52:27 +00:00
jfrijters 34bf6475f7 Changed JNI to use standard caller ID mechanism. 2010-01-06 14:28:38 +00:00
smallsql c0dbb737dc Accept also string constant in Assert 2009-12-29 11:24:57 +00:00
jfrijters d7f31faced There's no reason for reflectionField not to be statically typed. 2009-12-07 05:49:36 +00:00
jfrijters 8d4c9dade0 Removed unnecessary usage of ReflectionFactory. 2009-12-07 05:38:18 +00:00
jfrijters b36d93ebb7 Removed unnecessary usage of Java types in field reflection guts. 2009-12-02 07:49:36 +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 5e56f47c94 Removed unnecessary complexity in enum handling. 2009-11-09 05:33:09 +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 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