示例#1
0
 internal override IBoundReference BindPlace(ILBuilder il, BoundAccess access, TypeRefMask thint)
 {
     return(new BoundThisPlace(_routine, access));
 }
示例#2
0
 internal override IBoundReference BindPlace(ILBuilder il, BoundAccess access, TypeRefMask thint)
 {
     return(new BoundIndirectVariablePlace(_nameExpr, access));
 }
示例#3
0
 /// <summary>
 /// Gets <see cref="IBoundReference"/> providing load and store operations.
 /// </summary>
 internal abstract IBoundReference BindPlace(ILBuilder il, BoundAccess access, TypeRefMask thint);
示例#4
0
 public static T WithAccess <T>(this T expr, BoundAccess access) where T : BoundExpression
 {
     expr.Access = access;
     return(expr);
 }
示例#5
0
 internal override IBoundReference BindPlace(ILBuilder il, BoundAccess access, TypeRefMask thint)
 {
     return(new BoundLocalPlace(_place, access, thint));
 }
示例#6
0
        internal override IBoundReference BindPlace(ILBuilder il, BoundAccess access, TypeRefMask thint)
        {
            Debug.Assert(_name.IsAutoGlobal);

            return(new BoundSuperglobalPlace(_name, access));
        }
示例#7
0
 internal override IBoundReference BindPlace(ILBuilder il, BoundAccess access, TypeRefMask thint)
 {
     return(new BoundLocalPlace(Place(il), access, _routine.TypeRefContext.GetThisTypeMask()));
 }
示例#8
0
        BoundExpression BindExpressionCore(AST.Expression expr, BoundAccess access)
        {
            Debug.Assert(expr != null);

            if (expr is AST.Literal)
            {
                return(BindLiteral((AST.Literal)expr).WithAccess(access));
            }
            if (expr is AST.VarLikeConstructUse)
            {
                return(BindVarLikeConstructUse((AST.VarLikeConstructUse)expr, access));
            }
            if (expr is AST.BinaryEx)
            {
                return(BindBinaryEx((AST.BinaryEx)expr).WithAccess(access));
            }
            if (expr is AST.AssignEx)
            {
                return(BindAssignEx((AST.AssignEx)expr, access));
            }
            if (expr is AST.UnaryEx)
            {
                return(BindUnaryEx((AST.UnaryEx)expr, access));
            }
            if (expr is AST.IncDecEx)
            {
                return(BindIncDec((AST.IncDecEx)expr).WithAccess(access));
            }
            if (expr is AST.ConditionalEx)
            {
                return(BindConditionalEx((AST.ConditionalEx)expr).WithAccess(access));
            }
            if (expr is AST.ConcatEx)
            {
                return(BindConcatEx((AST.ConcatEx)expr).WithAccess(access));
            }
            if (expr is AST.IncludingEx)
            {
                return(BindIncludeEx((AST.IncludingEx)expr).WithAccess(access));
            }
            if (expr is AST.InstanceOfEx)
            {
                return(BindInstanceOfEx((AST.InstanceOfEx)expr).WithAccess(access));
            }
            if (expr is AST.PseudoConstUse)
            {
                return(BindPseudoConst((AST.PseudoConstUse)expr).WithAccess(access));
            }
            if (expr is AST.IssetEx)
            {
                return(BindIsSet((AST.IssetEx)expr).WithAccess(access));
            }
            if (expr is AST.ExitEx)
            {
                return(BindExitEx((AST.ExitEx)expr).WithAccess(access));
            }
            if (expr is AST.ConstantUse)
            {
                return(BindConstUse((AST.ConstantUse)expr).WithAccess(access));
            }
            if (expr is AST.ListEx)
            {
                return(BindListEx((AST.ListEx)expr).WithAccess(access));
            }

            throw new NotImplementedException(expr.GetType().FullName);
        }