Daniel Grunwald
30552b01f7
Replace a couple of `inst.ResultType -> IType` conversions with `InferType()` calls.
2 weeks ago
Daniel Grunwald
60efa214b9
NullCoalescingInstruction: use a more detailed invariant.
...
Compute the underlying result type instead of storing it explicitly.
2 weeks ago
Daniel Grunwald
5526400b17
Extend InferType() to every ILInstruction
...
Change InferType() to an abstract method and implement for every ILInstruction.
With this change, we now always have enough information to create a variable of an appropriate type to store the result of evaluating the instruction.
This previously was not the case for instructions producing "other value type", for which the stacktype-based fallback incorrectly produced `object`.
2 weeks ago
Siegfried Pammer
04505bbdf2
Highlight and scroll to the changed instruction in the ILAst view
...
The C# debug-steps view highlights and centers the exact AST node a
transform changed; the ILAst view already had the step tree and
replay-at-step but produced no highlight. Bring it to parity.
IL rendering has no token-writer seam like the C# output visitor, so
per-instruction text spans are recorded by bracketing
ILInstruction.WriteTo via a new INodeTrackingOutput. The dominant
inst.ReplaceWith(newInst) transform pattern detaches the instruction
passed to Step, so ILTransformContext gains EndStep to record the
produced instruction; Stepper additionally records the position's
ancestor chain as fallback candidates before the step-limit throw, so
the "show state before" view -- which halts at the selected step --
still resolves to a surviving ancestor (ultimately the ILFunction).
The highlight-range resolver is shared with the C# language.
Assisted-by: Claude:claude-opus-4-8:Claude Code
3 months ago
Peter Crabtree
e1e16b64f5
dev: Strip BOM mark from text files
1 year ago
Siegfried Pammer
28aa88bfb8
Make NullableLiftingTransform handle the case where ExpressionTransforms.VisitComp already lifted a nullable comparison with constant.
2 years ago
Siegfried Pammer
9d22e3ab41
NullableLiftingTransform: Undo new compiler optimization (omitting get_HasValue for comparisions with constants)
2 years ago
Siegfried Pammer
9ba47db69b
Add new a.GetValueOrDefault(b) -> a ?? b transform for side-effect-free default values.
3 years ago
Siegfried Pammer
1568aeca3e
Fix #2506 : NamedArgumentTransform loses information, if the original variable is of StackType.Ref
5 years ago
Siegfried Pammer
e50d221e06
Adjust NullableLiftingTransform to match new patterns due to RemoveInfeasiblePathTransform.
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
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
Jane Doe
8a625954c4
short-circuting -> short-circuiting
7 years ago
Siegfried Pammer
7d4b4c6433
Implement NullCoalescingTransform with value types.
7 years ago
Daniel Grunwald
c3037afa70
Fix #1352 : Assertion in NullableLiftingTransform.DoLift
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.
8 years ago
Daniel Grunwald
ef866040b4
Update to SRM 1.6.0 and Roslyn 2.9. Adjust decompiler to new code pattern used for lifted nullable comparisons.
8 years ago
Daniel Grunwald
9479e8af13
Support overloaded operator &&/||.
8 years ago
Daniel Grunwald
b396d203bd
Merge IDecompilerTypeSystem with ICompilation.
8 years ago
Daniel Grunwald
80a717c090
Fix some bugs in decompilation of ?. operator.
9 years ago
Daniel Grunwald
ca0fa55af8
Implement null propagation transform.
9 years ago
Daniel Grunwald
d949d4e638
Fix #991 : explicit represent T->T? conversion in lifted operator calls.
9 years ago
Daniel Grunwald
7af15d27cd
Fix #905 : improve exit point detection for foreach loops.
9 years ago
Daniel Grunwald
6272c21ece
Simplify SwitchOnNullableTransform.
9 years ago
Daniel Grunwald
a4d4c1253e
Fix two minor bugs in NullableLiftingTransform, and enable the LiftedOperators tests that are not affected by redundant casts.
9 years ago
Daniel Grunwald
39bb6856b7
Fix various bugs with compound assignments.
9 years ago
Daniel Grunwald
33e5011367
[nullables] support equality comparisons on System.Decimal
9 years ago
Daniel Grunwald
bb3ad5c811
[nullables] Lift user-defined equality operator calls if only one argument is nullable.
9 years ago
Daniel Grunwald
87a979b549
[nullables] Lift user-defined equality operator calls.
9 years ago
Daniel Grunwald
ba009e790d
Fix #880 : NullReferenceException in NullableLiftingTransform.
9 years ago
Siegfried Pammer
48f344ed03
Add another pattern for generics/nullable using.
9 years ago
Siegfried Pammer
2c40b45717
Add support for using on nullables.
9 years ago
Siegfried Pammer
d15d1b86a6
Add transform for new T().
9 years ago
Daniel Grunwald
b5e8571382
[nullables] Support lifting calls to user-defined operators.
...
Not yet handled: op_Equality and op_Inequality.
9 years ago
Daniel Grunwald
b7320b25e4
[nullables] Lift three-valued logic operators ('&' and '|' on bool?)
9 years ago
Daniel Grunwald
96c6b03d9b
[nullables] operator! on bool?
9 years ago
Daniel Grunwald
02af1b0ab5
[nullables] Lifting support for: bool? == true, bool? != true, bool? == false, bool? != false
9 years ago
Daniel Grunwald
63d6f4bbca
[nullables] Add lifting for operator~.
9 years ago
Daniel Grunwald
b318327db3
[nullables] Fix lifted != operator.
9 years ago
Daniel Grunwald
8701640ca7
[nullables] Add support for equality comparisons.
9 years ago
Daniel Grunwald
21ef967d4d
[nullables] Lifting for non-equality comparisons.
9 years ago
Daniel Grunwald
d3686fc62c
Add comments to lifting functions.
9 years ago
Daniel Grunwald
4830b37ab9
[nullables] Add support for '??' operator on nullables.
9 years ago
Daniel Grunwald
3c31e100ad
[nullables] Fix nullable transform being applied incorrectly.
9 years ago
Daniel Grunwald
33099c5d65
[nullables] Extend nullable lifting to arbitrary combinations of 'conv' and 'binary.numeric'.
9 years ago
Daniel Grunwald
e266c634de
[nullables] Add support for lifted binary operators where one of the inputs is nullable.
9 years ago
Daniel Grunwald
d6d6e17e8b
As with every new file: convert spaces to tabs
9 years ago
Daniel Grunwald
133ddac256
[nullables] Add support for lifted conversions.
9 years ago