Changeset 4531


Ignore:
Timestamp:
10/25/03 17:20:09 (19 years ago)
Author:
piso
Message:

toString()

Location:
trunk/j/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/CompiledFunction.java

    r3894 r4531  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: CompiledFunction.java,v 1.13 2003-09-19 14:44:10 piso Exp $
     5 * $Id: CompiledFunction.java,v 1.14 2003-10-25 17:20:09 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    7272    public String toString()
    7373    {
    74         StringBuffer sb = new StringBuffer("#<COMPILED-FUNCTION @ ");
    75         sb.append(Integer.toHexString(hashCode()));
    76         sb.append(">");
    77         return sb.toString();
     74        return unreadableString("COMPILED-FUNCTION");
    7875    }
    7976
     
    8178    // make-compiled-function name lambda-list body => object
    8279    private static final Primitive3 MAKE_COMPILED_FUNCTION =
    83         new Primitive3("make-compiled-function", PACKAGE_SYS, false) {
     80        new Primitive3("make-compiled-function", PACKAGE_SYS, false)
     81    {
    8482        public LispObject execute(LispObject first, LispObject second,
    8583                                  LispObject third)
     
    10098    // ### load-compiled-function
    10199    private static final Primitive1 LOAD_COMPILED_FUNCTION =
    102         new Primitive1("load-compiled-function", PACKAGE_SYS, false) {
     100        new Primitive1("load-compiled-function", PACKAGE_SYS, false)
     101    {
    103102        public LispObject execute(LispObject arg) throws ConditionThrowable
    104103        {
     
    131130
    132131    private static final Primitive1 VARLIST =
    133         new Primitive1("varlist", PACKAGE_SYS, false) {
     132        new Primitive1("varlist", PACKAGE_SYS, false)
     133    {
    134134        public LispObject execute(LispObject arg) throws ConditionThrowable {
    135135            if (arg instanceof CompiledFunction)
  • trunk/j/src/org/armedbear/lisp/Function.java

    r3929 r4531  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Function.java,v 1.24 2003-09-20 17:02:04 piso Exp $
     5 * $Id: Function.java,v 1.25 2003-10-25 17:17:18 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    165165    public String toString()
    166166    {
    167         StringBuffer sb = new StringBuffer("#<FUNCTION ");
    168         if (name != null)
     167        StringBuffer sb = new StringBuffer("FUNCTION");
     168        if (name != null) {
     169            sb.append(' ');
    169170            sb.append(name);
    170         else {
    171             sb.append("@ ");
    172             sb.append(Integer.toHexString(hashCode()));
    173171        }
    174         sb.append(">");
    175         return sb.toString();
     172        return unreadableString(sb.toString());
    176173    }
    177174
Note: See TracChangeset for help on using the changeset viewer.