Changeset 5017


Ignore:
Timestamp:
12/08/03 03:02:57 (17 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

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

    r4994 r5017  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: jvm.lisp,v 1.55 2003-12-06 16:36:06 piso Exp $
     4;;; $Id: jvm.lisp,v 1.56 2003-12-08 03:02:57 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2121
    2222(export '(jvm-compile jvm-compile-package))
     23
     24(import 'sys::%format)
    2325
    2426(shadow 'method)
     
    23952397      (if name
    23962398          (progn
    2397             (format t "~A Compiling ~S ...~%" prefix name)
     2399            (%format t "~A Compiling ~S ...~%" prefix name)
    23982400            (when (and (fboundp name) (typep (fdefinition name) 'generic-function))
    2399               (format t "~A Unable to compile generic function ~S~%" prefix name)
     2401              (%format t "~A Unable to compile generic function ~S~%" prefix name)
    24002402              (return-from jvm-compile (values name nil t)))
    24012403            (unless (symbolp name)
    2402               (format t "~A Unable to compile ~S~%" prefix name)
     2404              (%format t "~A Unable to compile ~S~%" prefix name)
    24032405              (return-from jvm-compile (values name nil t))))
    2404           (format t "~A Compiling top-level form ...~%" prefix)))
     2406          (%format t "~A Compiling top-level form ...~%" prefix)))
    24052407    (unless definition
    24062408      (resolve name)
     
    24082410      (when (compiled-function-p definition)
    24092411        (when (and *compile-print* name)
    2410           (format t "~A Already compiled ~S~%" prefix name))
     2412          (%format t "~A Already compiled ~S~%" prefix name))
    24112413        (return-from jvm-compile (values name nil nil))))
    24122414    (handler-case
     
    24252427          (when *compile-print*
    24262428            (if name
    2427                 (format t "~A Compiled ~S~%" prefix name)
    2428                 (format t "~A Compiled top-level form~%" prefix)))
     2429                (%format t "~A Compiled ~S~%" prefix name)
     2430                (%format t "~A Compiled top-level form~%" prefix)))
    24292431          (values (or name compiled-definition) nil nil))
    24302432      (error (c)
    2431              (format t "Error: ~S~%" c)
     2433             (%format t "Error: ~S~%" c)
    24322434             (when name
    2433                (format t "~A Unable to compile ~S~%" prefix name))
     2435               (%format t "~A Unable to compile ~S~%" prefix name))
    24342436             (values (or name (sys::coerce-to-function definition)) nil t)))))
    24352437
     
    24942496
    24952497(defun compile (name &optional definition)
    2496   (if (consp name)
    2497       (return-from compile (values name nil nil)))
    2498   (if (and name (fboundp name) (typep (symbol-function name) 'generic-function))
    2499       (return-from compile (values name nil nil)))
     2498  (when (consp name)
     2499    (return-from compile (values name nil nil)))
     2500  (when (and name (fboundp name) (typep (symbol-function name) 'generic-function))
     2501    (return-from compile (values name nil nil)))
    25002502  (unless definition
    25012503    (setq definition (or (and (symbolp name) (macro-function name))
    25022504                         (fdefinition name))))
     2505  (when (compiled-function-p definition)
     2506    (return-from compile (values name nil nil)))
    25032507  (let ((expr (get-lambda-to-compile definition))
    25042508        (speed nil))
Note: See TracChangeset for help on using the changeset viewer.