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

1398 Коммитов

Автор SHA1 Сообщение Дата
jfrijters 8258466426 Fixed regression caused by ConstructorBuilder removal. We can no longer test for MethodInfo or ConstructorInfo to distinguish the two. 2012-08-29 07:05:37 +00:00
jfrijters feadf74ac1 Fixed InternalsVisibleToAttribute handling to take the public key into account as well. 2012-08-16 11:32:26 +00:00
jfrijters ed39d39fe3 Apply custom attribute annotations on annotation types to the corresponding custom attribute that is generated (and allow AttributeUsageAttribute to override the default AttributeUsageAttribute generated from the @Target annotation). 2012-08-15 11:52:55 +00:00
jfrijters 0963971a71 Remove usage of AssemblyName.ReferenceMatchesDefinition() because it is broken on .NET and not implemented on Mono. 2012-08-15 09:19:24 +00:00
jfrijters 15d12a5439 Stop using ConstructorBuilder (always use MethodBuilder). 2012-08-15 08:45:39 +00:00
jfrijters d15c9e3590 Moved GhostMethodWrapper out of MethodWrapper and removed MethodWrapper.Create() as it was used in only one place. 2012-08-06 15:40:12 +00:00
jfrijters 9b1605afb8 Added ClassFile.Method.IsConstructor helper property. 2012-08-06 14:52:11 +00:00
jfrijters 8b71ecabaf Merged SmartCallMethodWrapper and SmartConstructorMethodWrapper into TypicalMethodWrapper. 2012-08-06 14:33:54 +00:00
jfrijters 8202009fca Merged CodeEmitter.Emit(OpCode, MethodInfo) and CodeEmitter.Emit(OpCode, ConstructorInfo) into CodeEmitter.Emit(OpCode, MethodBase) and removed unnecessary downcasting. 2012-08-06 13:01:41 +00:00
jfrijters 0e1544a6e7 - Marked MemberWrapper class abstract.
- Marked all classes that don't (and shouldn't) have subclasses sealed.
2012-08-06 12:12:03 +00:00
jfrijters 3920ebc4e6 Remove SmartMethodWrapper.PreEmit() because it was only used in one place. 2012-08-06 11:10:47 +00:00
jfrijters b0ef2c1491 Bug fixes:
- if a finally/fault handler contains reachable code before the handler's start index, the handler should branch to the handler start index.
- after emitting a finally/fault handler block, we should emit the block leave stubs (even though you can't leave the block, they also emit the backward branch stubs).
2012-07-23 07:50:00 +00:00
jfrijters b8492e30a6 Bug fix. If a Java class extends a remapped .NET type (cli.System.Object or cli.System.Exception), we should correctly report the base class. 2012-07-21 06:35:51 +00:00
jfrijters de559a8207 Bug fix. There was a logic error in FindBaseMethods7() that caused LinkAndGetMethod() to be called if TryGetClassFileVersion() succeeded and the class version was greater than 51. 2012-07-20 11:42:07 +00:00
jfrijters 29cb564480 Bug fix. It is not valid to call TypeWrapper.IsInterfaceOrInterfaceArray on an UnloadableTypeWrapper. 2012-07-20 08:47:34 +00:00
jfrijters 6147f462ae Bug fix. If a bytecode instruction refers to an invalid constant pool entry, MarkLinkRequiredConstantPoolItem should not throw an exception, but simply ignore the mark, the incorrect bytecode will be reported later during verification. 2012-07-20 08:46:34 +00:00
jfrijters de9e5f584c Bug fix. If we encounter a jsr or ret instruction, we should throw a VerifyError (instead of NotImplementedException). 2012-07-20 08:42:24 +00:00
jfrijters 8a754c4ef1 Bug fix. If we encounter an invokedynamic in a method that has a jsr (which is always invalid because of class version rules), we need to throw a VerifyError. 2012-07-20 08:38:24 +00:00
jfrijters ca21edeb75 Fixed some minor class modifiers issues:
- stub generator now reproduces exact class modifier bits
- unused bits are now properly masked and returned
- non-abstract interfaces now properly return ACC_ABSTRACT
2012-07-09 06:07:39 +00:00
jfrijters 748cb77b12 Improved (disabled) optimizations.
- IsSideEffectFreePush() now knows the current type so it knows that static field loads from the current type are side effect free.
- Added Ldarg_S, Ldarg_<n> to IsSideEffectFreePush().
- Improved temporary local removal.
- Improved pop annihilation.
2012-07-08 07:57:16 +00:00
jfrijters 16c5ba12e2 Allow intrinsic methods to bypass the setting of nonleaf (which makes a method non-inlinable) for the intrinsic method call. 2012-07-08 07:53:27 +00:00
jfrijters f0e3fa3881 Added intrinsics for (some usages of) Unsafe methods: putObject, putOrderedObject, putObjectVolatile, getObjectVolatile, getObject, compareAndSwapObject. 2012-07-05 09:57:09 +00:00
jfrijters 3b05b0cbc6 Added another optimization to convert synchronized blocks into try {} finally {} (instead of try {} fault {}). 2012-07-04 09:36:06 +00:00
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 3d0c51b2f5 Merge exception blocks that are split around return statements by javac. 2012-07-03 14:43:30 +00:00
jfrijters b9c35eef26 Added a simple optimization (disabled unless the IKVM_EXPERIMENTAL_OPTIMIZATIONS environment variable is set) to replace unconditional branches to ret or endfinally with the target instruction. 2012-06-29 15:08:56 +00:00
jfrijters 38d70162b4 Prevent the tail call elimination opcode sequence (ldnull/pop) from being optimized out. 2012-06-29 13:54:48 +00:00
jfrijters 9b98769acd Changed NoClassDefFoundError resulting from type initialization failure to be consistent with OpenJDK behavior. 2012-06-29 12:03:47 +00:00
jfrijters fb9c99e6ee Bug fix. Local variable analysis and jsr inlining also need to take the final instruction of an exception block into account. 2012-06-29 07:59:46 +00:00
jfrijters 12372a8f9e Bug fix. If an exception block ends with an astore, we need to propagate the local variable type after the astore to the exception handler. 2012-06-28 13:55:10 +00:00
jfrijters c2aac84177 Moved TypeBuilder.DefineTypeInitializer() workaround to ReflectUtil. 2012-06-25 14:32:07 +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 7a5a7eacdc Added ClassFile.Field.IsStaticFinalConstant property to avoid duplicating the check. 2012-06-20 09:49:51 +00:00
jfrijters 2965f3131f Slightly more efficient encoding of EmitAssertType(). 2012-06-20 09:49:02 +00:00
jfrijters 62b5ef0a1d Interface fields can always be marked as initonly and don't need final access stubs. 2012-06-13 11:34:37 +00:00
jfrijters f081d42d03 Bug fix. The interface fields exposed in the __Fields nested type should have a public field type. 2012-06-13 09:50:56 +00:00
jfrijters 94be3503c6 Bug fix. When resolving properties corresponding to fields with type 2 access stubs, unloadable types with the same name should compare as equal. 2012-06-11 15:41:37 +00:00
jfrijters cbf90740d0 Bug fix. AssemblyClassLoader.InternalsVisibleToImpl() would crash with NRE if it got called on a single assembly class loader, because it should call GetLoader(Assembly) to get the AssemblyLoader instead of GetLoaderForExportedAssembly(). 2012-06-11 15:37:03 +00:00
jfrijters e7432e8f2e Integrated OpenJDK 7u4. Not all forked files have been merged yet, just the ones necessary to get things building. 2012-05-23 10:00:03 +00:00
jfrijters eb146fb371 Fixed regression introduced in 7.0 that caused the manifest to be ignored when creating the Package objects. 2012-05-23 09:09:23 +00:00
jfrijters 784b32110e Removed utf8_cp field from ClassFile (as it was only used during ClassFile construction). 2012-05-01 07:55:37 +00:00
jfrijters 290bfb7cf5 Bug fix. If a class file UTF8 string ends with an incomplete multi byte char, we should throw the appropriate exception. 2012-05-01 07:20:51 +00:00
jfrijters 65687ab047 Revert the previous commit and fix the bug in a better way. Instead of dropping not currently valid certificates, we just need to make sure the aliases are unique. 2012-04-28 08:11:07 +00:00
jfrijters a6179fea09 Bug fix. Don't add certificates to virtual cacerts file that aren't currently valid, because the Java key store apparently can't contain multiple certificates with the same Subject. 2012-04-28 07:55:50 +00:00
smallsql af5b21e7af fir the wrong loop in getThreadInfo1 2012-04-15 16:16:44 +00:00
smallsql e8adc6d047 First implementation of ThreadMXBean in Java_sun_management_ThreadImpl 2012-04-15 14:45:48 +00:00
smallsql 8492d64fe6 Move getThreads() to native code for reusing on other place. This is also more like the Java behavior. 2012-04-15 14:43:25 +00:00
jfrijters 1011c474e7 Bug fix. When an unloadable type is used in a method signature that overrides a method (or implements an interface method), the custom modifier must be the same as the base class or an override stub must be generated. 2012-04-13 11:47:48 +00:00
jfrijters b2b94c0221 Added support for type 2 access stubs for constructors. 2012-04-12 10:09:09 +00:00
jfrijters 38e2ec3fd5 Fix for recently introduced bug (with access stub rewrite). Bug #3512589. 2012-03-29 09:11:13 +00:00