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

When doing the labels hack in converting global inlines, respect :NOTINLINE

declarations.

Changed declaration processing to treat a FUNCTION declaration as an ordinary
variably type declaration (as proposed by X3J13).  The old semantics is still
obtained when the second arg to the declaration is a list (as it always would
be in the old usage.)

Added support for the CONSTANT-FUNCTION declaration.
 
parent 1b00c6e1
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/ir1tran.lisp,v 1.46 1991/05/16 16:39:09 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1tran.lisp,v 1.47 1991/05/23 17:51:20 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -496,7 +496,10 @@ ...@@ -496,7 +496,10 @@
(setf (gethash name *free-functions*) dummy) (setf (gethash name *free-functions*) dummy)
(let ((fun (ir1-convert-global-lambda expansion))) (let ((fun (ir1-convert-global-lambda expansion)))
(setf (leaf-name fun) name) (setf (leaf-name fun) name)
(substitute-leaf fun dummy) (substitute-leaf-if
#'(lambda (x)
(not (eq (ref-inlinep x) :notinline)))
fun dummy)
(setf (gethash name *free-functions*) (setf (gethash name *free-functions*)
(if (eq inlinep :inline) (if (eq inlinep :inline)
var var
...@@ -876,12 +879,15 @@ ...@@ -876,12 +879,15 @@
(compiler-error "No type specified in FTYPE declaration: ~S." spec)) (compiler-error "No type specified in FTYPE declaration: ~S." spec))
(process-ftype-declaration (second spec) res (cddr spec) fvars)) (process-ftype-declaration (second spec) res (cddr spec) fvars))
(function (function
(unless (cdr spec) ;;
(compiler-error ;; Handle old style FUNCTION declaration, which is an abbreviation for
"No function name specified in FUNCTION declaration: ~S." spec)) ;; FTYPE. Args are name, arglist, result type.
(process-ftype-declaration `(function ,@(cddr spec)) res (cond ((and (<= 3 (length spec) 4) (listp (third spec)))
(list (second spec)) (process-ftype-declaration `(function ,@(cddr spec)) res
fvars)) (list (second spec))
fvars))
(t
(process-type-declaration spec res vars))))
((inline notinline maybe-inline) ((inline notinline maybe-inline)
(process-inline-declaration spec res fvars)) (process-inline-declaration spec res fvars))
((ignore ignorable) ((ignore ignorable)
...@@ -2539,7 +2545,7 @@ ...@@ -2539,7 +2545,7 @@
;; ;;
;; No non-global state to be updated. ;; No non-global state to be updated.
((inline notinline maybe-inline optimize optimize-interface ((inline notinline maybe-inline optimize optimize-interface
declaration freeze-type)) declaration freeze-type constant-function))
;; ;;
;; Totally ignore these operations at non-top-level. ;; Totally ignore these operations at non-top-level.
((start-block end-block) ((start-block end-block)
......
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