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
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
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
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
38d70162b4
Prevent the tail call elimination opcode sequence (ldnull/pop) from being optimized out.
2012-06-29 13:54:48 +00:00
jfrijters
bd00ad6a11
Added support to ikvmc to automatically set the full source path in the debugging info if the source file lives next to the .class file.
2012-03-24 08:54:12 +00:00
jfrijters
90a67766bc
When instantiating a delegate and the object passed in does not properly implement the delegate's Method interface, bind the delegate to an error stub that throws the appropriate error.
2012-01-20 14:02:23 +00:00
jfrijters
35d272c9a6
More TypeAsBuiler usage removed.
2011-12-12 12:43:22 +00:00
jfrijters
d6dc2d7256
Removed TypeAsBuilder usage from method handle code.
2011-12-12 11:21:29 +00:00
jfrijters
ac2d14a082
Moved indy call site state into FinishContext.
2011-12-12 09:57:23 +00:00
jfrijters
fc30bac913
When casting arguments we should use the actual method parameter types, instead of the call site types (which can differ in the case of unloadable types (with crazy class loader trickery)).
2011-12-08 14:59:16 +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
917376e242
Added support for classes that represent arrays of remapped .NET types and .NET primitives.
2011-11-24 08:35:47 +00:00
jfrijters
3388ebec9b
Added workaround for another x64 JIT bug.
...
See https://sourceforge.net/mailarchive/message.php?msg_id=28250469
2011-10-24 14:14:16 +00:00
jfrijters
a9f1e7879a
Implemented invokedynamic instruction.
2011-08-15 16:11:00 +00:00
jfrijters
d7c359c0a3
Added support for MethodHandle constants (ldc <MethodHandle>).
2011-08-12 13:06:46 +00:00
jfrijters
7786fc87b8
Added support for MethodType constants (ldc <MethodType>).
2011-08-10 10:12:10 +00:00
jfrijters
edc1073fbd
Bug fix. The "ldc <class>" bytecode can throw an exception, so we need to treat it as such (previously it wasn't marked as throwing an exception, so an exception handler surrounding it could be "optimized" away). The new scheme is to patch the safe versions of ldc opcode into a ldc_nothrow.
2011-08-10 09:06:27 +00:00
jfrijters
2046f19fda
Workaround Mono bug.
2011-08-08 05:50:27 +00:00
jfrijters
f0adfd7257
Implemented full arity support for MethodHandle.
2011-08-08 04:56:16 +00:00
jfrijters
a82c5af244
Fixed MethodHandle.invoke() caching. We were caching the instance, instead of just the type.
2011-08-06 19:51:17 +00:00
jfrijters
6e7b8693fd
Implemented a large chunk of MethodHandle support.
2011-08-06 11:00:10 +00:00
jfrijters
9b6c88e868
Merge in java.lang.invoke package and the beginnings of MethodHandle support.
2011-07-25 23:11:09 +00:00
jfrijters
3aed0d8850
Fixed regression introduced with fault handlers. Exception handlers inside fault handlers could be ignored.
2010-10-13 05:24:33 +00:00
jfrijters
1b30fcb8ea
- Removed EndExceptionBlockFinally and folded the behaviour into EndExceptionBlock (runtime compiler only).
...
- Removed EndExceptionBlockNoFallThrough() and added "leave guard" branch after every EndExceptionBlock (runtime compiler only).
- Fixed remaining dependencies on exception fall through behavior of ILGenerator.
2010-10-11 05:46:28 +00:00
jfrijters
ede6f86062
Don't depend on leave/endfinally instructions being inserted automatically by ILGenerator.
2010-10-05 04:54:09 +00:00
jfrijters
cec4f20c29
- Removed unnecessary methods from CodeEmitter.
...
- Removed "Lazy" prefixes in CodeEmitter.
2010-10-01 08:11:49 +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
3888406d95
Wrapped LocalBuilder in new CodeEmitterLocal class to allow CodeEmitter to encapsulate the ILGenerator fully.
2010-09-29 07:21:51 +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
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
f77b2d0291
Move construction of EmitIntrinsicContext to compiler.
2010-09-14 14:15:07 +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
3797879e66
Moved local variable analysis from verifier.cs to new file LocalVars.cs.
2010-09-14 07:38:42 +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
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
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
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
7dfb0107c4
Removed mutable flags field from Instruction.
2010-06-07 06:13:05 +00:00
jfrijters
4fbcaf733a
Use local variable 'code' instead of m.Instructions.
2010-06-07 04:30:20 +00:00
jfrijters
393dc88577
Moved exception untangling code into MethodAnalyzer where it makes more sense.
2010-06-02 06:37:35 +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
3b953eaf24
Disable stack trace collection for remapped exceptions that are discarded in their handler.
2010-05-29 13:53:32 +00:00