/[cmucl]/src/compiler/ir1opt.lisp
ViewVC logotype

Diff of /src/compiler/ir1opt.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.70 by dtc, Thu Jul 6 18:37:01 2000 UTC revision 1.71 by dtc, Fri Jul 7 09:33:01 2000 UTC
# Line 26  Line 26 
26  ;;;  ;;;
27  ;;;    Return true if the sole use of Cont is a reference to a constant leaf.  ;;;    Return true if the sole use of Cont is a reference to a constant leaf.
28  ;;;  ;;;
 (proclaim '(function constant-continuation-p (continuation) boolean))  
29  (defun constant-continuation-p (cont)  (defun constant-continuation-p (cont)
30      (declare (type continuation cont) (values boolean))
31    (let ((use (continuation-use cont)))    (let ((use (continuation-use cont)))
32      (and (ref-p use)      (and (ref-p use)
33           (constant-p (ref-leaf use)))))           (constant-p (ref-leaf use)))))
# Line 38  Line 38 
38  ;;;    Return the constant value for a continuation whose only use is a  ;;;    Return the constant value for a continuation whose only use is a
39  ;;; constant node.  ;;; constant node.
40  ;;;  ;;;
 (proclaim '(function continuation-value (continuation) t))  
41  (defun continuation-value (cont)  (defun continuation-value (cont)
42      (declare (type continuation cont))
43    (assert (constant-continuation-p cont))    (assert (constant-continuation-p cont))
44    (constant-value (ref-leaf (continuation-use cont))))    (constant-value (ref-leaf (continuation-use cont))))
45    
# Line 128  Line 128 
128  ;;;    Return the derived type for Cont's first value.  This is guaranteed not  ;;;    Return the derived type for Cont's first value.  This is guaranteed not
129  ;;; to be a Values or Function type.  ;;; to be a Values or Function type.
130  ;;;  ;;;
 (proclaim '(function continuation-type (continuation) ctype))  
131  (defun continuation-type (cont)  (defun continuation-type (cont)
132      (declare (type continuation cont) (values ctype))
133    (single-value-type (continuation-derived-type cont)))    (single-value-type (continuation-derived-type cont)))
134    
135    
# Line 737  Line 737 
737  ;;;  ;;;
738  ;;;    Do IR1 optimizations on a Combination node.  ;;;    Do IR1 optimizations on a Combination node.
739  ;;;  ;;;
 (proclaim '(function ir1-optimize-combination (combination) void))  
740  (defun ir1-optimize-combination (node)  (defun ir1-optimize-combination (node)
741      (declare (type combination node))
742    (when (continuation-reoptimize (basic-combination-fun node))    (when (continuation-reoptimize (basic-combination-fun node))
743      (propagate-function-change node))      (propagate-function-change node))
744    (let ((args (basic-combination-args node))    (let ((args (basic-combination-args node))
# Line 1066  Line 1066 
1066  ;;;  ;;;
1067  ;;;    Just throw the severity and args...  ;;;    Just throw the severity and args...
1068  ;;;  ;;;
 (proclaim '(function give-up (&rest t) nil))  
1069  (defun give-up (&rest args)  (defun give-up (&rest args)
1070    "This function is used to throw out of an IR1 transform, aborting this    "This function is used to throw out of an IR1 transform, aborting this
1071    attempt to transform the call, but admitting the possibility that this or    attempt to transform the call, but admitting the possibility that this or
1072    some other transform will later suceed.  If arguments are supplied, they are    some other transform will later suceed.  If arguments are supplied, they are
1073    format arguments for an efficiency note."    format arguments for an efficiency note."
1074      (values nil)
1075    (throw 'give-up (values :failure args)))    (throw 'give-up (values :failure args)))
1076  ;;;  ;;;
1077  (defun abort-transform (&rest args)  (defun abort-transform (&rest args)

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

  ViewVC Help
Powered by ViewVC 1.1.5