Changeset 11905


Ignore:
Timestamp:
05/20/09 21:12:49 (12 years ago)
Author:
ehuelsmann
Message:

Move COMPILE from jvm.lisp to compiler-pass2.lisp;
Move SET-FUNCTION-DEFINITION helper from compiler-pass2.lisp to precompiler.lisp;
Add a closing paren forgotten in r11904.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r11904 r11905  
    83518351            (terpri *error-output*))))))
    83528352
    8353 (defun set-function-definition (name new old)
    8354   (let ((*warn-on-redefinition* nil))
    8355     (sys::%set-lambda-name new name)
    8356     (sys:set-call-count new (sys:call-count old))
    8357     (sys::%set-arglist new (sys::arglist old))
    8358     (when (macro-function name)
    8359       (setf new (make-macro name new)))
    8360     (if (typep old 'standard-generic-function)
    8361         (mop:set-funcallable-instance-function old new)
    8362         (setf (fdefinition name) new))))
    83638353
    83648354(defun %jvm-compile (name definition expr env)
     
    83768366    (or name compiled-function)))
    83778367
     8368
     8369(defvar *file-compilation* nil)
     8370(defvar *pathnames-generator* #'make-temp-file)
     8371
     8372(defun compile (name &optional definition)
     8373  (jvm-compile name definition))
     8374
     8375(defmacro with-file-compilation (&body body)
     8376  `(let ((*file-compilation* t)
     8377         (*pathnames-generator* #'sys::next-classfile-name))
     8378     ,@body))
     8379
    83788380(defun jvm-compile (name &optional definition)
    83798381  (unless definition
     
    83878389        (*package* (or (and name (symbol-package name)) *package*))
    83888390        (expression definition)
     8391        (*file-compilation* nil)
     8392        (*visible-variables* nil)
     8393        (*pathnames-generator* #'make-temp-file)
     8394        (sys::*fasl-anonymous-package* (sys::%make-package))
    83898395        environment)
    83908396    (unless (and (consp definition) (eq (car definition) 'LAMBDA))
     
    84058411                              (or name "top-level form"))
    84068412                (return-from jvm-compile
    8407                   (precompiler::precompile name definition))))
     8413                  (precompiler::precompile name definition)))))
    84088414         (style-warning
    84098415          #'(lambda (c) (declare (ignore c))
  • trunk/abcl/src/org/armedbear/lisp/jvm.lisp

    r11899 r11905  
    482482                 (setf (variable-ignorable-p variable) t))))))))
    483483
    484 (defvar *file-compilation* nil)
    485 (defvar *pathnames-generator* #'make-temp-file)
    486 
    487 (defun compile (name &optional definition)
    488   (let ((*file-compilation* nil)
    489         (*pathnames-generator* #'make-temp-file)
    490         (sys::*fasl-anonymous-package* (sys::%make-package)))
    491     (jvm-compile name definition)))
    492 
    493 (defmacro with-file-compilation (&body body)
    494   `(let ((*file-compilation* t)
    495          (*pathnames-generator* #'sys::next-classfile-name))
    496      ,@body))
    497 
    498484(defun finalize-generic-functions ()
    499485  (dolist (sym '(make-instance
  • trunk/abcl/src/org/armedbear/lisp/precompiler.lisp

    r11903 r11905  
    10201020      (macroexpand-all `(progn ,@forms) env))))
    10211021
     1022(defun set-function-definition (name new old)
     1023  (let ((*warn-on-redefinition* nil))
     1024    (sys::%set-lambda-name new name)
     1025    (sys:set-call-count new (sys:call-count old))
     1026    (sys::%set-arglist new (sys::arglist old))
     1027    (when (macro-function name)
     1028      (setf new (make-macro name new)))
     1029    (if (typep old 'standard-generic-function)
     1030        (mop:set-funcallable-instance-function old new)
     1031        (setf (fdefinition name) new))))
     1032
    10221033(defun precompile (name &optional definition)
    10231034  (unless definition
Note: See TracChangeset for help on using the changeset viewer.