Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cmucl
cmucl
Commits
e72b4d1e
Commit
e72b4d1e
authored
Nov 11, 1990
by
ram
Browse files
Added new :TN arg to OPERAND-RESTRICTION-OK so that we can use it
at IR2 time.
parent
28f77b96
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/ltn.lisp
View file @
e72b4d1e
...
...
@@ -518,18 +518,20 @@
;;;; Known call annotation:
;;; OPERAND-RESTRICTION-OK -- Inter
nal
;;; OPERAND-RESTRICTION-OK -- Inter
face
;;;
;;; Return true if Restr is satisfied by Type. Cont is continuation used to
;;; test for constant arguments. If T-OK is true, then a T restriction allows
;;; any operand type. This is also called by IR2tran when it determines
;;; whether a result temporary needs to be made.
;;; Return true if Restr is satisfied by Type. If T-OK is true, then a T
;;; restriction allows any operand type. This is also called by IR2tran when
;;; it determines whether a result temporary needs to be made, and by
;;; representation selection when it is deciding which move VOP to use.
;;; Cont and TN are used to test for constant arguments.
;;;
(
proclaim
'
(
inline
operand-restriction-ok
))
(
defun
operand-restriction-ok
(
restr
type
&key
cont
(
t-ok
t
))
(
defun
operand-restriction-ok
(
restr
type
&key
cont
tn
(
t-ok
t
))
(
declare
(
type
(
or
(
member
*
)
cons
)
restr
)
(
type
primitive-type
type
)
(
type
(
or
continuation
null
)
cont
))
(
type
(
or
continuation
null
)
cont
)
(
type
(
or
tn
null
)
tn
))
(
if
(
eq
restr
'*
)
t
(
ecase
(
first
restr
)
...
...
@@ -539,8 +541,14 @@
(
eq
mem
type
))
(
return
t
))))
(
:constant
(
and
(
constant-continuation-p
cont
)
(
funcall
(
second
restr
)
(
continuation-value
cont
)))))))
(
cond
(
cont
(
and
(
constant-continuation-p
cont
)
(
funcall
(
second
restr
)
(
continuation-value
cont
))))
(
tn
(
and
(
eq
(
tn-kind
tn
)
:constant
)
(
funcall
(
second
restr
)
(
tn-value
tn
))))
(
t
(
error
"Neither CONT nor TN supplied."
)))))))
;;; Template-Args-OK -- Internal
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment