Skip to content
Snippets Groups Projects
Commit a6a5ef54 authored by ram's avatar ram
Browse files

Add (byte-compiling) function.

parent afc1e474
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/main.lisp,v 1.82 1993/05/11 14:05:27 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/main.lisp,v 1.83 1993/05/12 11:22:48 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -60,10 +60,12 @@ ...@@ -60,10 +60,12 @@
(defvar *byte-compile* :maybe) (defvar *byte-compile* :maybe)
;;; Bound by COMPILE-COMPONENT to T when byte-compiling, and NIL when ;;; Bound by COMPILE-COMPONENT to T when byte-compiling, and NIL when
;;; native compiling. ;;; native compiling. During IR1 conversion this can also be :MAYBE, in which
;;; case we must look at the policy, see (byte-compiling).
;;; ;;;
(defvar *byte-compiling*) (defvar *byte-compiling* :maybe)
(declaim (type (member t nil :maybe) *byte-compile* *byte-compiling*
*byte-compile-default*))
(defvar compiler-version "1.0") (defvar compiler-version "1.0")
(pushnew :python *features*) (pushnew :python *features*)
...@@ -344,11 +346,22 @@ ...@@ -344,11 +346,22 @@
(undefined-value)) (undefined-value))
;;; BYTE-COMPILING -- Interface
;;;
;;; Return our best guess for whether we will byte compile code currently
;;; being IR1 converted. Only a guess because the decision is made on a
;;; per-component basis.
;;;
(defun byte-compiling ()
(if (eq *byte-compiling* :maybe)
(policy nil (zerop speed) (<= debug 1))
*byte-compiling*))
;;; COMPILE-COMPONENT -- internal. ;;; COMPILE-COMPONENT -- internal.
;;; ;;;
(defun compile-component (component) (defun compile-component (component)
(let* ((*compile-component* component) (let* ((*compile-component* component)
(*byte-compiling*
(ecase *byte-compile* (ecase *byte-compile*
((t) t) ((t) t)
((nil) nil) ((nil) nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment