Package gnu.expr

Class ReferenceExp

    • Constructor Detail

      • ReferenceExp

        public ReferenceExp​(Object symbol)
      • ReferenceExp

        public ReferenceExp​(Declaration binding)
    • Method Detail

      • getDontDereference

        public final boolean getDontDereference()
      • setDontDereference

        public final void setDontDereference​(boolean setting)
      • isUnknown

        public final boolean isUnknown()
      • isProcedureName

        public final boolean isProcedureName()
        True if this identifier appears in "function call position". If so, it should be interpreted as a function name, which makes a difference for languages (like Common Lisp) that have two name spaces.
      • setProcedureName

        public final void setProcedureName​(boolean setting)
        Note if this identifier appears in "function call position".
      • 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
      • apply

        public void apply​(CallContext ctx)
                   throws Throwable
        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
        Throws:
        Throwable
      • 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.
      • print

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

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