Beispiel #1
0
			public ReturnOrigin (SavedOrigin next, UsageVector vector, ExitStatement stmt)
				: base (next, vector)
			{
				Stmt = stmt;
			}
Beispiel #2
0
		public override bool AddReturnOrigin (UsageVector vector, ExitStatement exit_stmt)
		{
			Parent.AddReturnOrigin (vector, exit_stmt);
			return true;
		}
Beispiel #3
0
		// returns true if we crossed an unwind-protected region (try/catch/finally, lock, using, ...)
		public virtual bool AddReturnOrigin (UsageVector vector, ExitStatement stmt)
		{
			return Parent.AddReturnOrigin (vector, stmt);
		}
Beispiel #4
0
		public override bool AddReturnOrigin (UsageVector vector, ExitStatement stmt)
		{
			vector = vector.Clone ();
			vector.Location = stmt.loc;
			vector.Next = return_origins;
			return_origins = vector;
			return false;
		}
Beispiel #5
0
		public override bool AddReturnOrigin (UsageVector vector, ExitStatement exit_stmt)
		{
			if (finally_vector != null) {
				int errors = Report.Errors;
				Parent.AddReturnOrigin (vector, exit_stmt);
				if (errors == Report.Errors)
					exit_stmt.Error_FinallyClause (Report);
			} else {
				saved_origins = new ReturnOrigin (saved_origins, vector, exit_stmt);
			}

			// sets ec.NeedReturnLabel()
			stmt.SomeCodeFollows ();
			return true;
		}