Exemplo n.º 1
0
        public ExprThisPointer CreateThis(LocalVariableSymbol pLocal, bool fImplicit)
        {
            Debug.Assert(pLocal == null || pLocal.isThis);

            CType type = null;

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

            EXPRFLAG flags = EXPRFLAG.EXF_CANTBENULL;

            if (fImplicit)
            {
                flags |= EXPRFLAG.EXF_IMPLICITTHIS;
            }
            if (type != null && type.isStructType())
            {
                flags |= EXPRFLAG.EXF_LVALUE;
            }

            ExprThisPointer rval = new ExprThisPointer();

            rval.Kind  = ExpressionKind.EK_THISPOINTER;
            rval.Type  = type;
            rval.Flags = flags;
            rval.Local = pLocal;
            Debug.Assert(rval != null);
            return(rval);
        }
Exemplo n.º 2
0
        public ExprThisPointer CreateThis(LocalVariableSymbol pLocal, bool fImplicit)
        {
            Debug.Assert(pLocal == null || pLocal.isThis);

            EXPRFLAG flags = EXPRFLAG.EXF_CANTBENULL;

            if (fImplicit)
            {
                flags |= EXPRFLAG.EXF_IMPLICITTHIS;
            }
            if (pLocal != null && pLocal.GetType().isStructType())
            {
                flags |= EXPRFLAG.EXF_LVALUE;
            }

            ExprThisPointer rval = new ExprThisPointer();

            rval.Flags = flags;
            rval.Local = pLocal;
            return(rval);
        }
Exemplo n.º 3
0
 protected virtual Expr VisitTHISPOINTER(ExprThisPointer pExpr)
 {
     return(VisitLOCAL(pExpr));
 }