Siegfried Pammer
22c98016a9
Fix #2530 : ArgumentOutOfRangeException in PatternMatchRefTypes
4 years ago
Siegfried Pammer
0ed191617e
Fix #2528 : arbitrary stores preceding switch-on-string confuse the transform, making it pick the wrong variable as switch variable.
4 years ago
Siegfried Pammer
15d74751f4
Fix #2459 , fix #2460 : Make sure that LdObjToLdLoc and StObjToStLoc preserve the result type, if the source variable has an unknown type.
4 years ago
Siegfried Pammer
936388ba18
Fix #2458 : ILExtraction.Extract handles BlockContainer.Kind != Normal.
4 years ago
Siegfried Pammer
e1ca4db851
Fix #2527 : Support skip locals init
4 years ago
Siegfried Pammer
96db0a5472
Add support for pattern matching in UsingTransform.
4 years ago
Siegfried Pammer
665c731cfc
Move PatternMatchingTransform after LoopDetection.
4 years ago
Siegfried Pammer
55f1125f94
Ensure that pattern locals get distinct variable names.
4 years ago
Siegfried Pammer
9d99ee86db
Fix #2503 : Move correct branch in the case of swapped jump-table conditions.
4 years ago
Siegfried Pammer
1568aeca3e
Fix #2506 : NamedArgumentTransform loses information, if the original variable is of StackType.Ref
4 years ago
Siegfried Pammer
dbbcbb87fe
Make pattern matching transform a simple ILTransform for both reference and value types. Check that the true branch dominates all uses of the pattern variable.
4 years ago
Siegfried Pammer
e50d221e06
Adjust NullableLiftingTransform to match new patterns due to RemoveInfeasiblePathTransform.
4 years ago
Siegfried Pammer
2b26e5013b
Add Roslyn 2.x pattern for value type pattern matching.
4 years ago
Siegfried Pammer
cd0c76d7b1
Support leave instructions in RemoveInfeasiblePathTransform and transform match(x) ? true : false to match(x).
4 years ago
Siegfried Pammer
5fa8201533
Added support for isinst-unbox.any pattern with generic reference types and simplified value types pattern detection.
4 years ago
Siegfried Pammer
83727ea4b0
Add support for value type patterns
4 years ago
Siegfried Pammer
357d55d2ad
Add support for old roslyn pattern matching pattern.
4 years ago
Daniel Grunwald
c26d9ad6f1
Mark stack slot for aggressive removal in InfeasiblePathTransform
...
This helps with pattern matching in short circuiting operators.
4 years ago
Siegfried Pammer
c641072685
Translate MatchInstruction to BinaryOperatorExpression with BinaryOperatorType.IsPattern.
4 years ago
Daniel Grunwald
040ab41c69
Initial implementation of the pattern matching transform.
4 years ago
Siegfried Pammer
8eafbb3d90
Fix #2092 : aggressively inline code in compiler-generated lambdas and expression trees.
4 years ago
Siegfried Pammer
164c8880af
#2092 : Make TransformExpressionTrees.MatchGetTypeFromHandle and TransformExpressionTrees.MatchGetContructorFromHandle use IType.FullName instead of actual IType instances, so we can better handle assemblies processed by tools like ILMerge, where there might be used multiple versions of mscorlib in one assembly.
4 years ago
Daniel Grunwald
245261a1e5
#nullable enable for Instructions.tt
4 years ago
Daniel Grunwald
0414e7f8e9
Fix potential NRE in ILFunction.RegisterVariable()
4 years ago
Siegfried Pammer
c22977e1be
Fix #2390 : Extend variable splitting to treat stobj as immediate address use.
4 years ago
Daniel Grunwald
5fb2f7a22f
#nullable enable for ILAst (except for generated code)
4 years ago
Daniel Grunwald
109b6d073a
Allow detecting exit points across multiple levels of containers.
4 years ago
Daniel Grunwald
a716828065
Remove redundant code from RemoveRedundantReturn.cs
4 years ago
Siegfried Pammer
1f0f6404e0
Fix #2231 : Add support for ldloca; dup; initobj pattern used by Roslyn.
4 years ago
Daniel Grunwald
685a79dc31
DetectExitPoints: introduce exit points for loops+switch
...
This allows reverting the changes to HighLevelLoopTransform+ReduceNestingTransform from the previous commit, which fixes a bug in loop detection (the previous commit did not handle loops where the loop BlockContainer didn't have a Block as parent).
4 years ago
Siegfried Pammer
62fc4bc1a3
Fix #1858 , Fix #2188 : Remove variables that contain copies of display-class variables.
4 years ago
Daniel Grunwald
6757295b3b
Fix #2379 : Keep `return` statements around in original form for ConditionDetection, only transform to fall-through block-exit at the end of the transform pipeline.
...
This fixes an issue where `return` statements within try-blocks could turn into `goto` statements.
4 years ago
Siegfried Pammer
584d1847df
Fix #2405 : Assertion fail in TDCU
4 years ago
Siegfried Pammer
2d65deffda
Fix frontends.sln build.
4 years ago
Siegfried Pammer
ba39dd5c55
Fix #2354 : decompilation of unary and binary operators with nullable value types.
4 years ago
Daniel Grunwald
407ec6be5b
Adjust AsyncAwaitDecompiler to Roslyn 3.9.0.
4 years ago
Siegfried Pammer
d92dd153fc
#2390 : Make sure all unused captured variables are removed even in lambdas.
4 years ago
Siegfried Pammer
e20ace0098
Fix build.
4 years ago
Siegfried Pammer
d54016ce8f
#2390 : Add support for generic object initializers.
4 years ago
Daniel Grunwald
bd9aabeae2
Update to dotnet-format 5.1.225507.
...
This makes the formatting expected by our CI consistent with that generated by VS2019.9.
4 years ago
Siegfried Pammer
7211587b45
Fix #2366 : NRE in AwaitInCatchTransform.MatchAwaitCatchHandler() and pattern errors when dealing with a switch-based jump table in AwaitInCatchTransform
4 years ago
Siegfried Pammer
76227af89d
Fix #1749 , fix #2339 , fix #2353 : Add support for rethrow in async exception handlers, fix await catch/finally patterns for complex methods.
4 years ago
Siegfried Pammer
d2fc380e0e
Fix #2349 : Use proper ExpressionType with DynamicCompoundAssign.
4 years ago
Siegfried Pammer
d60f158dfd
Fix #2342 : Do not generate empty names for foreach loop variables.
4 years ago
Siegfried Pammer
4ae41a855e
Fix #2321 : Missing readonly modifier for ref local
4 years ago
Daniel Grunwald
eec24ee6bb
Fix #2311 : Handle additional `comp` instruction in `IsNullSafeArrayToPointerNotNullBlock`
4 years ago
Daniel Grunwald
f726a0b73e
#nullable enable for typesystem and ILInstruction base class
4 years ago
Siegfried Pammer
67be41a998
#2294 : Fix potential NRE: finalStore is accessed before null check.
4 years ago
文煌
581a1de185
fix https://github.com/icsharpcode/ILSpy/issues/2288
4 years ago
Daniel Grunwald
6951ccb1a2
Fix #2260 : switch(string) transform: handle empty cases where the C# compiler optimizes out the `if`
...
e.g.
```
switch (<PrivateImplementationDetails>.ComputeStringHash(text2))
{
case 1288728352u:
_ = text2 == "rowno";
break;
...
```
4 years ago