Browse Source

Temporarily remove support for async and yield

pull/1198/head
Siegfried Pammer 7 years ago
parent
commit
b3e25e997e
  1. 12
      ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs
  2. 3
      ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj

12
ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs

@ -79,8 +79,8 @@ namespace ICSharpCode.Decompiler.CSharp @@ -79,8 +79,8 @@ namespace ICSharpCode.Decompiler.CSharp
new ILInlining(),
new DetectPinnedRegions(), // must run after inlining but before non-critical control flow transforms
new InlineReturnTransform(),
new YieldReturnDecompiler(), // must run after inlining but before loop detection
new AsyncAwaitDecompiler(), // must run after inlining but before loop detection
//new YieldReturnDecompiler(), // must run after inlining but before loop detection
//new AsyncAwaitDecompiler(), // must run after inlining but before loop detection
new DetectCatchWhenConditionBlocks(), // must run after inlining but before loop detection
new DetectExitPoints(canIntroduceExitForReturn: false),
new EarlyExpressionTransforms(),
@ -216,8 +216,8 @@ namespace ICSharpCode.Decompiler.CSharp @@ -216,8 +216,8 @@ namespace ICSharpCode.Decompiler.CSharp
return true;
if (settings.AnonymousMethods && methodHandle.HasGeneratedName(metadata) && methodHandle.IsCompilerGenerated(metadata))
return true;
if (settings.AsyncAwait && AsyncAwaitDecompiler.IsCompilerGeneratedMainMethod(module, (MethodDefinitionHandle)member))
return true;
/*if (settings.AsyncAwait && AsyncAwaitDecompiler.IsCompilerGeneratedMainMethod(module, (MethodDefinitionHandle)member))
return true;*/
return false;
case HandleKind.TypeDefinition:
var typeHandle = (TypeDefinitionHandle)member;
@ -833,8 +833,8 @@ namespace ICSharpCode.Decompiler.CSharp @@ -833,8 +833,8 @@ namespace ICSharpCode.Decompiler.CSharp
// When decompiling definitions only, we can cancel decompilation of all steps
// after yield and async detection, because only those are needed to properly set
// IsAsync/IsIterator flags on ILFunction.
if (!settings.DecompileMemberBodies && transform is AsyncAwaitDecompiler)
break;
//if (!settings.DecompileMemberBodies && transform is AsyncAwaitDecompiler)
// break;
}
var body = BlockStatement.Null;

3
ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj

@ -302,7 +302,6 @@ @@ -302,7 +302,6 @@
<Compile Include="Metadata\UniversalAssemblyResolver.cs" />
<Compile Include="Metadata\UnresolvedAssemblyNameReference.cs" />
<Compile Include="IL\PointerArithmeticOffset.cs" />
<Compile Include="IL\ControlFlow\AwaitInCatchTransform.cs" />
<Compile Include="IL\ILAstWritingOptions.cs" />
<Compile Include="IL\Instructions\LdFlda.cs" />
<Compile Include="IL\Instructions\NullableInstructions.cs" />
@ -322,7 +321,6 @@ @@ -322,7 +321,6 @@
<Compile Include="IL\Transforms\SwitchOnStringTransform.cs" />
<Compile Include="IL\Transforms\TransformExpressionTrees.cs" />
<Compile Include="IL\Transforms\UsingTransform.cs" />
<Compile Include="IL\ControlFlow\AsyncAwaitDecompiler.cs" />
<Compile Include="IL\ControlFlow\ControlFlowGraph.cs" />
<Compile Include="IL\ControlFlow\StateRangeAnalysis.cs" />
<Compile Include="IL\ControlFlow\SymbolicExecution.cs" />
@ -332,7 +330,6 @@ @@ -332,7 +330,6 @@
<Compile Include="IL\Instructions\NullCoalescingInstruction.cs" />
<Compile Include="IL\Instructions\ThreeValuedLogicInstructions.cs" />
<Compile Include="IL\Patterns\AnyNode.cs" />
<Compile Include="IL\ControlFlow\YieldReturnDecompiler.cs" />
<Compile Include="IL\Transforms\AssignVariableNames.cs" />
<Compile Include="IL\Transforms\DetectCatchWhenConditionBlocks.cs" />
<Compile Include="IL\Transforms\LockTransform.cs" />

Loading…
Cancel
Save