public int AddResumePoint(ResumableStatement stmt) { if (resume_points == null) resume_points = new List<ResumableStatement> (); resume_points.Add (stmt); return resume_points.Count; }
/* public override bool CheckRethrow (Location loc) { return CurrentUsageVector.Next != null || Parent.CheckRethrow (loc); } */ public override bool AddResumePoint (ResumableStatement stmt, out int pc) { pc = async_init.AddResumePoint (stmt); return true; }
public override bool AddResumePoint (ResumableStatement stmt, out int pc) { int errors = Report.Errors; Parent.AddResumePoint (this.stmt, out pc); if (errors == Report.Errors) { if (finally_vector == null) this.stmt.AddResumePoint (stmt, pc); else { if (stmt is AwaitStatement) { Report.Error (1984, stmt.loc, "The `await' operator cannot be used in the body of a finally clause"); } else { Report.Error (1625, stmt.loc, "Cannot yield in the body of a finally clause"); } } } return true; }
public override bool AddResumePoint (ResumableStatement stmt, out int pc) { throw new InternalErrorException ("A yield in a non-iterator block"); }
public override bool AddResumePoint (ResumableStatement stmt, out int pc) { int errors = Report.Errors; Parent.AddResumePoint (tc.IsTryCatchFinally ? stmt : tc, out pc); if (errors == Report.Errors) { if (stmt is AwaitStatement) { if (CurrentUsageVector.Next != null) { Report.Error (1985, stmt.loc, "The `await' operator cannot be used in the body of a catch clause"); } else { this.tc.AddResumePoint (stmt, pc); } } else { if (CurrentUsageVector.Next == null) Report.Error (1626, stmt.loc, "Cannot yield a value in the body of a try block with a catch clause"); else Report.Error (1631, stmt.loc, "Cannot yield a value in the body of a catch clause"); } } return true; }
public override bool AddResumePoint (ResumableStatement stmt, out int pc) { pc = iterator.AddResumePoint (stmt); return false; }
public virtual bool AddResumePoint (ResumableStatement stmt, out int pc) { return Parent.AddResumePoint (stmt, out pc); }
public override bool AddResumePoint (ResumableStatement stmt, Location loc, out int pc) { int errors = Report.Errors; Parent.AddResumePoint (this.stmt, loc, out pc); if (errors == Report.Errors) { if (finally_vector == null) this.stmt.AddResumePoint (stmt, pc); else Report.Error (1625, loc, "Cannot yield in the body of a finally clause"); } return true; }
public override bool AddResumePoint (ResumableStatement stmt, Location loc, out int pc) { int errors = Report.Errors; Parent.AddResumePoint (stmt, loc, out pc); if (errors == Report.Errors) { if (CurrentUsageVector.Next == null) Report.Error (1626, loc, "Cannot yield a value in the body of a try block with a catch clause"); else Report.Error (1631, loc, "Cannot yield a value in the body of a catch clause"); } return true; }
public void AddResumePoint (ResumableStatement stmt, int pc) { if (resume_points == null) { resume_points = new List<ResumableStatement> (); first_resume_pc = pc; } if (pc != first_resume_pc + resume_points.Count) throw new InternalErrorException ("missed an intervening AddResumePoint?"); resume_points.Add (stmt); }