Siegfried Pammer
5b90dbdabf
Fix #3385 : Allow address uses of structs in using transform, if the reference is passed to an in parameter.
2025-02-20 10:49:50 +01:00
Siegfried Pammer
427fbcd8c0
Fix general using statement pattern
2024-07-20 09:10:31 +02:00
Siegfried Pammer
a5ed5ec5cb
Support types that provide DisposeAsync without implementing IAsyncDisposable.
2024-07-19 19:34:32 +02:00
Siegfried Pammer
0a2037ae1f
#3075 : Avoid processing already-transformed blocks by introducing BlockTransformContext.IndexOfFirstAlreadyTransformedInstruction, which allows us to track already transformed instructions after a block has been merged into another by ConditionDetection.
2023-10-09 00:23:16 +02:00
Daniel Grunwald
f568123704
Add support for UTF8 string literals
2023-05-30 11:20:20 +02:00
Daniel Grunwald
b823955ad6
Fix mcs-5 foreach/using pattern when C# 7 (pattern matching) is not enabled.
2023-05-29 16:52:50 +02:00
ElektroKill
c8fd044706
Fix UsingTranform for inlined isinst variation (refs #2199 )
2022-11-25 22:02:12 +01:00
Daniel Grunwald
08ceffc3ad
Upgrade dotnet-format from version 5 to the version included with the .NET (6) SDK.
2022-07-15 12:09:13 +02:00
Siegfried Pammer
96db0a5472
Add support for pattern matching in UsingTransform.
2021-10-04 17:58:02 +02:00
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
2020-08-28 01:05:38 +02:00
Siegfried Pammer
562699fc94
Add support for C# 8.0 await foreach
2020-08-23 14:42:03 +02:00
Siegfried Pammer
dab70964a5
Add support for C# 8.0 disposable ref structs
2020-08-17 00:19:49 +02:00
Daniel Grunwald
2acc4339df
#2058 : Mark most transforms as public to help users that use the ILAst directly without decompiling to C#.
2020-07-22 21:25:22 +02:00
Siegfried Pammer
c7f98a4db7
Add support for await using statements.
2019-09-29 14:52:04 +02:00
Daniel Grunwald
57b725df79
Fix #1655 : Incorrect pointer cast when calling method on integer constant
2019-08-23 22:49:57 +02:00
Daniel Grunwald
856cedc95e
#1456 : add test case; add additional checks to ensure we only transform normal locals into using/foreach-locals
2019-07-23 23:52:31 +02:00
Daniel Grunwald
beed6b5e24
Remove MarkGeneratedVariables() step in AsyncAwaitDecompiler.
...
This was left-over from earlier versions; but ILSpy stopped caring so much about variable vs. stack slot since Roslyn started to optimize more aggressively.
The change of variable type caused problems for debug information and could even cause an assertion.
Closes #1456 , closes #1562 .
2019-07-23 23:28:19 +02:00
Siegfried Pammer
c1fca21e8a
Make ILRange field private - introduce public API for IL range manipulation.
2019-02-16 20:36:17 +01:00
Siegfried Pammer
dd2a2af31d
Extend UsingTransform.CheckResourceType to support non-generic System.Collections.IDictionaryEnumerator.
2018-12-31 11:50:36 +01:00
Siegfried Pammer
2ac532b470
Fix MatchDisposeCheck
2018-06-01 21:26:50 +02:00
Siegfried Pammer
4b7c82957a
Fix UsingTransform
2018-06-01 21:18:27 +02:00
Siegfried Pammer
3b31930b85
Fix #1071 : Sometimes uses Enumarator instead of Foreach
2018-03-03 20:51:23 +01:00
Daniel Grunwald
aa9f2e7797
Fix interaction of using-transform with ?. operator.
2018-02-24 19:57:41 +01:00
Daniel Grunwald
228419b4f0
Fix interaction of ?. with using-transform.
2018-02-04 18:20:46 +01:00
Siegfried Pammer
2169d44c81
Implement sequence points for using statement.
2017-10-14 20:00:44 +02:00
Daniel Grunwald
6272c21ece
Simplify SwitchOnNullableTransform.
2017-10-13 15:03:59 +02:00
Siegfried Pammer
eaf6163215
UsingTransform: Simplify check for other Store-Instructions
2017-10-06 07:54:19 +02:00
Siegfried Pammer
23bca3713f
Fix #646 : VB-compilers 'For Each In' is not recognized as foreach during decompilation
2017-10-06 00:12:28 +02:00
Siegfried Pammer
a62e13a035
Improve detection of foreach-using in UsingTransform:
...
The C# compiler only expects:
- EnumeratorType GetEnumerator(); on the type of the in-expression.
- EnumeratorType must implement the following members:
* bool MoveNext();
* T Current { get; }
2017-10-01 04:16:38 +02:00
Siegfried Pammer
9bdfdd09ff
Add special case for non-generic foreach and add more tests.
2017-09-25 22:34:38 +02:00
Siegfried Pammer
48f344ed03
Add another pattern for generics/nullable using.
2017-09-25 02:08:39 +02:00
Siegfried Pammer
2c40b45717
Add support for using on nullables.
2017-09-25 01:06:17 +02:00
Siegfried Pammer
98e4e3418d
[using] check variable type and variable usage more strictly.
2017-09-25 00:32:26 +02:00
Siegfried Pammer
e2dab8699f
Fix generic using patterns.
2017-09-24 22:01:45 +02:00
Siegfried Pammer
d1a514b451
Redesign of UsingInstruction.
2017-09-24 22:01:44 +02:00
Siegfried Pammer
dfeb39f6ee
TransformForeach: handle optional return statement after loop.
2017-09-24 00:06:34 +02:00
Siegfried Pammer
44687a01e2
Fix bug in UsingTransform: Do not transform to using, if disposable instance is used after the finally block.
2017-09-23 21:47:26 +02:00
Siegfried Pammer
86d3101b22
Add UnwrapNestedContainerIfPossible to reduce block container nesting in foreach pattern.
2017-09-23 21:15:36 +02:00
Siegfried Pammer
d067f0cb6c
Add support for pattern with as-cast to IDisposable.
2017-09-23 21:15:36 +02:00
Siegfried Pammer
31469c8ef1
Implement UsingTransform in ILAst.
2017-09-23 21:15:36 +02:00