Package gnu.expr

Class QuoteExp

    • Field Detail

      • undefined_exp

        public static QuoteExp undefined_exp
      • abstractExp

        public static QuoteExp abstractExp
      • nativeExp

        public static QuoteExp nativeExp
      • voidExp

        public static QuoteExp voidExp
      • voidObjectExp

        public static QuoteExp voidObjectExp
        Same value as voidExp, but different type, to suppress diagnostics.
      • trueExp

        public static QuoteExp trueExp
      • falseExp

        public static QuoteExp falseExp
      • trueObjExp

        public static QuoteExp trueObjExp
      • falseObjExp

        public static QuoteExp falseObjExp
      • emptyExp

        public static QuoteExp emptyExp
      • isTrueTypeExp

        public static QuoteExp isTrueTypeExp
      • nullExp

        public static QuoteExp nullExp
      • classObjectExp

        public static final QuoteExp classObjectExp
    • Constructor Detail

      • QuoteExp

        public QuoteExp​(Object val)
      • QuoteExp

        public QuoteExp​(Object val,
                        Type type)
    • Method Detail

      • getValue

        public final Object getValue()
      • valueIfConstant

        public final Object valueIfConstant()
        Description copied from class: Expression
        Return value if it is constant, or null if non-constant or unknown.
        Overrides:
        valueIfConstant in class Expression
      • getRawType

        public final Type getRawType()
      • isExplicitlyTyped

        public boolean isExplicitlyTyped()
      • isSharedConstant

        public boolean isSharedConstant()
      • apply

        public void apply​(CallContext ctx)
        Description copied from class: Expression
        Evaluate the expression. This is named apply rather than eval so it is compatible with the full-tail-call calling convention, and we can stash an Expression in CallContext's proc field. FIXME - are we making use of this?
        Overrides:
        apply in class Expression
      • validateApply

        public Expression validateApply​(ApplyExp exp,
                                        InlineCalls visitor,
                                        Type required,
                                        Declaration decl)
        Description copied from class: Expression
        Apply inlining transformations on a given ApplyExp. Assumes the ApplyExp's function is this expression, or can be optimized to this expression.
        Overrides:
        validateApply in class Expression
        Parameters:
        exp - an application whose function expression can be simplified to this expression.
        visitor - the context for the current inlining pass
        decl - if non-null, a Declaration bound to this expression.
        Returns:
        an Expression equivalent to the passed-in exp.
      • side_effects

        public boolean side_effects()
        Description copied from class: Expression
        True if evaluating may have side-effects.
        Overrides:
        side_effects in class Expression
      • print

        public void print​(gnu.kawa.io.OutPort out)
        Specified by:
        print in class Expression