/////////////////////////////////////////////////////////////////////////////////

        private ExpressionEXPR GenerateNew(EXPRCALL pExpr)
        {
            EXPRLIST list = pExpr.asCALL().GetOptionalArguments().asLIST();

            var constructor = GetConstructorInfoFromExpr(list.GetOptionalElement().asMETHODINFO());
            var arguments = GetArgumentsFromArrayInit(list.GetOptionalNextListNode().asARRINIT());
            return new ExpressionEXPR(Expression.New(constructor, arguments));
        }
        /////////////////////////////////////////////////////////////////////////////////

        private ExpressionEXPR GenerateInvoke(EXPRCALL pExpr)
        {
            EXPRLIST list = pExpr.asCALL().GetOptionalArguments().asLIST();

            return new ExpressionEXPR(Expression.Invoke(
                GetExpression(list.GetOptionalElement()),
                GetArgumentsFromArrayInit(list.GetOptionalNextListNode().asARRINIT())));
        }
        /////////////////////////////////////////////////////////////////////////////////

        private ExpressionEXPR GenerateProperty(EXPRCALL pExpr)
        {
            EXPRLIST list = pExpr.asCALL().GetOptionalArguments().asLIST();

            EXPR instance = list.GetOptionalElement();
            EXPRPropertyInfo propinfo = list.GetOptionalNextListNode().isLIST() ?
                list.GetOptionalNextListNode().asLIST().GetOptionalElement().asPropertyInfo() :
                list.GetOptionalNextListNode().asPropertyInfo();
            EXPRARRINIT arguments = list.GetOptionalNextListNode().isLIST() ?
                list.GetOptionalNextListNode().asLIST().GetOptionalNextListNode().asARRINIT() : null;

            PropertyInfo p = GetPropertyInfoFromExpr(propinfo);

            if (p == null)
            {
                Debug.Assert(false, "How did we get a prop that doesn't have a propinfo?");
                throw Error.InternalCompilerError();
            }

            if (arguments == null)
            {
                return new ExpressionEXPR(Expression.Property(GetExpression(instance), p));
            }
            return new ExpressionEXPR(Expression.Property(GetExpression(instance), p, GetArgumentsFromArrayInit(arguments)));
        }
        /////////////////////////////////////////////////////////////////////////////////

        private ExpressionEXPR GenerateField(EXPRCALL pExpr)
        {
            EXPRLIST list = pExpr.asCALL().GetOptionalArguments().asLIST();
            Type t = list.GetOptionalNextListNode().asFIELDINFO().FieldType().AssociatedSystemType;
            FieldInfo f = list.GetOptionalNextListNode().asFIELDINFO().Field().AssociatedFieldInfo;

            // This is to ensure that for embedded nopia types, we have the
            // appropriate local type from the member itself; this is possible
            // because nopia types are not generic or nested.
            if (!t.GetTypeInfo().IsGenericType && !t.GetTypeInfo().IsNested)
            {
                t = f.DeclaringType;
            }

            // Now find the generic'ed one if we're generic.
            if (t.GetTypeInfo().IsGenericType)
            {
                f = t.GetField(f.Name, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
            }

            return new ExpressionEXPR(Expression.Field(GetExpression(list.GetOptionalElement()), f));
        }
        /////////////////////////////////////////////////////////////////////////////////

        private ExpressionEXPR GenerateConvert(EXPRCALL pExpr)
        {
            PREDEFMETH pm = pExpr.PredefinedMethod;
            Expression e;
            Type t;

            if (pm == PREDEFMETH.PM_EXPRESSION_CONVERT_USER_DEFINED ||
                pm == PREDEFMETH.PM_EXPRESSION_CONVERTCHECKED_USER_DEFINED)
            {
                // If we have a user defined conversion, then we'll have the object
                // as the first element, and another list as a second element. This list
                // contains a TYPEOF as the first element, and the METHODINFO for the call
                // as the second.

                EXPRLIST list = pExpr.asCALL().GetOptionalArguments().asLIST();
                EXPRLIST list2 = list.GetOptionalNextListNode().asLIST();
                e = GetExpression(list.GetOptionalElement());
                t = list2.GetOptionalElement().asTYPEOF().SourceType.type.AssociatedSystemType;

                if (e.Type.MakeByRefType() == t)
                {
                    // We're trying to convert from a type to its by ref type. Don't do that.
                    return new ExpressionEXPR(e);
                }
                Debug.Assert((pExpr.flags & EXPRFLAG.EXF_UNBOXRUNTIME) == 0);

                MethodInfo m = GetMethodInfoFromExpr(list2.GetOptionalNextListNode().asMETHODINFO());

                if (pm == PREDEFMETH.PM_EXPRESSION_CONVERT_USER_DEFINED)
                {
                    return new ExpressionEXPR(Expression.Convert(e, t, m));
                }
                return new ExpressionEXPR(Expression.ConvertChecked(e, t, m));
            }
            else
            {
                Debug.Assert(pm == PREDEFMETH.PM_EXPRESSION_CONVERT ||
                    pm == PREDEFMETH.PM_EXPRESSION_CONVERTCHECKED);

                // If we have a standard conversion, then we'll have some object as
                // the first list element (ie a WRAP or a CALL), and then a TYPEOF
                // as the second list element.
                EXPRLIST list = pExpr.asCALL().GetOptionalArguments().asLIST();

                e = GetExpression(list.GetOptionalElement());
                t = list.GetOptionalNextListNode().asTYPEOF().SourceType.type.AssociatedSystemType;

                if (e.Type.MakeByRefType() == t)
                {
                    // We're trying to convert from a type to its by ref type. Don't do that.
                    return new ExpressionEXPR(e);
                }

                if ((pExpr.flags & EXPRFLAG.EXF_UNBOXRUNTIME) != 0)
                {
                    // If we want to unbox this thing, return that instead of the convert.
                    return new ExpressionEXPR(Expression.Unbox(e, t));
                }

                if (pm == PREDEFMETH.PM_EXPRESSION_CONVERT)
                {
                    return new ExpressionEXPR(Expression.Convert(e, t));
                }
                return new ExpressionEXPR(Expression.ConvertChecked(e, t));
            }
        }