Siegfried Pammer
63757ead3b
Fix #3382 : Support compiler-generated throw-helper invocations in switch-expression implicit default-case.
...
Assisted-by: Claude:claude-fable-5:Claude Code
3 weeks ago
danbopes
01b968fbbd
Add opt-in SortSwitchSections setting ( #3749 ). ( #3750 )
...
When enabled, switch sections are ordered by their case label value
instead of by the underlying branch's IL offset. Default is false to
keep existing output unchanged. Useful when diffing decompiler output
across rebuilds of obfuscated assemblies, where IL block layout is
unstable but the case-to-value mapping is not.
Includes an ILPretty test that exercises a hand-written switch whose
table targets are placed at non-monotonic IL offsets (simulating
obfuscator block shuffling) and verifies the cases come out in
label-value order with the setting enabled. Also adds the
Resources.resx / Resources.Designer.cs entry so the WPF settings UI
shows a proper label instead of the raw key.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 weeks ago
Peter Crabtree
e1e16b64f5
dev: Strip BOM mark from text files
10 months ago
Siegfried Pammer
969e3e546a
Add support for switch on (ReadOnly)Span<char> using a compiler-generated hash function.
2 years ago
Daniel Grunwald
3d10509b1b
Add SparseIntegerSwitch option.
6 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
6 years ago
Siegfried Pammer
a6bbccae8d
Fix #2123 : switch on string detection:
...
1) Do not remove switchValueVar, if it is used elsewhere.
2) Support empty case blocks in SimplifyCascadingIfStatements transform
6 years ago
Daniel Grunwald
2acc4339df
#2058 : Mark most transforms as public to help users that use the ILAst directly without decompiling to C#.
6 years ago
Daniel Grunwald
30da0b7525
Add some missing checks to MatchRoslynSwitchOnString
6 years ago
Jane Doe
37a801e3fb
Anaylsis -> Analysis
7 years ago
Siegfried Pammer
def681ccdf
Fix #1621 : Add AllowUnreachableCases in switch analysis.
7 years ago
Siegfried Pammer
9c06d5c924
Fix #1642 : Allow StackTypes I, I4, I8 and Unknown as switch value, convert Unknown and I to I8.
7 years ago
Daniel Grunwald
ccdabf2325
Fix a bunch of XmlDoc compiler warnings.
7 years ago
Siegfried Pammer
c1fca21e8a
Make ILRange field private - introduce public API for IL range manipulation.
7 years ago
Daniel Grunwald
b5ab8a4622
Fix #1338 : KeyNotFoundException in SwitchDetection.AnalyzeControlFlow()
8 years ago
Chicken-Bones
e9b766d708
Improve persistence of IL offsets through various transforms.
8 years ago
Chicken-Bones
481e05eabb
Better shortcircuit detection to avoid single condition switch statements
8 years ago
Chicken-Bones
d8244e347b
Select outer-loop continue branches as break targets for switches in nested loops
8 years ago
Chicken-Bones
9f21e6a2b2
Increase max values per switch section
8 years ago
Chicken-Bones
eed337c12e
Remove dead code when unreachable condition blocks are consumed by SwitchDetection
8 years ago
Chicken-Bones
d86f4b4132
Prefer simple if statements over switch with single case block
8 years ago
Chicken-Bones
7017d998d0
Improve switch decompilation in loops via early detection of continue blocks.
8 years ago
Chicken-Bones
1a021635cc
Fix detection of switch statements with cases containing a single break;
...
Remedy incorrect assumption that the default case was special.
8 years ago
Chicken-Bones
cb4fa90545
Add IL ordering based hint to UseCSharpSwitch
8 years ago
Chicken-Bones
62b2ad4f8d
Improve UseCSharpSwitch to reduce over-aggressive use of switch producing poor quality code.
8 years ago
Daniel Grunwald
c16817ab4e
Fix #1186 : LoopDetection assertion with unreachable code
8 years ago
Siegfried Pammer
9b13fe373a
Fix #914 : Exception when viewing an internal class in Roslyn assembly
9 years ago
Daniel Grunwald
adb64514f8
Add some comments to SwitchDetection.UseCSharpSwitch
9 years ago
Siegfried Pammer
f7f583056a
Fix order of switch blocks.
9 years ago
Daniel Grunwald
c7490ff2fe
[switch] Sort switch sections
9 years ago
Daniel Grunwald
f42d1a4b34
Fix crash in SwitchDetection.
9 years ago
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'
9 years ago
Daniel Grunwald
a5a98ae9f1
Adjust labels of simple switch instructions.
9 years ago
Daniel Grunwald
2207ab40f7
Check the CancellationToken a bit more frequently.
9 years ago
Siegfried Pammer
840ec04fde
Namespace adjustments for Syntax classes
10 years ago
Christoph Wille
1ce8349dd9
Adjust namespaces
10 years ago
Daniel Grunwald
dfe70d5366
Improve detection of short-circuiting operators.
10 years ago
Daniel Grunwald
4a13491ff9
Improve switch simplifcation: combine case section with default block where possible
10 years ago
Daniel Grunwald
36d61db3a7
Add support for sparse integer switches.
10 years ago