Changeset 9248


Ignore:
Timestamp:
05/24/05 19:16:34 (16 years ago)
Author:
piso
Message:

Work in progress (tested).

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

Legend:

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

    r9225 r9248  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Primitives.java,v 1.792 2005-05-21 15:51:33 piso Exp $
     5 * $Id: Primitives.java,v 1.793 2005-05-24 19:14:14 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2222package org.armedbear.lisp;
    2323
    24 import java.io.File;
    2524import java.math.BigInteger;
    2625import java.util.ArrayList;
     
    38773876            return inSynonymOf(arg).readLine(true, NIL);
    38783877        }
     3878        public LispObject execute(LispObject first, LispObject second)
     3879            throws ConditionThrowable
     3880        {
     3881            return inSynonymOf(first).readLine(second != NIL, NIL);
     3882        }
    38793883        public LispObject execute(LispObject first, LispObject second,
    38803884                                  LispObject third)
     
    49284932        public LispObject execute(LispObject arg) throws ConditionThrowable
    49294933        {
    4930             try {
    4931                 return new Symbol((AbstractString)arg);
    4932             }
    4933             catch (ClassCastException e) {
    4934                 return signal(new TypeError(arg, Symbol.STRING));
    4935             }
     4934            if (arg instanceof SimpleString)
     4935                return new Symbol((SimpleString)arg);
     4936            // Not a simple string.
     4937            if (arg instanceof AbstractString)
     4938                return new Symbol(arg.getStringValue());
     4939            return signal(new TypeError(arg, Symbol.STRING));
    49364940        }
    49374941    };
  • trunk/j/src/org/armedbear/lisp/compile-system.lisp

    r9229 r9248  
    22;;;
    33;;; Copyright (C) 2004-2005 Peter Graves
    4 ;;; $Id: compile-system.lisp,v 1.49 2005-05-22 17:28:58 piso Exp $
     4;;; $Id: compile-system.lisp,v 1.50 2005-05-24 19:10:29 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    3838          (line-number 1))
    3939      (loop
    40         (let ((text (read-line in nil in))
    41               position)
    42           (cond ((eq text in)
    43                  (return))
    44                 ((setf position (search "###" text))
     40        (let ((text (read-line in nil)))
     41          (when (null text)
     42            (return))
     43          (let ((position (search "###" text)))
     44            (when position
    4545                 ;; The following code is based on the assumption that all the
    4646                 ;; Java builtins are accessible in the SYSTEM package (which
     
    4949                        (symbol (find-symbol name system-package)))
    5050                   (when symbol
    51                      ;; Force the symbol's package prefix to be written out.
    52                      (let ((*package* +keyword-package+))
    53                        (format out "~S ~S ~S~%" symbol file line-number))))))
     51                     ;; Force the symbol's package prefix to be written out
     52                     ;; with "::" instead of ":" so there won't be a reader
     53                     ;; error if a symbol that's external now is no longer
     54                     ;; external when we read the tags file.
     55                     (%format out "~A::~A ~S ~S~%"
     56                              (package-name (symbol-package symbol))
     57                              name
     58                              file line-number)))))
    5459          (incf line-number))))))
    5560
     
    218223                                  "revappend.lisp"
    219224                                  "rotatef.lisp"
    220                                   ;;"rt.lisp"
     225                                  "rt.lisp"
    221226                                  ;;"run-benchmarks.lisp"
    222227                                  "run-shell-command.lisp"
  • trunk/j/src/org/armedbear/lisp/loop.lisp

    r9022 r9248  
    22;;;
    33;;; Copyright (C) 2004-2005 Peter Graves
    4 ;;; $Id: loop.lisp,v 1.12 2005-04-30 20:01:07 piso Exp $
     4;;; $Id: loop.lisp,v 1.13 2005-05-24 19:10:02 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    296296(defun loop-lookup-keyword (loop-token table)
    297297  (and (symbolp loop-token)
    298        (values (gethash (symbol-name loop-token) table))))
     298       (values (gethash (symbol-name (the symbol loop-token)) table))))
    299299
    300300(defmacro loop-store-table-data (symbol table datum)
  • trunk/j/src/org/armedbear/lisp/parse-lambda-list.lisp

    r8210 r9248  
    11;;; parse-lambda-list.lisp
    22;;;
    3 ;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: parse-lambda-list.lisp,v 1.2 2004-12-03 18:27:01 piso Exp $
     3;;; Copyright (C) 2003-2005 Peter Graves
     4;;; $Id: parse-lambda-list.lisp,v 1.3 2005-05-24 19:15:58 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    6363      (dolist (arg list)
    6464        (if (and (symbolp arg)
    65                  (let ((name (symbol-name arg)))
     65                 (let ((name (symbol-name (the symbol arg))))
    6666                   (and (plusp (length name))
    6767                        (char= (char name 0) #\&))))
  • trunk/j/src/org/armedbear/lisp/precompiler.lisp

    r9204 r9248  
    22;;;
    33;;; Copyright (C) 2003-2005 Peter Graves
    4 ;;; $Id: precompiler.lisp,v 1.110 2005-05-19 15:07:17 piso Exp $
     4;;; $Id: precompiler.lisp,v 1.111 2005-05-24 19:16:34 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    762762    (precompile1 form)))
    763763
    764 (defun install-handler (fun &optional handler)
     764(defun install-handler (symbol &optional handler)
     765  (declare (type symbol symbol))
    765766  (let ((handler (or handler
    766                      (find-symbol (sys::%format nil "PRECOMPILE-~A" (symbol-name fun))
     767                     (find-symbol (sys::%format nil "PRECOMPILE-~A" (symbol-name symbol))
    767768                                  'precompiler))))
    768769    (unless (and handler (fboundp handler))
    769       (error "No handler for ~S." fun))
    770     (setf (get fun 'precompile-handler) handler)))
     770      (error "No handler for ~S." symbol))
     771    (setf (get symbol 'precompile-handler) handler)))
    771772
    772773(defun install-handlers ()
Note: See TracChangeset for help on using the changeset viewer.