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
Daniel Grunwald
f104233e78
Fix #2388 : Add support for branch from catch-block to try-block (VB `On Error Resume Next`)
4 years ago
Siegfried Pammer
e1ca4db851
Fix #2527 : Support skip locals init
4 years ago
Siegfried Pammer
1568aeca3e
Fix #2506 : NamedArgumentTransform loses information, if the original variable is of StackType.Ref
4 years ago
Daniel Grunwald
6e8c1b3117
ILReader: support comparison between StackType.Ref and StackType.I
...
Update Unsafe.il tests to .NET 5.0 version.
5 years ago
Daniel Grunwald
80cf72e498
#2182 : Move "Transform call to struct constructor" from EarlyExpressionTransforms to ILReader.
...
This fixes the evaluation order for such calls (and an assertion in StObj.CheckTargetSlot).
5 years ago
Daniel Grunwald
47685c4b57
Fix weird casts to `nint` when writing to fields of unknown type.
5 years ago
Daniel Grunwald
3831b42197
Properly support `calli` instruction and its interaction with function pointer types.
5 years ago
dotnet format
0d9f871a4f
#2128 : Reformat the whole code base.
5 years ago
Daniel Grunwald
bdea1950a8
Add `#if !NETCORE` around extension methods that are included with .NET Core 3
5 years ago
Daniel Grunwald
2c0554f129
Fix #1963 : Support decompiling `calli` instructions into C# 9 function pointer syntax.
5 years ago
Jackson Davis
6ab1f98fa3
Expand the range of sequence points out the closest empty ilstack
...
or implicit sequence point without creating overlapping sequence points.
If such a location cannot be found do, nothing. Fill in the
gaps with hidden sequence points.
Also emit a sequence point for
the prolog to account for seqeunce point there emitted by the C#
compiler. Without this, the debugger can stop there on a step in
using the original pdb, then decompile resulting in a no-code at this
location failure.
5 years ago
SilverFox
f039705704
Add support for generic local function
6 years ago
Daniel Grunwald
a1c211f326
Fix #1794 : Avoid extra cast to double for ulong -> float conversion
6 years ago
Daniel Grunwald
ae32913aca
Add IMethod.ThisIsRefReadOnly
6 years ago
Siegfried Pammer
9190515d8b
#1151 : Support for ref readonly locals.
6 years ago
Daniel Grunwald
57b725df79
Fix #1655 : Incorrect pointer cast when calling method on integer constant
6 years ago
Siegfried Pammer
6b075326f0
Fix #1615 : Handle nil tokens gracefully.
6 years ago
Daniel Grunwald
8117dfff4a
Fix #1242 : Discard unreachable code.
...
Unreachable code is not part of the dominator tree, which most of our transforms are based on.
In particular, dominance-based loop detection runs into the problem where unreachable code might have jumps into two independent loops. In that case, it's impossible to place the unreachable code in a way that avoids assertions / generating invalid C#.
We establish the invariant that all blocks in a BlockContainer must be statically reachable from the entry point (-> every block is part of the dominator tree). This means transforms no longer have to deal with special cases for unreachable code.
The "Remove dead and side effect free code" option still has an effect on dead stores, but unreachable code is now always removed (previously this also was dependent on this option).
6 years ago
Daniel Grunwald
c366235246
#1349 : Fix type substitution for members of unknown generic types (due to unresolved references)
...
Also, assume that unknown inputs to ldfld are temporaries, not unmanaged pointers.
This avoids emitting weird pointer casts when accessing fields on unresolved value types.
6 years ago
Siegfried Pammer
d50b8d66d1
Fix #1373 , fix #1541 : add support for instance calls to CallIndirect.
6 years ago
Siegfried Pammer
bd77b8301f
Basic implementation of local functions.
6 years ago
Siegfried Pammer
c1fca21e8a
Make ILRange field private - introduce public API for IL range manipulation.
6 years ago
Daniel Grunwald
47ca51a769
Clarify the meaning of ILVariable.Index
6 years ago
Daniel Grunwald
70138fa63d
#1336 : Use delayed exceptions for Array.Get/Set.
...
We use this flag for the ldelem/stelem representation, so we need to also use
it for Get/Set on multi-dimensional arrays.
6 years ago
Daniel Grunwald
2f54eee5db
#1195 : Fix comparison of object reference with ldc.i4 0.
7 years ago
Daniel Grunwald
ba0a3af3c4
#1195 : Fix several issues decompiling SharpSvn.dll (C++/CLI)
7 years ago
Daniel Grunwald
0006330c1a
Fix #1235 : Insert StackType conversion when filling in Leave target.
7 years ago
Daniel Grunwald
aa10f0089a
Fix #1226 : Use StackType.O for LdLen argument.
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
2d04f24670
Fix stack overflow in RequiredNamespaceCollector.
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
Siegfried Pammer
89544864bf
Provide better exceptions and messages in case of errors.
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
Daniel Grunwald
367b396b35
Fix assertion with fields declared in an unresolved class type.
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
Siegfried Pammer
bbe16584f7
Fix #1150 :
...
- Allow unknown type in BinaryNumericInstruction
- Make conversions explicit: I+I8=I8, I4+I8=I8, F4+F8=F8
7 years ago
Daniel Grunwald
c79b29ab41
AstTypeBuilder: Distribute type arguments on outer types and nested type.
7 years ago
Siegfried Pammer
6888b405b7
Add TS method to ILReader
7 years ago
Daniel Grunwald
ca09f09222
Don't use named arguments when IL stack is empty after the stloc.
...
An empty stack indicates the statement is complete, so the code
is usually more readable if we keep the local variable.
7 years ago
Siegfried Pammer
bb67948844
Fix remaining compile errors after merge.
7 years ago
Siegfried Pammer
458f448fae
Avoid unnecessary allocations of MetadataReader and clean up Dom structs a bit.
7 years ago
Siegfried Pammer
cbb1f204e1
Rename DynamicAwareTypeReference to DynamicTypeReference
7 years ago
Siegfried Pammer
ce894c4ad4
Add IDebugInfoProvider implementations to ILSpy
7 years ago
Siegfried Pammer
fb41cfe4f8
Fix bugs when dealing with pinned local vars and varargs methods
7 years ago