本文整理汇总了C#中Mono.CSharp.EmitContext.StartFlowBranching方法的典型用法代码示例。如果您正苦于以下问题:C# EmitContext.StartFlowBranching方法的具体用法?C# EmitContext.StartFlowBranching怎么用?C# EmitContext.StartFlowBranching使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.CSharp.EmitContext
的用法示例。
在下文中一共展示了EmitContext.StartFlowBranching方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveUnreachable
/// <summary>
/// We already know that the statement is unreachable, but we still
/// need to resolve it to catch errors.
/// </summary>
public virtual bool ResolveUnreachable (EmitContext ec, bool warn)
{
//
// This conflicts with csc's way of doing this, but IMHO it's
// the right thing to do.
//
// If something is unreachable, we still check whether it's
// correct. This means that you cannot use unassigned variables
// in unreachable code, for instance.
//
if (warn)
Report.Warning (162, 2, loc, "Unreachable code detected");
ec.StartFlowBranching (FlowBranching.BranchingType.Block, loc);
bool ok = Resolve (ec);
ec.KillFlowBranching ();
return ok;
}
示例2: Resolve
public override bool Resolve (EmitContext ec)
{
bool ok = true;
ec.StartFlowBranching (this);
if (!parent.ResolveLoop (ec))
ok = false;
ec.EndFlowBranching ();
ResolveReachability (ec);
if (TypeManager.void_dispose_void == null) {
TypeManager.void_dispose_void = TypeManager.GetPredefinedMethod (
TypeManager.idisposable_type, "Dispose", loc, Type.EmptyTypes);
}
return ok;
}
示例3: ResolveMeta
public bool ResolveMeta (EmitContext ec, Parameters ip)
{
int errors = Report.Errors;
int orig_count = parameters.Count;
if (top_level_branching != null)
return true;
if (ip != null)
parameters = ip;
// Assert: orig_count != parameter.Count => orig_count == 0
if (orig_count != 0 && orig_count != parameters.Count)
throw new InternalErrorException ("parameter information mismatch");
int offset = Parent == null ? 0 : Parent.AssignableSlots;
for (int i = 0; i < orig_count; ++i) {
Parameter.Modifier mod = parameters.FixedParameters [i].ModFlags;
if ((mod & Parameter.Modifier.OUT) != Parameter.Modifier.OUT)
continue;
VariableInfo vi = new VariableInfo (ip, i, offset);
parameter_info [i].VariableInfo = vi;
offset += vi.Length;
}
ResolveMeta (ec, offset);
top_level_branching = ec.StartFlowBranching (this);
return Report.Errors == errors;
}
示例4: Resolve
public override bool Resolve (EmitContext ec)
{
ec.StartFlowBranching (iterator);
bool ok = original_block.Resolve (ec);
ec.EndFlowBranching ();
return ok;
}