protected LoopStatement(ToBoolean condition, Statement body) { Body = body; Condition = condition; SourceOffset = body.SourceOffset; Use(Condition); Use(Body); }
public ToBoolean MakeToBoolean(Expression expression) { var n = expression as ToBoolean; if (n == null) { n = new ToBoolean(MakeGuardedCast(expression)); } return(n); }
public ForStatement MakeForStatement(Scope scope, IStatement initialization, IExpression condition, IExpression increment, IStatement body) { scope.HasLoop = true; ToBoolean booleanCondition = null; if (condition != null) { booleanCondition = MakeToBoolean((Expression)condition); } var n = new ForStatement((Statement)initialization, booleanCondition, (Expression)increment, (Statement)body); return(n); }
public ForEachInStatement( Statement initialization, ToObject expression, Statement body, Statement iteratorInitialization, ToBoolean iteratorCondition, BlockStatement extendedBody ) : base(iteratorCondition, extendedBody) { Initialization = initialization; Expression = expression; OriginalBody = body; IteratorInitialization = iteratorInitialization; ExtendedBody = extendedBody; //Use(Expression); //We don't need this since IteratorInitialization must be already using it! Debug.Assert(Expression.HasUser, "{0} must already have a user", Expression); }
public override void Visit(ToBoolean node) { Visit(node, Types.Operations.Convert.ToBoolean); }
public override void Visit(ToBoolean node) { Visit((ConversionExpression)node); }
public override void Visit(ToBoolean node) { base.Visit(node); node.ValueType = GetType(node); }
internal static mdr.ValueTypes GetType(ToBoolean expression) { return Types.Operations.Convert.ToBoolean.ReturnType(expression.ValueType); }
public ToBoolean MakeToBoolean(Expression expression) { var n = expression as ToBoolean; if (n == null) { n = new ToBoolean(MakeGuardedCast(expression)); } return n; }
public abstract void Visit(ToBoolean node);
public override void Visit(ToBoolean node) { PushLocation(node); VisitNode(node.Expression); Call(Types.Operations.Stack.ToBoolean, 1, 1); PopLocation(); }
public override void Visit(ToBoolean node) { AssignToImplicitReturn(node); }