Daniel Grunwald
94d2ce0fcf
Fix crash when control flow reaches end of method.
2 years ago
Daniel Grunwald
b9ce8490f5
Remove hack that prevented inlining of the first instruction in each block.
...
Now that ILReader already creates the basic blocks and BlockBuilder only arranges them in containers, this code is no longer necessary.
2 years ago
Daniel Grunwald
b93e65cdad
Fix #901 : Refactor ILReader: only read reachable code + support reimports
...
This makes our logic more similar to that used by the dotnet runtime. This lets us infer correct stack types in edge cases such as #2401 . It also improves support for obfuscated control flow such as #2878 .
2 years ago
Daniel Grunwald
72a895f64f
#nullable enable for ILReader
2 years ago
Daniel Grunwald
6d671071c1
Fix #2851 : assertion after cloning a block with expected result type
2 years ago
Daniel Grunwald
f568123704
Add support for UTF8 string literals
2 years ago
Daniel Grunwald
475f2b3c28
Fix "ref readonly" fields.
2 years ago
Daniel Grunwald
b823955ad6
Fix mcs-5 foreach/using pattern when C# 7 (pattern matching) is not enabled.
2 years ago
Daniel Grunwald
f04acbdd74
Simplify `IsImplicitTruncation` by using an enum with 3 options instead of a pair of bools.
...
This also fixes the logic for combining the results for BinaryNumericInstruction/IfInstruction.
2 years ago
ElektroKill
ea1f6e7c25
Fixed compound assignment and post/pre increment for pointer dereference
2 years ago
Siegfried Pammer
29ca38d338
Fix handling of recombined variables and nested functions in IntroduceNativeIntTypeOnLocals and IntroduceDynamicTypeOnLocals.
2 years ago
Siegfried Pammer
539925f259
Fix #2983 : display-class locals should be named uniquely per top-level ILFunction. Add assertion to ResolveCollisions: ensure that colliding/merged variables have the same type.
2 years ago
ElektroKill
f9c7b6b66e
Extend `EliminateRedundantTryFinally` in `ReduceNestingTransform`
2 years ago
ElektroKill
8a1e8e3c6b
Make return duplication in `ControlFlowSimplification` less aggressive
2 years ago
ElektroKill
01fd6e97f3
Fixed overflow exception and added tests
2 years ago
ElektroKill
bf0fe3aa15
Consider constructor type when lifting decimal constants
2 years ago
Siegfried Pammer
7e1e9d65fd
Fix #2922 : Invalid object initializer ILAst, when expression tree contains get-accessor in Expression.Bind. Because either one of the accessors is used by Expression.Bind to determine the property, we can safely use the set-accessor instead.
2 years ago
ElektroKill
0cbd9a4faa
Add Visual Basic symbolic execution option which ignores overflow checks
2 years ago
ElektroKill
29eb31354b
Fix formatting
2 years ago
ElektroKill
b110d5c2dc
Implement support for Visual Basic yield return state machines
2 years ago
ElektroKill
25873a68e0
Improve support for post-increment/decrement on pointers
3 years ago
Siegfried Pammer
619d2af9b2
Add GetNamespaceByFullName and use it to speed up AssignVariableNames.CollectAllLowerCaseTypeNames
3 years ago
ElektroKill
b193c2a6a2
Add support for rare VB cached delegate construction pattern with return
3 years ago
ElektroKill
ea19843fbd
Fix `CachedDelegateInitializationVBWithClosure` stack slot check
3 years ago
ElektroKill
00e7524780
Fix`CachedDelegatenitializationVB` pattern
3 years ago
ElektroKill
341074aa58
Extend VBPretty Async test code
3 years ago
ElektroKill
5d3f9d3a6f
Add support for Visual Basic async await state machine decompilation
3 years ago
ElektroKill
c8fd044706
Fix `UsingTranform` for inlined `isinst` variation (refs #2199 )
3 years ago
ElektroKill
cdad14b685
Add support for `lock` statements within yield return state machines
3 years ago
tom-englert
3248657d2b
Add filtering/sorting capabilities to ReflectionDisassembler ( #2835 )
...
Co-authored-by: Siegfried Pammer <siegfriedpammer@gmail.com>
3 years ago
ElektroKill
7c73517892
Fix formatting
3 years ago
ElektroKill
a979f0fdfa
Add support for VB.NET cached delegate initialization with closures
3 years ago
Daniel Grunwald
d3919aa99a
Support native ints in "Combine bit.and into shift" transform
3 years ago
Siegfried Pammer
6766ad0c59
#2823 : Introduce `IType.GetDefinitionOrUnknown()` to allow better detection of async state-machines involving unknown types.
3 years ago
Siegfried Pammer
bde782e4f5
Fix #2806 : Do not use implicitly typed out variables, if argument and parameter types do not match exactly.
3 years ago
Siegfried Pammer
47250d670b
Fix #2791 : Ensure that the capture scope used is either a loop or the ILFunction root container.
3 years ago
Siegfried Pammer
ac6a2e54ca
Use IsAccessor again.
3 years ago
Siegfried Pammer
927b46b17d
Fix #2787 : Enable NRT in TransformCollectionAndObjectInitializers and fix problems.
3 years ago
Siegfried Pammer
9f6f7a03ac
Fix #2788 : Handling of cpobj in ILReader was missing the stobj special case for the target pointer.
3 years ago
Siegfried Pammer
1ac1bd6eab
Remove context field from TransformCollectionAndObjectInitializers, inline DoTransform.
3 years ago
Siegfried Pammer
a3191f19e2
Fix #2763 : Improve decompilation of switch-on-enum by preserving enum type information when inlining local variables into SwitchInstruction.Value.
3 years ago
Siegfried Pammer
81f575e9ce
Use PopStObjTarget in ILReader, if a call instruction has the same semantics as initobj.
3 years ago
Siegfried Pammer
948da3f9ee
ILInlining: IStatementTransform.Run repeatedly inline all possible statements.
3 years ago
Daniel Grunwald
503048b314
Prevent the early ILInlining pass from creating `addressof` instructions
3 years ago
Daniel Grunwald
9254abcf88
Fix StObj.CheckTargetSlot assertion
3 years ago
Daniel Grunwald
c36c6efb2a
ILReader: don't create stack slots if we can directly created inlined ILAst
...
This is a performance optimization: we dramatically reduce the amount of ILVariables created;
and thus need to spend less time in the first ILInlining run.
3 years ago
Siegfried Pammer
af56bb10d0
Determine isBranchTarget in a separate pass. We will need it for an optimization to ILReader in a future commit.
3 years ago
Siegfried Pammer
c5ff0cafc5
TransformInlineAssignmentStObjOrCall: Make sure no dead store is produced by the transform.
3 years ago
Daniel Grunwald
b4b070468f
Revert "Performance Optimization: Do no longer collect all lower case type and member names."
...
This reverts commit 6584a2f576
.
3 years ago
Siegfried Pammer
6584a2f576
Performance Optimization: Do no longer collect all lower case type and member names.
3 years ago