Chicken-Bones
f539bee362
Move binary->logical AND to ExpressionTransforms and use SemanticHelper.IsPure
7 years ago
Chicken-Bones
fe6a85fa68
Reverse Roslyn optimisation to favour && over & on boolean operands.
7 years ago
Siegfried Pammer
dbe29596de
Fix #1210 : v4.x: System.InvalidCastException: Specified cast is not valid
7 years ago
Daniel Grunwald
4e8ebbf7f4
Fix #1189 : Avoid crashing on invalid IL bytes.
7 years ago
Daniel Grunwald
08e8091336
Fix #1211 : Handle BadImageFormatException on invalid local signatures.
7 years ago
Daniel Grunwald
90d866d78a
Fix #1193 : Performance issues with deeply nested block structures
7 years ago
Daniel Grunwald
bafb6d1d49
Fix #1194 : empty if statements are decompiled into goto statements
7 years ago
Daniel Grunwald
2d04f24670
Fix stack overflow in RequiredNamespaceCollector.
7 years ago
Daniel Grunwald
d8c8a75c2e
Fix #1154 : Decompilation of fixed statement when pointer variable is unused
7 years ago
Daniel Grunwald
b396d203bd
Merge IDecompilerTypeSystem with ICompilation.
7 years ago
Daniel Grunwald
1f3916d554
Use the resolve methods in MetadataModule, and remove the wrappers in DecompilerTypeSystem.
7 years ago
Daniel Grunwald
c54632e7cb
Fix some type system bugs.
7 years ago
Daniel Grunwald
107fe5eb1c
Eliminate SpecializingDecompilerTypeSystem and use GenericContext instead.
7 years ago
Daniel Grunwald
4580eab7ab
Disable ref inline assignments.
...
This increases the chances that we'll avoid CS8174: A declaration of a by-reference variable must have an initializer.
7 years ago
Daniel Grunwald
7ee686cb67
Allow splitting a variable even if it has its address taken and stored in a ref-local.
...
The currently implementation is somewhat minimal and only works in a very limited set of circumstances:
* the ref local is single-assignment
* the ref local is initialized directly with 'ldloca target; stloc ref_local',
not a derived pointer (e.g. 'ldloca target; ldflda F; stloc ref_local').
* all uses of the ref_local are immediately consuming the address
This improves variable splitting cases where the compiler re-uses a stack slot containing a reference,
e.g. in some cases of '?.' on Nullable<T>.
7 years ago
Daniel Grunwald
3b46776c5e
Rename IAssembly -> IModule.
...
While support for multi-module assemblies isn't fully working yet; it is clear at this point that we want
to treat each module in a multi-module assembly separately for the purposes of the type system.
7 years ago
Daniel Grunwald
33ef82f75c
Fix #1082 : Add support for compound assignment with string.Concat().
...
Currently only supports the binary overloads of string.Concat().
7 years ago
Daniel Grunwald
d166101387
Allow splitting variables that have their address taken.
...
This works if all addresses are immediately used in calls (as common with method calls on value-type,
which take 'this' by-reference); as long as the call doesn't return the reference again.
Closes #1136 .
7 years ago
Daniel Grunwald
b149238777
Introduce IType.IsByRefLike.
7 years ago
Siegfried Pammer
20ccd51948
Fix bug in SwitchOnStringTransform.SimplifyCascadingIfStatements: Do not eliminate unrelated stores right before the start of the switch.
7 years ago
Siegfried Pammer
68123fc6b3
Fix build.
7 years ago
Siegfried Pammer
78dab4f44b
Cleanup
7 years ago
Siegfried Pammer
4540b93e19
Use ArgumentOutOfRangeException or BadImageFormatException in switch-default sections.
7 years ago
Siegfried Pammer
51c62353bd
Replace exception with assertion in DelegateConstruction.
7 years ago
Siegfried Pammer
89544864bf
Provide better exceptions and messages in case of errors.
7 years ago
Siegfried Pammer
bc97127d9d
Reorganize extension methods + remove unused/obsolete.
7 years ago
Siegfried Pammer
0377f406f8
Remove some NotImplementedExceptions/NotSupportedExceptions
7 years ago
Siegfried Pammer
4f8441e142
Introduce several new WriteReference overloads
7 years ago
Siegfried Pammer
bcfb3742eb
Clean up PEFile, move Pdb related types to DebugInfo namespace
7 years ago
Daniel Grunwald
2b5db1d005
#1189 : Fix various exceptions in ILReader when reading invalid IL.
7 years ago
Siegfried Pammer
c593ef960a
AssignVariableNames: unwrap modified / pinned types to ensure variables get nice names.
7 years ago
Daniel Grunwald
367b396b35
Fix assertion with fields declared in an unresolved class type.
7 years ago
Siegfried Pammer
069e4072de
Fix compile errors after merge.
7 years ago
Siegfried Pammer
4cca07aeb3
TransformExpressionTrees: Fix bug in Expression.Quote handling
7 years ago
Daniel Grunwald
385433aff4
Add MetadataMethod.
7 years ago
Daniel Grunwald
0f8c310de2
Started work on new resolved TS implementation that directly uses SRM.
...
This is a work-in-progress; ILSpy is not functional with this commit.
The old code path still exists but is broken because some classes were modified for the new system.
The new system is still highly incomplete (types only have fields, but no methods).
7 years ago
Daniel Grunwald
96e3b23ab3
Fix crash in ProxyCallReplacer
7 years ago
Siegfried Pammer
6096b7df29
#907 : CallBuilder: If type arguments cannot be inferred from the parameter list, add them before asking overload resolution, but remove them again, if it does not reduce the number of casts.
7 years ago
Siegfried Pammer
cf8bee2c01
Fix translation of generic and extension 'Add' methods in collection initializers.
7 years ago
Siegfried Pammer
e941e7534c
#1182 : TransformExpressionTrees: Remove unused pseudo this-parameter from parameterVariables list.
7 years ago
Daniel Grunwald
9a74f018b5
Decode metadata signatures directly into IType; without going through ITypeReference.
7 years ago
Siegfried Pammer
da2f0d0b91
Force explicit conversion Ref->I on BinaryNumericInstruction, except if operator is + or -.
7 years ago
Daniel Grunwald
4b96f48d87
Cosmetic changes during review of PR #1176
7 years ago
Chicken-Bones
3fb7c71f8a
Improve control flow decompilation in ConditionDetection
7 years ago
Siegfried Pammer
0bf56ce9ca
Add inlining special cases for dynamic compound assignments
7 years ago
Siegfried Pammer
a30c628e1f
Remove hack from ExpressionTransforms.TransformDynamicAddAssignOrRemoveAssign, implement VisitDynamicSetIndexInstruction
7 years ago
Siegfried Pammer
904aa5269e
Fix various bugs in ExpressionBuilder.VisitDynamic* + refactor DynamicInstructions a bit
7 years ago
Siegfried Pammer
07608e018f
Fix bug in IntroduceDynamicTypeOnLocals
7 years ago
Siegfried Pammer
eeeecb2259
Remove "do what I mean" logic from AssignVariableNames
7 years ago
Siegfried Pammer
805b9f4bb4
Add missing CallInlineAssign block kind to ILInlining.FindLoadInNext
7 years ago