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

1228 Коммитов

Автор SHA1 Сообщение Дата
jfrijters ede6f86062 Don't depend on leave/endfinally instructions being inserted automatically by ILGenerator. 2010-10-05 04:54:09 +00:00
jfrijters 4f5835934f Made OpCodeWrapper data member private and added type safe accessors. 2010-10-01 09:22:47 +00:00
jfrijters cec4f20c29 - Removed unnecessary methods from CodeEmitter.
- Removed "Lazy" prefixes in CodeEmitter.
2010-10-01 08:11:49 +00:00
jfrijters 17255f13ed - Moved boxing/unboxing optimizationn to new model.
- Removed stack tracking / LazyGen remnants.
- Fixed comparison optimization to require the release of temporary local variables.
2010-10-01 06:40:49 +00:00
jfrijters 2bc060e265 Moved ldiv/idiv optimization to new model. 2010-10-01 04:41:06 +00:00
jfrijters 00136506eb Moved long/float/double comparison optimization to new model. 2010-09-30 15:15:34 +00:00
jfrijters 902ce5539e - Moved ldc_i4 and ldc_i8 encoding optimizations to the end of the pipeline.
- Added more side effect free load operations.
2010-09-30 10:04:54 +00:00
jfrijters 24e797fc2f Moved over instanceof/byte array load to new optimization. 2010-09-30 08:56:59 +00:00
jfrijters 74d9cf55f7 Remove PopLazyLdstr and PeekLazyClassLiteral. 2010-09-30 08:05:30 +00:00
jfrijters a37fec0af6 Remove usage of emitter stack peek methods (PeekLazyClassLiteral and PopLazyLdstr). 2010-09-30 08:04:46 +00:00
jfrijters 8f28fe1e63 Annihilate some common push/pop combinations. 2010-09-30 07:31:27 +00:00
jfrijters 6a61216e4f Implemented branch optimization. 2010-09-30 06:00:40 +00:00
jfrijters 390446e4c5 Build intermediate store of MSIL code in CodeEmitter to allow post-processing optimization steps. 2010-09-30 04:03:32 +00:00
jfrijters 5297abc6f1 Fixed regression caused by try { } finally {} optimization: astore/aload of exception in finally handler should be ignored in local variable analysis. 2010-09-29 11:56:06 +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 cda96b33f0 Remove unused property. 2010-09-29 05:38:12 +00:00
jfrijters ce884000ce Moved line number / sequence point handling into CodeEmitter and made things more consistent. 2010-09-28 08:02:07 +00:00
jfrijters c6e3c87af1 Added (unused) debugging method to dump a method to the console. 2010-09-27 09:37:02 +00:00
jfrijters 8375659166 Convert javac synchronized block fault handlers into finally handlers. 2010-09-27 05:48:40 +00:00
jfrijters ba28c0c14d Implemented first stab at converting suitable fault blocks into finally blocks. 2010-09-27 04:42:56 +00:00
jfrijters 7f3b28c129 Restructured method analyzer/verifier to make data flow more obvious and keep less data alive during compilation. 2010-09-22 04:01:36 +00:00
jfrijters afbe76e74d Added support for boolean, byte, char and short non-final static field constant attributes. 2010-09-21 14:09:54 +00:00
jfrijters 179771d488 Always wrap InvocationTargetException in another InvocationTargetException, to handle the case where a method is recursively calling itself. 2010-09-21 07:17:29 +00:00
jfrijters b5709a3606 Changed workaround for gmcs inability to properly deal with two-pass compilation of mutually dependant assemblies to use reflection, because the previous workaround now also fails on Mono 2.8. 2010-09-21 05:45:48 +00:00
jfrijters c75b9ffb8c Renamed StaticCompiler.GetType() that is used exclusively by map.xml processing to make it more obvious and added error message (and abort the compile). The remaining StaticCompiler.GetType() now behaves more like Type.GetType() in that it returns null if the type isn't found. 2010-09-20 15:08:45 +00:00
jfrijters f77b2d0291 Move construction of EmitIntrinsicContext to compiler. 2010-09-14 14:15:07 +00:00
jfrijters 8f02df10b8 Added wrapper class for intrinsic emitter method arguments to make things more manageable and to have a place to stick helper methods. 2010-09-14 13:40:17 +00:00
jfrijters 42f9b26b34 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 13:19:11 +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 22381efaab Seal classes and make fields readonly. 2010-09-14 09:02:21 +00:00
jfrijters 3797879e66 Moved local variable analysis from verifier.cs to new file LocalVars.cs. 2010-09-14 07:38:42 +00:00
jfrijters b8cb939d6c Moved local variable analysis into a separate pass. 2010-09-14 05:57:24 +00:00
jfrijters 4f002b9468 Consolidated all bytecode flow control properties. 2010-09-13 06:53:16 +00:00
jfrijters 2fc594a370 Added VerifierTypeWrapper.IsNotPresentOnStack() to encapsulate the notion of types that aren't represented on the .NET stack.
Note that while this may look like a bug fix (because we're handling fault block exception types in more places), it isn't. Fault block exceptions can not actually occur on the stack, because the verifier will only allow them in very limited places.
2010-09-13 06:16:23 +00:00
jfrijters 63b3bcec7f Remove unneeded call to ComputePartialReachability(). 2010-09-13 05:10:19 +00:00
jfrijters 6b50942867 Fix for bug #3056721. 2010-09-10 07:59:39 +00:00
jfrijters e57a321362 Implemented IPv6 support for java.net package APIs. 2010-09-09 06:55:31 +00:00
jfrijters a514d1e0ab Added check to make sure that vfs.zip exists, before building second pass version of IKVM.Runtime.dll, because it appears that mcs doesn't complain about missing resources. 2010-09-09 06:37:23 +00:00
jfrijters 8f3bb56f40 Added workaround for Mono TimeZoneInfo bug (https://bugzilla.novell.com/show_bug.cgi?id=622524). 2010-09-09 06:31:30 +00:00
jfrijters ff00c6f603 Don't expose IPv6 network interface addresses when IPv6 isn't enabled. 2010-09-09 06:30:08 +00:00
jfrijters 8c44803183 Added workaround for Mono not implementing UnicastIPAddressInformation.IPv4Mask. 2010-09-09 06:27:14 +00:00
jfrijters 96d3a61c9d Don't return network interfaces that aren't IPv4 or IPv6 interfaces. 2010-09-09 06:24:13 +00:00
jfrijters ac0dc7359a Implemented Inet6AddressImpl.isReachable0(). 2010-09-09 06:21:23 +00:00
jfrijters 9a1392464e Implemented Inet6AddressImpl.getHostByAddr(). 2010-09-09 06:19:51 +00:00
jfrijters 48a8685daf Inet[4|6]AddressImpl.lookupAllHostAddr() should throw UnknownHostException instead of returning an empty array. 2010-09-09 06:18:32 +00:00
jfrijters 4ca4be9446 Implemented network interface address bindings (as far as possible). 2010-09-01 06:45:58 +00:00
jfrijters 9d87c806d0 IPv6 addresses associated with NetworkInterface should have their scope and network interface set (when appropriate). 2010-09-01 06:40:28 +00:00
jfrijters af9e7ae341 Support querying the MTU for IPv6 only interfaces. 2010-09-01 06:18:37 +00:00
jfrijters 382b5025f3 Use the platform interface indexes, instead of the order in which NetworkInterface.GetAllNetworkInterfaces() happens to return the objects and sort the interfaces by their index. 2010-09-01 06:10:45 +00:00
jfrijters f8bd1fb197 Sort the IP addresses returned by Inet6Address.lookupAllHostAddr() based on the preferIPv6Address system property. 2010-08-30 10:25:32 +00:00
jfrijters a526592847 Removed x64 JIT bug workaround that is no longer required (and caused another issue: http://connect.microsoft.com/VisualStudio/feedback/details/578948/x64-jit-stack-overflow). 2010-08-26 06:40:32 +00:00
jfrijters 9d1bb56831 When class GC is enabled, we shouldn't keep a strong reference to Class instances. 2010-08-23 13:02:26 +00:00
jfrijters 19d2d1c0f3 - Made VFS class publishing more robust (against types that depend on missing assemblies).
- Don't publish annotation custom attributes (that show up as $Proxy classes) in VFS /classes/ directory.
- Refactored Type -> name to enable the VFS class publishing code to get the name without instantiating a TypeWrapper for each type.
2010-08-20 12:44:07 +00:00
jfrijters 543bde55dc - Removed the requirement to have peverify and ilasm in the PATH. They are now located automatically and if they are not found, the corresponding build steps are skipped.
- Added "managed" and "native" targets to ikvm.build to allow building just the managed parts (that don't require a C compiler to be installed).
2010-08-20 05:35:49 +00:00
jfrijters 4062e32cd6 Set system property "sun.boot.class.path" to point to the /classes/ directory of IKVM.OpenJDK.Core.dll 2010-08-19 09:26:20 +00:00
jfrijters e64377ba29 Expose all types of a shared class loader assembly group in the /classes/ directory of the main assembly of the group. 2010-08-19 09:24:37 +00:00
jfrijters 196a922219 Handle /classes/ directory of mscorlib properly (don't remap types). 2010-08-19 09:21:14 +00:00
jfrijters 4ba05d973e Fixed race condition. 2010-08-19 09:12:06 +00:00
jfrijters 612e0c73a3 Don't generate stub class if the assembly already contains a resource with the same name. 2010-08-19 09:04:25 +00:00
jfrijters 3258d602d2 Fix for #3046925. 2010-08-18 07:18:11 +00:00
jfrijters 4e7910d43d Fixed regression that caused getResources() on generic class loader to throw NPE. 2010-08-11 08:02:32 +00:00
jfrijters e5f4247e1c Massive change to change resource handling. Java resources are now stored in jars that are stored as managed .NET resources. The jars are projected into VFS and the assembly class loaders know how to load resources from these jars. 2010-08-05 13:43:00 +00:00
jfrijters e509ef6952 JRuby subclasses java.io.File to use the / path separator on Windows and that causes the (Sun) path normalization code to call us with a "C:/\" path which we previously failed to canonicalize correctly. 2010-08-03 14:23:11 +00:00
jfrijters 3bc2f0b871 Instead of System.ArgumentException, throw java.net.UnknownHostException in Inet4AddressImpl.getHostByAddr(). 2010-08-03 14:10:46 +00:00
jfrijters e27bc7677b Dynamic* instructions should throw NoClassDefFoundError before NullPointerException. 2010-08-03 13:41:38 +00:00
jfrijters 2c4abbccb8 Field reflection slow path should throw NullPointerException instead of IllegalArgumentException for instance fields if the instance object is null. 2010-08-03 12:54:40 +00:00
jfrijters 94f7513960 Fixed another verifier regression introduced with try/fault handler changes. 2010-08-03 12:43:58 +00:00
jfrijters 2ed5c93a94 A nested type DotNetTypeWrapper is always nested inside another DotNetTypeWrapper, so we can use GetWrapperFromDotNetType() in DeclaringType. This also solves a bug when reflecting on the nested types in cli.System.Exception. 2010-08-03 12:42:24 +00:00
jfrijters 17de2517f0 Types nested in a type that is HideFromJava should also be considered HideFromJava. 2010-07-28 12:33:22 +00:00
jfrijters d147750fad Fix for bug #3033769. 2010-07-28 12:30:35 +00:00
jfrijters 3fa99010ee Made most static compiler warnings local to the target that is being compiled (in multi target mode), to allow warnings to be suppressed (or turned into an error) for a specific target. 2010-07-16 08:50:40 +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 0feee7bea0 Fixed verifier regression introduced with try/fault handler changes. Thanks to Enrico Minack for reporting this. 2010-07-12 06:57:23 +00:00
jfrijters d5e40dadf8 We need to pre-intern the magic strings that VerifierTypeWrapper uses as type names, because TypeWrapper will intern them in its constructor. Thanks to Andrey Malakov for tracking this down. 2010-06-10 04:38:57 +00:00
jfrijters 248559fb69 Added "first-pass" build of IKVM.AWT.WinForms.dll and moved "native" AWT code from IKVM.Runtime.dll to IKVM.AWT.WinForms.dll. 2010-06-09 12:26:28 +00:00
jfrijters 0c2fcdf9c8 It turns out that peverify loads the assembly from the DEVPATH instead of loading the specified file, so we copy IKVM.Runtime.dll to bin and verify it there. 2010-06-09 06:13:19 +00:00
jfrijters 76f65a98fb Individual types/methods have been annotated, so assembly can be transparent now. 2010-06-09 06:09:49 +00:00
jfrijters 657f7c49ce JNIEnv.DescribeException() was broken (NPE instead of printing the exception). 2010-06-09 04:58:21 +00:00
jfrijters 23862ca0c5 Report FileFormatLimitationExceededException as a simple compiler error, not as a critical failure. 2010-06-09 04:55:52 +00:00
jfrijters e8e6bf24d6 Disable automagic serialization when running on .NET 4.0 in partial trust. 2010-06-08 12:48:36 +00:00
jfrijters 32d5017b91 More .NET 4.0 security model attributes. 2010-06-08 12:47:51 +00:00
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