本文整理汇总了C#中Microsoft.CodeAnalysis.CSharp.SyntheticBoundNodeFactory.GenerateLabel方法的典型用法代码示例。如果您正苦于以下问题:C# SyntheticBoundNodeFactory.GenerateLabel方法的具体用法?C# SyntheticBoundNodeFactory.GenerateLabel怎么用?C# SyntheticBoundNodeFactory.GenerateLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.CodeAnalysis.CSharp.SyntheticBoundNodeFactory
的用法示例。
在下文中一共展示了SyntheticBoundNodeFactory.GenerateLabel方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AsyncMethodToClassRewriter
internal AsyncMethodToClassRewriter(
MethodSymbol method,
AsyncMethodBuilderMemberCollection asyncMethodBuilderMemberCollection,
SyntheticBoundNodeFactory F,
FieldSymbol state,
FieldSymbol builder,
HashSet<Symbol> variablesCaptured,
Dictionary<Symbol, CapturedSymbolReplacement> initialProxies,
DiagnosticBag diagnostics,
bool generateDebugInfo)
: base(F, method, state, variablesCaptured, initialProxies, diagnostics,
useFinalizerBookkeeping: false,
generateDebugInfo: generateDebugInfo)
{
this.method = method;
this.asyncMethodBuilderMemberCollection = asyncMethodBuilderMemberCollection;
this.asyncMethodBuilderField = builder;
this.exprReturnLabel = F.GenerateLabel("exprReturn");
this.exitLabel = F.GenerateLabel("exitLabel");
this.exprRetValue = method.IsGenericTaskReturningAsync(F.Compilation)
? F.SynthesizedLocal(asyncMethodBuilderMemberCollection.ResultType, GeneratedNames.AsyncExprRetValueFieldName())
: null;
this.dynamicFactory = new LoweredDynamicOperationFactory(F);
}
示例2: AsyncMethodToStateMachineRewriter
internal AsyncMethodToStateMachineRewriter(
MethodSymbol method,
int methodOrdinal,
AsyncMethodBuilderMemberCollection asyncMethodBuilderMemberCollection,
SyntheticBoundNodeFactory F,
FieldSymbol state,
FieldSymbol builder,
IReadOnlySet<Symbol> hoistedVariables,
IReadOnlyDictionary<Symbol, CapturedSymbolReplacement> nonReusableLocalProxies,
SynthesizedLocalOrdinalsDispenser synthesizedLocalOrdinals,
VariableSlotAllocator slotAllocatorOpt,
int nextFreeHoistedLocalSlot,
DiagnosticBag diagnostics)
: base(F, method, state, hoistedVariables, nonReusableLocalProxies, synthesizedLocalOrdinals, slotAllocatorOpt, nextFreeHoistedLocalSlot, diagnostics, useFinalizerBookkeeping: false)
{
_method = method;
_asyncMethodBuilderMemberCollection = asyncMethodBuilderMemberCollection;
_asyncMethodBuilderField = builder;
_exprReturnLabel = F.GenerateLabel("exprReturn");
_exitLabel = F.GenerateLabel("exitLabel");
_exprRetValue = method.IsGenericTaskReturningAsync(F.Compilation)
? F.SynthesizedLocal(asyncMethodBuilderMemberCollection.ResultType, syntax: F.Syntax, kind: SynthesizedLocalKind.AsyncMethodReturnValue)
: null;
_dynamicFactory = new LoweredDynamicOperationFactory(F, methodOrdinal);
_awaiterFields = new Dictionary<TypeSymbol, FieldSymbol>(TypeSymbol.EqualsIgnoringDynamicComparer);
_nextAwaiterId = slotAllocatorOpt?.PreviousAwaiterSlotCount ?? 0;
}
示例3: AsyncMethodToStateMachineRewriter
internal AsyncMethodToStateMachineRewriter(
MethodSymbol method,
AsyncMethodBuilderMemberCollection asyncMethodBuilderMemberCollection,
SyntheticBoundNodeFactory F,
FieldSymbol state,
FieldSymbol builder,
IReadOnlySet<Symbol> variablesCaptured,
IReadOnlyDictionary<Symbol, CapturedSymbolReplacement> nonReusableLocalProxies,
DiagnosticBag diagnostics)
: base(F, method, state, variablesCaptured, nonReusableLocalProxies, diagnostics, useFinalizerBookkeeping: false)
{
this.method = method;
this.asyncMethodBuilderMemberCollection = asyncMethodBuilderMemberCollection;
this.asyncMethodBuilderField = builder;
this.exprReturnLabel = F.GenerateLabel("exprReturn");
this.exitLabel = F.GenerateLabel("exitLabel");
this.exprRetValue = method.IsGenericTaskReturningAsync(F.Compilation)
? F.SynthesizedLocal(asyncMethodBuilderMemberCollection.ResultType, kind: SynthesizedLocalKind.AsyncMethodReturnValue)
: null;
this.dynamicFactory = new LoweredDynamicOperationFactory(F);
}
示例4: AsyncMethodToClassRewriter
internal AsyncMethodToClassRewriter(
MethodSymbol method,
AsyncMethodBuilderMemberCollection asyncMethodBuilderMemberCollection,
SyntheticBoundNodeFactory factory,
FieldSymbol state,
FieldSymbol builder,
Dictionary<Symbol, CapturedSymbol> localProxies,
DiagnosticBag diagnostics)
: base(factory, state, localProxies, diagnostics)
{
this.method = method;
this.asyncMethodBuilderMemberCollection = asyncMethodBuilderMemberCollection;
this.asyncMethodBuilderField = builder;
this.exprReturnLabel = factory.GenerateLabel("exprReturn");
this.exprRetValue = method.IsGenericTaskReturningAsync()
? factory.SynthesizedLocal(asyncMethodBuilderMemberCollection.ResultType, GeneratedNames.AsyncExprRetValueFieldName())
: null;
this.dynamicFactory = new LoweredDynamicOperationFactory(factory);
}