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

1146 Коммитов

Автор SHA1 Сообщение Дата
jfrijters 19bfff7c2d When running on .NET 4.0, make the emitted assembly security transparent when running in partial trust. 2010-06-08 12:45:58 +00:00
jfrijters 507be98ae6 Disable RunAndCollect when running in partial trust. 2010-06-08 12:45:06 +00:00
jfrijters 379219e2c0 More .NET 4.0 security model attributes. 2010-06-08 12:26:56 +00:00
jfrijters 3b00f0c41c .NET 4.0 security model fix. 2010-06-08 12:25:23 +00:00
jfrijters 014c0d6bac In partial trust, constructing the serialization constructor accessor can fail with a SecurityException. We convert that into a java.lang.SecurityException because the Java code handles that. 2010-06-08 12:23:22 +00:00
jfrijters 70df9bc2e9 On .NET 4.0 the NoInlining flag also prevents tail calls, so we don't need tail call thwarting there. 2010-06-08 12:08:30 +00:00
jfrijters 0ed13314f0 Implemented codegen improvement to use CLR fault handlers for Java catch all handlers, whenever possible. 2010-06-08 05:25:14 +00:00
jfrijters 3ca0627114 Since we're no longer modifying the instructions, there's no reason to pass it around instead of using it directly from the Method object. 2010-06-08 04:15:39 +00:00
jfrijters 311379f2ce Made ExceptionTableEntry completely immutable by making ordinal readonly as well. 2010-06-07 12:36:49 +00:00
jfrijters 03361a778a Made ExceptionTableEntry mostly immutable (ordinal will be next). 2010-06-07 10:05:28 +00:00
jfrijters 7dfb0107c4 Removed mutable flags field from Instruction. 2010-06-07 06:13:05 +00:00
jfrijters 1b8b220d6e Use external InstructionFlags array, instead of modifying the Instruction values. 2010-06-07 05:22:34 +00:00
jfrijters 4fbcaf733a Use local variable 'code' instead of m.Instructions. 2010-06-07 04:30:20 +00:00
jfrijters aa80cfdecf TypeWrapper.AssertFinished() doesn't make sense for the static compiler anymore. 2010-06-07 04:21:35 +00:00
jfrijters 5aa5c27cd0 Use a LinkedHashMap to preserve annotation order (but only in dynamic mode, because for compiled code we get the .NET attributes in unspecified order). By my reading of the API spec there is no guarantee about the ordering, but the Google Guice test suite depends on it anyway. 2010-06-04 13:38:45 +00:00
jfrijters 7a55f7c03c Moved type flow and optimization passes into separate methods. 2010-06-02 12:38:15 +00:00
jfrijters f9bb92b3f2 Fixed theoretical issue in RemoveAssertions optimization. 2010-06-02 12:29:16 +00:00
jfrijters 9752893b47 Split analysis steps into separate methods. 2010-06-02 10:31:58 +00:00
jfrijters 9004a9f65a Add forgotten HideFromJava to ExceptionInfoHelper constructor that collects stack trace. 2010-06-02 10:15:53 +00:00
jfrijters 4126779d1b Made the "unnecessary" exception handler removal a little less conservative. 2010-06-02 07:43:51 +00:00
jfrijters 393dc88577 Moved exception untangling code into MethodAnalyzer where it makes more sense. 2010-06-02 06:37:35 +00:00
jfrijters f3106c0868 Fixed loop counter integer overflow. Bug #3009543. 2010-06-01 04:09:48 +00:00
jfrijters 6d3632f144 Removed unused code. 2010-05-31 09:33:28 +00:00
jfrijters 969cd0f5ea Made MapException generic, instead of passing the type explicitly. 2010-05-31 05:58:37 +00:00
jfrijters 7a4ce163e6 Fixed regression in dynamic exception handling and made it simpler. 2010-05-31 05:08:57 +00:00
jfrijters ce4dfa49da Removed exception mapping methods from Throwable and consolidated into a single method (actually, two methods, but the dynamic one should not be necessary and should be removed later). 2010-05-30 06:53:49 +00:00
jfrijters 64563f9af9 Removed unused field. 2010-05-30 06:20:26 +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 3b953eaf24 Disable stack trace collection for remapped exceptions that are discarded in their handler. 2010-05-29 13:53:32 +00:00
jfrijters 96794bab50 Tiny optimization. Don't examine the same frame twice. 2010-05-28 11:06:06 +00:00
jfrijters 4d867300b6 Implemented a more efficient (in terms of the MSIL size) MapException API. 2010-05-28 11:05:18 +00:00
jfrijters 0f1a9fbcaa Fix FIRST_PASS build break. 2010-05-28 10:22:04 +00:00
jfrijters f6a7da207d Minor clean up. 2010-05-28 05:48:35 +00:00
jfrijters 82730f124b - More filtering regression fixes.
- Synchronize on SyncRoot for Exception.Data collection access.
2010-05-28 05:36:03 +00:00
jfrijters 9085b75ad8 More clean up and added HideFromJava to two more Map methods. 2010-05-28 05:18:12 +00:00
jfrijters 85b418c2e9 - Util.mapException() shouldn't be HideFromJava as that would be a breaking change, and were explicitly filtering it from the stack trace anyway.
- Minor ExceptionHelper clean up.
2010-05-28 04:23:58 +00:00
jfrijters b242c1026b Moved ExceptionHelper into proper namespace and some cleanup. 2010-05-27 16:07:56 +00:00
jfrijters 2cbe4b732b Moved the last part of ExceptionHelper from Java to C# side. 2010-05-27 15:24:29 +00:00
jfrijters 0d2012757f Moved the remainder of the exception mapping to the C# side. 2010-05-27 14:54:41 +00:00
jfrijters 63fac84c10 - Added new public API to unmap exception (ikvm.runtime.Util.unmapException()).
- Moved (parts of) mapping and unmapping to C# side.
2010-05-27 14:08:58 +00:00
jfrijters d67bc55267 Moved more ExceptionHelper methods to C# side. 2010-05-27 13:23:04 +00:00
jfrijters fa0e1b04f0 Yet more ExceptionHelper moving. 2010-05-27 13:03:26 +00:00
jfrijters fe0f5df2a1 Moved a few more ExceptionHelper methods to C# side. 2010-05-27 12:36:40 +00:00
jfrijters 4da8e27cf7 Moved printStackTrace to C# side. 2010-05-27 12:08:01 +00:00
jfrijters d18d00788b Moved ExceptionHelper.getStackTrace() to "native" code of Thread. 2010-05-27 11:47:41 +00:00
jfrijters aae1ef7119 Added error message (instead of simply crashing) for the case when a native method is not found in managed code and there is no JNI assembly available (as is the case during the core library build). 2010-05-27 11:22:18 +00:00
jfrijters a4500fdb47 Moved readObject/writeObject to C# side. 2010-05-27 11:21:23 +00:00
jfrijters 1dc4ffa32b More object -> java.lang.Class updates. 2010-05-27 10:54:34 +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 195f6ce2c6 First step of moving all exception handling code to C#. 2010-05-27 09:17:56 +00:00
jfrijters 36a5e0ce64 First stab at making the "native" method signatures more statically typed. 2010-05-27 09:17:13 +00:00
jfrijters a3b30e87e1 Add a dummy IKVM.OpenJDK.Core.dll to the build to make it possible to use core types in method signatures during first-pass build of IKVM.Runtime.dll. 2010-05-27 08:38:48 +00:00
jfrijters 12a597a359 When we're statically compiling, register the TypeBuilder -> TypeWrapper early on, to support cyclic dependency compilation. 2010-05-27 08:31:46 +00:00
jfrijters 44e6663f50 Wrap all reflective field access to convert FieldAccessException into java.lang.IllegalAccessException. 2010-05-26 13:09:55 +00:00
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 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
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
jfrijters 7c83482811 - Moved local ref specific code from Frame.Enter/Leave to ManagedJNIEnv.Enter/Leave.
- Changed JNIEnv.DeleteLocalRef to forward to ManagedJNIEnv.DeleteLocalRef
2010-01-07 07:05:50 +00:00
jfrijters 942a3d5118 Moved local ref code into ManagedJNIEnv. 2010-01-07 06:44:16 +00:00
jfrijters be92363465 Made ManagedJNIEnv leading, instead of the unmanaged JNIEnv. 2010-01-06 15:37:12 +00:00
jfrijters 0b49d0ef9f Optimized JNI argument list processing. 2010-01-06 14:36:31 +00:00
jfrijters 34bf6475f7 Changed JNI to use standard caller ID mechanism. 2010-01-06 14:28:38 +00:00
jfrijters d0a44066a2 Use GetConstructors and GetMethods instead of GetMembers (which is needlessly expensive). 2009-12-31 08:20:32 +00:00
smallsql c0dbb737dc Accept also string constant in Assert 2009-12-29 11:24:57 +00:00
jfrijters 7eee0b86c7 Added basic signature validation for remap file (map.xml). Fixes bug 2908683. 2009-12-11 08:06:10 +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 ce1e5be3fc Fixed regression introduced with "type 2" field accessor fix. Null type doesn't need downcast and needs to be explicitly handled, because you aren't allowed to call GetPublicBaseTypeWrapper() on it. 2009-12-09 05:49:30 +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 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 00942e7141 Don't use EmitThrow() it needs to lookup the method every time. 2009-12-07 05:27:23 +00:00
jfrijters 69936317d7 Assembly name strings are kept around forever, so it makes sense to intern them. 2009-12-07 05:24:15 +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 9680bf4aba Mangle all artificial type names if they clash with Java type names in the same assembly. 2009-12-01 07:08:52 +00:00
jfrijters 464f56dbdf Added IKVM_EXPERIMENTAL_JDK_7 environment variable to enable loading Java 7 class files. 2009-11-30 09:13:48 +00:00
smallsql b49e2890ef deleting of an not existing Preferences Key should not throw an exception. see JUnit test 2009-11-28 18:51:49 +00:00
jfrijters d6f78332b0 Moved FindMainMethod into runtime, to avoid the need for hacks (to avoid NoClassDefFoundErrors). 2009-11-25 10:18:29 +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 3aef367009 Added copyright header and removed UTF-8 byte-order-marker. 2009-11-09 09:02:11 +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 bb7aa6ebb3 - Removed unused method.
- Marked some runtime only code with #if !STATIC_COMPILER.
2009-11-09 07:48:12 +00:00
jfrijters 1d979c5789 Use IKVM.Reflection.Emit's new-style declarative security APIs. 2009-11-09 06:39:17 +00:00
jfrijters 5e56f47c94 Removed unnecessary complexity in enum handling. 2009-11-09 05:33:09 +00:00
jfrijters fe352a35e2 Baked type clean up makes no sense for IKVM.Reflection.Emit. 2009-11-09 05:32:29 +00:00
jfrijters 09631e3f11 Use StaticCompiler.GetRuntimeType() to get type from the runtime assembly. 2009-11-06 07:48:06 +00:00
jfrijters 6dccbf20d5 Removed unused methods. 2009-11-06 07:46:39 +00:00
jfrijters 95cdfd8edd Renamed ILGenerator.__GetILOffset() to ILGenerator.ILOffset to match with .NET 4.0. 2009-11-06 05:13:37 +00:00
jfrijters 8726f76d94 Removed .NET 4.0 workaround. 2009-11-05 07:41:05 +00:00
jfrijters 50fda7c073 Removed micro optimization that requires full trust on .NET 4.0. 2009-11-05 07:37:46 +00:00
jfrijters 0674e3d1fa When there is no Java code on the stack JNIEnv->FindClass() should use the system class loader instead of the boot class loader. 2009-11-04 13:29:53 +00:00
jfrijters 19aee11985 Fixed interface method resolution (via JNI) and various other minor method resolution compatibility tweaks. 2009-11-04 13:25:56 +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 e443e2acb4 Wrapped a couple of forgotten TypeWrapper.Finish() calls to convert exceptions to their Java form. 2009-11-04 05:17:51 +00:00
jfrijters 5b509c42a2 DynamicGetTypeAsExceptionType should be available during FIRST_PASS because it is used by ikvmc (if there is a configuration issue during boot class library build). 2009-11-04 05:16:32 +00:00
jfrijters f6acb0a796 Added (optional) per-module initialization to custom assembly class loaders. 2009-11-03 07:15:37 +00:00
jfrijters 1f255d4f65 Added public API to get ClassLoader from Assembly. 2009-11-03 07:06:36 +00:00
jfrijters b78d5d8b09 Fix for #2887316. 2009-10-28 11:11:59 +00:00
jfrijters 28456850ca Optimized field reflection. We now delay creating the dynamic methods to access the field until after the field has been accessed a couple of times, this saves a lot of memory for fields that are only usused a couple of times. 2009-10-28 05:54:05 +00:00
jfrijters d6f58ab3df Removed unnecessary class. 2009-10-26 05:22:02 +00:00
jfrijters 7dc5c17027 Removed two unnecessary fields from FieldAccessorImplBase. 2009-10-26 05:20:46 +00:00
jfrijters 67a4a2d1b1 Fixed automagic serialization interop to work correctly in the face of a __WorkaroundBaseClass__ base type. 2009-10-23 06:29:54 +00:00
jfrijters 33f074087f Simplified the obj1.getClass() == obj2.getClass() intrinsic to avoid RuntimeTypeHandle. It turns out that on .NET 4.0 RuntimeTypeHandle.Value requires full trust and using RuntimeTypeHandle.Equals is actually slower than simply comparing the types (on .NET 4.0 beta 2, on .NET 2.0 this new approach is actually a bit slower, but the fact that the code is simpler and smaller is also worth something). 2009-10-23 05:58:41 +00:00
jfrijters 98ec2e69e2 Make Compiler class sealed and made most fields readonly. 2009-10-23 05:48:19 +00:00
jfrijters 5166b04d4a More ikvmc assembly/type refactoring. 2009-10-21 04:54:39 +00:00
jfrijters f1ff4f82f1 Fix for bug #2881954. 2009-10-21 04:47:26 +00:00
jfrijters 5cdb8b43e4 Removed .NET 4.0 beta 1 workarounds and did some minor updates for .NET 4.0 beta 2. 2009-10-21 04:43:27 +00:00
jfrijters e38521ae81 Fixed exception message. 2009-10-20 05:17:27 +00:00
jfrijters 1b0bfa6703 Use Type.IsVisible that is available since .NET 2.0, instead our own version. 2009-10-19 05:29:50 +00:00
jfrijters 9089864b8c More type funneling. 2009-10-16 07:06:50 +00:00
jfrijters d53f46aa7c Forgot to add new file... 2009-10-15 06:17:23 +00:00
natl 3c1930d4eb - code cleanup as per Jereon's suggestion
- add support for java.awt.Image
- fix problem with HDROP
2009-10-14 15:31:47 +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