Beispiel #1
0
        public ExprLocal CreateLocal(EXPRFLAG nFlags, LocalVariableSymbol pLocal)
        {
            Debug.Assert(0 == (nFlags & ~(EXPRFLAG.EXF_MASK_ANY)));
            ExprLocal rval = new ExprLocal();

            rval.Flags = nFlags;
            rval.Local = pLocal;
            return(rval);
        }
Beispiel #2
0
        public ExprHoistedLocalExpr CreateHoistedLocalInExpression(ExprLocal localToHoist)
        {
            Debug.Assert(localToHoist != null);
            ExprHoistedLocalExpr rval = new ExprHoistedLocalExpr();

            rval.Kind  = ExpressionKind.EK_HOISTEDLOCALEXPR;
            rval.Type  = GetTypes().GetOptPredefAgg(PredefinedType.PT_EXPRESSION).getThisType();
            rval.Flags = 0;
            return(rval);
        }
Beispiel #3
0
        public ExprLocal CreateLocal(EXPRFLAG nFlags, LocalVariableSymbol pLocal)
        {
            Debug.Assert(0 == (nFlags & ~(EXPRFLAG.EXF_MASK_ANY)));

            CType type = null;

            if (pLocal != null)
            {
                type = pLocal.GetType();
            }

            ExprLocal rval = new ExprLocal();

            rval.Kind  = ExpressionKind.EK_LOCAL;
            rval.Type  = type;
            rval.Flags = nFlags;
            rval.Local = pLocal;
            Debug.Assert(rval != null);
            return(rval);
        }
Beispiel #4
0
 protected override Expr VisitLOCAL(ExprLocal local)
 {
     Debug.Assert(local != null);
     Debug.Assert(local.Local.wrap != null);
     return(local.Local.wrap);
 }
Beispiel #5
0
 protected virtual Expr VisitLOCAL(ExprLocal pExpr)
 {
     return(VisitEXPR(pExpr));
 }
Beispiel #6
0
 public ExprHoistedLocalExpr CreateHoistedLocalInExpression(ExprLocal localToHoist)
 {
     Debug.Assert(localToHoist != null);
     return(new ExprHoistedLocalExpr(GetTypes().GetOptPredefAgg(PredefinedType.PT_EXPRESSION).getThisType()));
 }