本文整理汇总了C#中Mono.CSharp.FlowAnalysisContext类的典型用法代码示例。如果您正苦于以下问题:C# FlowAnalysisContext类的具体用法?C# FlowAnalysisContext怎么用?C# FlowAnalysisContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FlowAnalysisContext类属于Mono.CSharp命名空间,在下文中一共展示了FlowAnalysisContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc)
{
source.FlowAnalysis (fc);
((FieldExpr) target).SetFieldAssigned (fc);
}
示例2: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc)
{
base.FlowAnalysis (fc);
method_group.FlowAnalysis (fc);
if (conditional_access_receiver)
fc.ConditionalAccessEnd ();
}
示例3: FlowAnalysis
public void FlowAnalysis (FlowAnalysisContext fc)
{
foreach (var arg in args)
arg.FlowAnalysis (fc);
}
示例4: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc)
{
invoke.FlowAnalysis (fc);
}
示例5: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc)
{
source.FlowAnalysis (fc);
if (target is ArrayAccess || target is IndexerExpr || target is PropertyExpr)
target.FlowAnalysis (fc);
}
示例6: FlowAnalysis
public void FlowAnalysis (FlowAnalysisContext fc)
{
bool has_out = false;
foreach (var arg in args) {
if (arg.ArgType == Argument.AType.Out) {
has_out = true;
continue;
}
arg.FlowAnalysis (fc);
}
if (!has_out)
return;
foreach (var arg in args) {
if (arg.ArgType != Argument.AType.Out)
continue;
arg.FlowAnalysis (fc);
}
}
示例7: IsFullyInitialized
// <summary>
// A struct's constructor must always assign all fields.
// This method checks whether it actually does so.
// </summary>
public bool IsFullyInitialized (FlowAnalysisContext fc, VariableInfo vi, Location loc)
{
if (struct_info == null)
return true;
bool ok = true;
for (int i = 0; i < struct_info.Count; i++) {
var field = struct_info.Fields[i];
if (!fc.IsStructFieldDefinitelyAssigned (vi, field.Name)) {
var bf = field.MemberDefinition as Property.BackingFieldDeclaration;
if (bf != null) {
if (bf.Initializer != null)
continue;
fc.Report.Error (843, loc,
"An automatically implemented property `{0}' must be fully assigned before control leaves the constructor. Consider calling the default struct contructor from a constructor initializer",
field.GetSignatureForError ());
ok = false;
continue;
}
fc.Report.Error (171, loc,
"Field `{0}' must be fully assigned before control leaves the constructor",
field.GetSignatureForError ());
ok = false;
}
}
return ok;
}
示例8: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc) {
base.FlowAnalysis (fc);
method_group.FlowAnalysis (fc);
}
示例9: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc)
{
source.FlowAnalysis (fc);
if (target is ArrayAccess || target is IndexerExpr) {
target.FlowAnalysis (fc);
return;
}
var pe = target as PropertyExpr;
if (pe != null && !pe.IsAutoPropertyAccess)
target.FlowAnalysis (fc);
}
示例10: FlowAnalysis
public virtual void FlowAnalysis (FlowAnalysisContext fc, List<MovableArgument> movable = null)
{
bool has_out = false;
foreach (var arg in args) {
if (arg.ArgType == Argument.AType.Out) {
has_out = true;
continue;
}
if (movable == null) {
arg.FlowAnalysis (fc);
continue;
}
var ma = arg as MovableArgument;
if (ma != null && !movable.Contains (ma))
arg.FlowAnalysis (fc);
}
if (!has_out)
return;
foreach (var arg in args) {
if (arg.ArgType != Argument.AType.Out)
continue;
arg.FlowAnalysis (fc);
}
}
示例11: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc)
{
// We are reachable, mark block body reachable too
MarkReachable (new Reachability ());
CheckReachableExit (fc.Report);
var das = fc.BranchDefiniteAssignment ();
var prev_pb = fc.ParametersBlock;
fc.ParametersBlock = Block;
var da_ontrue = fc.DefiniteAssignmentOnTrue;
var da_onfalse = fc.DefiniteAssignmentOnFalse;
block.FlowAnalysis (fc);
fc.ParametersBlock = prev_pb;
fc.DefiniteAssignment = das;
fc.DefiniteAssignmentOnTrue = da_ontrue;
fc.DefiniteAssignmentOnFalse = da_onfalse;
}
示例12: DoFlowAnalysis
protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
{
return false;
}
示例13: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc)
{
side_effect.FlowAnalysis (fc);
}
示例14: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc)
{
if (argument_list != null)
argument_list.FlowAnalysis (fc);
}
示例15: FlowAnalysis
public override void FlowAnalysis (FlowAnalysisContext fc)
{
var da = conditional_access_receiver ? fc.BranchDefiniteAssignment () : null;
base.FlowAnalysis (fc);
method_group.FlowAnalysis (fc);
if (conditional_access_receiver)
fc.DefiniteAssignment = da;
}