74 Commits
Author SHA1 Message Date
Siegfried Pammer 77d9ee73e9 Fix IDE2000 globally 2025-12-29 19:24:31 +01:00
Peter Crabtree e1e16b64f5 dev: Strip BOM mark from text files 2025-08-28 20:56:19 -04:00
Siegfried Pammer 6cee0cdc4b Fix #3258: Move GraphVizGraph and friends to ILSpy and remove InternalsVisibleTo. 2024-08-13 11:43:04 +02:00
Siegfried Pammer 4bf9487ecd Remove IsRef, IsOut and IsIn flags from IParameter and Replace ParameterModifiers with ReferenceKind. 2024-07-19 18:40:07 +02:00
Daniel Grunwald c12187277c Also use GraphTraversal.DepthFirstSearch for dominance calculation. 2023-10-21 17:33:30 +02:00
Siegfried Pammer 09691bd27e #3075: Add NextSetBit operation to BitSet to avoid looking at every store bit individually in ReachingDefinitionsVisitor.GetStores() 2023-10-14 21:08:00 +02:00
Daniel Grunwald b404bf3aa7 #2480: avoid crash if ILAst "cannot jump into block container" invariant is violated 2021-11-30 20:35:52 +01:00
Siegfried Pammer e1ca4db851 Fix #2527: Support skip locals init 2021-10-29 00:16:33 +02:00
dotnet format 0d9f871a4f #2128: Reformat the whole code base. 2020-08-28 01:05:38 +02:00
Siegfried Pammer eac0e2257e Support MatchInstruction in DataFlowVisitor 2020-07-26 19:22:14 +02:00
Siegfried Pammer 8925b4ff7b Inline variable declarations/modernize parts of our code base. 2020-04-16 11:22:18 +02:00
Daniel Grunwald 18ee984ade Add support for "definitely assigned if true/false" to data flow analysis. 2019-07-27 19:31:13 +02:00
Daniel Grunwald 8cfc21dfab Fix DefiniteAssignmentVisitor bugs handling ILFunction, and add some comments. 2019-07-27 15:43:51 +02:00
Siegfried Pammer 7d62a7e032 Reset HasInitialValue flag after TransformDisplayClassUsage. 2019-07-27 15:07:41 +02:00
Daniel Grunwald 2929ae865f Fix #1460: assertion in DataFlowVisitor`1.DebugPoint() with try-fault statement. 2019-03-28 00:09:21 +01:00
Daniel Grunwald a86a0586bb Fix #890: Correctly handle calls with out-parameters in definite assignment analysis. 2018-03-04 14:55:17 +01:00
Daniel Grunwald 96d9e63f4c Don't unnecessarily default-initialize variables prior to a call with out-parameter. 2018-03-04 14:34:13 +01:00
Daniel Grunwald a8a852b742 Add instructions for modeling the "?." operator in the ILAst. 2018-01-12 12:59:28 +01:00
Daniel Grunwald 9ef97703cd [switch] consider loop back-edges to be exit points when looking for the switch body 2017-10-11 19:43:34 +02:00
Daniel Grunwald 102729cfde Put switch instructions into their own BlockContainer.
This removes the need for "goto case" in the ILAst as we can just branch to the appropriate block.
It also means we can support "break;" within switch using the "leave" instruction (otherwise we'd have to introduce yet another special kind of jump).
2017-10-08 23:06:38 +02:00
Daniel Grunwald 8a68a94d35 Simplify use of SwitchInstruction in ILAst
* the default case is now handled as a normal case
* when dealing with basic blocks, SwitchInstruction will be the last instruction in the block
* introduced ILAst instruction for 'goto case'
2017-10-07 00:13:14 +02:00
Daniel Grunwald 0008deb021 Fix handling of try-finally blocks in ReachingDefinitionsVisitor.
This was causing variables to get split incorrectly.
2017-09-23 21:14:35 +02:00
Siegfried Pammer 206cdecf30 Merge Return instruction into Leave. 2017-09-16 19:24:33 +02:00
Daniel Grunwald 2207ab40f7 Check the CancellationToken a bit more frequently. 2017-08-22 22:24:16 +02:00
Daniel Grunwald 5621101436 Reconstruct try-finally blocks in yield return decompiler 2016-12-28 19:27:56 +01:00
Daniel Grunwald fe84ea9730 WIP: yield return decompiler 2016-12-20 21:55:28 +01:00
Siegfried Pammer 0970b95d5f Rename ILVariable.Scope to Function and introduce BlockContainer CaptureScope 2016-12-18 14:08:10 +01:00
Daniel Grunwald e871f7c05a Convert LoopDetection into a block transform. 2016-11-27 18:00:54 +01:00
Siegfried Pammer 840ec04fde Namespace adjustments for Syntax classes 2016-11-26 12:06:58 +01:00
Christoph Wille 1ce8349dd9 Adjust namespaces 2016-11-26 11:12:53 +01:00
Siegfried Pammer 284ddfadf1 Phase 2: Merge ICSharpCode.NRefactory into ICSharpCode.Decompiler 2016-11-26 00:26:27 +01:00
Daniel Grunwald 7273fe58fd Add BlockTransform concept and apply a bunch of refactoring essentials suggestions. 2016-11-24 23:17:12 +01:00
Daniel Grunwald a6fc52a63f ConditionDetection: move blocks into switch sections 2016-11-21 15:26:41 +01:00
Daniel Grunwald 36d61db3a7 Add support for sparse integer switches. 2016-11-21 12:20:45 +01:00
Daniel Grunwald 9dec6c80a7 LoopDetection: use post-dominance to find better loop exit points 2016-07-29 15:35:35 +02:00
Daniel Grunwald 0e118f0977 LoopDetection: in loops without any exit points, exclude the largest possible code block from the loop 2016-07-28 21:26:12 +02:00
Daniel Grunwald 6d9e53bf4f Improve ILInlining.IsSafeForInlineOver() 2016-07-10 15:21:31 +02:00
Daniel Grunwald 20aec66815 Initial support for decompiling fixed statements 2016-07-09 22:44:16 +02:00
Daniel Grunwald a40f0754c1 Add InvalidInstruction to represent invalid IL opcodes in the ILAst instead of crashing. 2016-06-25 10:15:02 +02:00
Daniel Grunwald 5998d39827 Fix bug in DataFlowVisitor.VisitSwitchInstruction 2016-06-21 23:35:57 +02:00
Daniel Grunwald f3d108c469 Add SplitVariables transforms. 2016-06-20 23:01:41 +02:00
Daniel Grunwald e21ad7c3e4 DataFlowVisitor: ignore MayThrow and consider every instruction to potentially throw.
This brings the IL definite assignment analysis more in line with the C# analysis.
It's arguably more correct, because there are async exceptions (ThreadAbortException).
It also means we call JoinWith() less often, so the analysis should be faster.
2016-06-20 20:30:08 +02:00
Daniel Grunwald a06ca0c0be Custom BitSet implementation 2016-06-19 17:34:17 +02:00
Daniel Grunwald 79030f6ee8 DataFlowVisitor: rename IsUnreachable to IsBottom 2016-06-19 13:51:47 +02:00
Daniel Grunwald 1aaf7b3dc0 Fix bugs in data flow analysis. 2016-06-18 18:13:13 +02:00
Daniel Grunwald f5e66ff623 Extract reusable DataFlowVisitor from ReachingDefinitions; and add ILVariable.HasInitialValue. 2016-06-18 02:45:53 +02:00
Daniel Grunwald b55775e2cc Add reaching definitions analysis. 2016-06-16 00:35:55 +02:00
Daniel Grunwald c171dbd520 Add class VariableScope. 2016-06-14 22:37:51 +02:00
Daniel Grunwald 9e59ea7395 Update System.Collections.Immutable 2016-06-12 16:47:19 +02:00
Daniel Grunwald 2509f27223 * Rename ControlFlowSimplification to ConditionDetection
* Rename OptimizingTransform to ControlFlowSimplification
* Move control flow transforms to separate namespace.
2015-06-14 20:53:22 +02:00