提交 41f1705f 编写于 作者: V VSadov

Rename AsyncHandlerRewriter to be AsyncExceptionHandlerRewriter (changeset 1302421)

上级 3d8cb9c6
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
<Compile Include="FlowAnalysis\VariablesDeclaredWalker.cs" /> <Compile Include="FlowAnalysis\VariablesDeclaredWalker.cs" />
<Compile Include="LanguageVersion.cs" /> <Compile Include="LanguageVersion.cs" />
<Compile Include="Lowering\AsyncRewriter\AsyncConstructor.cs" /> <Compile Include="Lowering\AsyncRewriter\AsyncConstructor.cs" />
<Compile Include="Lowering\AsyncRewriter\AsyncHandlerRewriter.cs" /> <Compile Include="Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs" />
<Compile Include="Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs" /> <Compile Include="Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs" />
<Compile Include="Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs" /> <Compile Include="Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs" />
<Compile Include="Lowering\AsyncRewriter\AsyncRewriter.cs" /> <Compile Include="Lowering\AsyncRewriter\AsyncRewriter.cs" />
...@@ -865,7 +865,7 @@ ...@@ -865,7 +865,7 @@
<ImportGroup Label="Targets"> <ImportGroup Label="Targets">
<Import Project="..\..\..\Tools\Microsoft.CodeAnalysis.Toolset.Open\Targets\VSL.Imports.targets" /> <Import Project="..\..\..\Tools\Microsoft.CodeAnalysis.Toolset.Open\Targets\VSL.Imports.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Import Project="..\..\packages\StyleCop.MSBuild.4.7.48.2\build\StyleCop.MSBuild.Targets" Condition="Exists('..\..\packages\StyleCop.MSBuild.4.7.48.2\build\StyleCop.MSBuild.Targets')" /> <Import Project="..\..\..\packages\StyleCop.MSBuild.4.7.48.2\build\StyleCop.MSBuild.Targets" Condition="Exists('..\..\..\packages\StyleCop.MSBuild.4.7.48.2\build\StyleCop.MSBuild.Targets')" />
</ImportGroup> </ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
......
...@@ -1140,7 +1140,7 @@ public override object VisitField(FieldSymbol symbol, TypeCompilationState argum ...@@ -1140,7 +1140,7 @@ public override object VisitField(FieldSymbol symbol, TypeCompilationState argum
// is that we may need access to exception locals and it would be fairly hard to do // is that we may need access to exception locals and it would be fairly hard to do
// if these locals are captured into closures (possibly nested ones). // if these locals are captured into closures (possibly nested ones).
Debug.Assert(method.IteratorElementType == null); Debug.Assert(method.IteratorElementType == null);
loweredBody = AsyncHandlerRewriter.Rewrite( loweredBody = AsyncExceptionHandlerRewriter.Rewrite(
generateDebugInfo, generateDebugInfo,
method, method,
method.ContainingType, method.ContainingType,
......
...@@ -13,7 +13,7 @@ namespace Microsoft.CodeAnalysis.CSharp ...@@ -13,7 +13,7 @@ namespace Microsoft.CodeAnalysis.CSharp
/// with surrogate replacements that keep actual handler code in regular code blocks. /// with surrogate replacements that keep actual handler code in regular code blocks.
/// That allows these constructs to be further lowered at the async lowering pass. /// That allows these constructs to be further lowered at the async lowering pass.
/// </summary> /// </summary>
internal sealed class AsyncHandlerRewriter : BoundTreeRewriter internal sealed class AsyncExceptionHandlerRewriter : BoundTreeRewriter
{ {
private readonly bool generateDebugInfo; private readonly bool generateDebugInfo;
private readonly CSharpCompilation compilation; private readonly CSharpCompilation compilation;
...@@ -24,7 +24,7 @@ internal sealed class AsyncHandlerRewriter : BoundTreeRewriter ...@@ -24,7 +24,7 @@ internal sealed class AsyncHandlerRewriter : BoundTreeRewriter
AwaitCatchFrame currentAwaitCatchFrame = null; AwaitCatchFrame currentAwaitCatchFrame = null;
AwaitFinallyFrame currentAwaitFinallyFrame = new AwaitFinallyFrame(null, null); AwaitFinallyFrame currentAwaitFinallyFrame = new AwaitFinallyFrame(null, null);
private AsyncHandlerRewriter( private AsyncExceptionHandlerRewriter(
bool generateDebugInfo, bool generateDebugInfo,
MethodSymbol containingMethod, MethodSymbol containingMethod,
NamedTypeSymbol containingType, NamedTypeSymbol containingType,
...@@ -129,7 +129,7 @@ internal sealed class AsyncHandlerRewriter : BoundTreeRewriter ...@@ -129,7 +129,7 @@ internal sealed class AsyncHandlerRewriter : BoundTreeRewriter
var compilation = containingType.DeclaringCompilation; var compilation = containingType.DeclaringCompilation;
var factory = new SyntheticBoundNodeFactory(containingSymbol, statement.Syntax, compilationState, diagnostics); var factory = new SyntheticBoundNodeFactory(containingSymbol, statement.Syntax, compilationState, diagnostics);
var rewriter = new AsyncHandlerRewriter(generateDebugInfo, containingSymbol, containingType, factory, compilation, diagnostics, analysis); var rewriter = new AsyncExceptionHandlerRewriter(generateDebugInfo, containingSymbol, containingType, factory, compilation, diagnostics, analysis);
var loweredStatement = (BoundStatement)rewriter.Visit(statement); var loweredStatement = (BoundStatement)rewriter.Visit(statement);
return loweredStatement; return loweredStatement;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册