Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
0dc42ff4
Commit
0dc42ff4
authored
34 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
COERCE-TO-FUNCTION => FAST-SAFE-COERCE-TO-FUNCTION.
Added new type-checking COERCE-TO-FUNCTION.
parent
c4cb4d7e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/old-rt/type-vops.lisp
+29
-1
29 additions, 1 deletion
compiler/old-rt/type-vops.lisp
with
29 additions
and
1 deletion
compiler/old-rt/type-vops.lisp
+
29
−
1
View file @
0dc42ff4
...
...
@@ -234,7 +234,7 @@ simple-integer-vector-p?
;;; Since we test for a function rather than the unbound marker, this works on
;;; NIL.
;;;
(
define-vop
(
coerce-to-function
)
(
define-vop
(
fast-safe-
coerce-to-function
)
(
:args
(
thing
:scs
(
descriptor-reg
)
:target
res
))
(
:results
(
res
:scs
(
descriptor-reg
)))
...
...
@@ -257,3 +257,31 @@ simple-integer-vector-p?
(
test-simple-type
res
temp
done-lab
nil
system:%function-type
)
(
error-call
clc::error-symbol-undefined
thing-temp
))))))
(
define-vop
(
coerce-to-function
)
(
:args
(
thing
:scs
(
descriptor-reg
)
:target
res
))
(
:results
(
res
:scs
(
descriptor-reg
)))
(
:node-var
node
)
(
:temporary
(
:type
random
:scs
(
non-descriptor-reg
))
temp
)
(
:temporary
(
:scs
(
descriptor-reg
))
thing-temp
)
(
:generator
0
(
let
((
not-fun-lab
(
gen-label
))
(
done-lab
(
gen-label
))
(
not-sym-lab
(
gen-label
)))
(
test-simple-type
thing
temp
not-fun-lab
t
system:%function-type
)
(
unless
(
location=
thing
res
)
(
inst
lr
res
thing
))
(
emit-label
done-lab
)
(
unassemble
(
assemble-elsewhere
node
(
emit-label
not-fun-lab
)
(
test-simple-type
thing
temp
not-sym-lab
t
system:%symbol-type
)
(
inst
lr
thing-temp
thing
)
(
loadw
res
thing
(
/
clc::symbol-definition
4
))
(
test-simple-type
res
temp
done-lab
nil
system:%function-type
)
(
error-call
clc::error-symbol-undefined
thing-temp
)
(
emit-label
not-sym-lab
)
(
error-call
clc::error-object-not-function-or-symbol
thing
))))))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment