Changeset 4949


Ignore:
Timestamp:
12/03/03 01:15:25 (17 years ago)
Author:
piso
Message:

*COMPILE-PRINT*

File:
1 edited

Legend:

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

    r4948 r4949  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: jvm.lisp,v 1.47 2003-12-03 00:53:42 piso Exp $
     4;;; $Id: jvm.lisp,v 1.48 2003-12-03 01:15:25 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    21112111      (cond
    21122112       ((special-operator-p op)
    2113         (error "COMPILE-FORM unhandled special operator ~S" op))
     2113        (error "COMPILE-FORM unsupported special operator ~S" op))
    21142114       (t ; Function call.
    21152115        (compile-function-call op args for-effect)))))
     
    22912291      (princ #\space s))))
    22922292
     2293(defvar *compile-print* t)
     2294
    22932295(defun jvm-compile (name &optional definition)
    22942296  (let ((prefix (load-verbose-prefix)))
    2295     (if name
    2296         (progn
    2297           (format t "~A Compiling ~S ...~%" prefix name)
    2298           (when (and (fboundp name) (typep (fdefinition name) 'generic-function))
    2299             (format t "~A Unable to compile generic function ~S~%" prefix name)
    2300             (return-from jvm-compile (values name nil t)))
    2301           (unless (symbolp name)
    2302             (format t "~A Unable to compile ~S~%" prefix name)
    2303             (return-from jvm-compile (values name nil t))))
    2304         (format t "Compiling top-level form ...~%"))
     2297    (when *compile-print*
     2298      (if name
     2299          (progn
     2300            (format t "~A Compiling ~S ...~%" prefix name)
     2301            (when (and (fboundp name) (typep (fdefinition name) 'generic-function))
     2302              (format t "~A Unable to compile generic function ~S~%" prefix name)
     2303              (return-from jvm-compile (values name nil t)))
     2304            (unless (symbolp name)
     2305              (format t "~A Unable to compile ~S~%" prefix name)
     2306              (return-from jvm-compile (values name nil t))))
     2307          (format t "~A Compiling top-level form ...~%" prefix)))
    23052308    (unless definition
    23062309      (resolve name)
    23072310      (setf definition (fdefinition name))
    23082311      (when (compiled-function-p definition)
    2309         (when name
     2312        (when (and *compile-print* name)
    23102313          (format t "~A Already compiled ~S~%" prefix name))
    23112314        (return-from jvm-compile (values name nil nil))))
     
    23232326                (setf (fdefinition name) (sys::make-macro compiled-definition))
    23242327                (setf (fdefinition name) compiled-definition)))
    2325           (if name
    2326               (format t "~A Compiled ~S~%" prefix name)
    2327               (format t "Compiled top-level form~%"))
     2328          (when *compile-print*
     2329            (if name
     2330                (format t "~A Compiled ~S~%" prefix name)
     2331                (format t "~A Compiled top-level form~%" prefix)))
    23282332          (values (or name compiled-definition) nil nil))
    23292333      (error (c)
    23302334             (format t "Error: ~S~%" c)
    2331              (when name (format t "~A Unable to compile ~S~%" prefix name))
     2335             (when name
     2336               (format t "~A Unable to compile ~S~%" prefix name))
    23322337             (values (or name (sys::coerce-to-function definition)) nil t)))))
    23332338
Note: See TracChangeset for help on using the changeset viewer.