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
33b4e3cf
Commit
33b4e3cf
authored
34 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Changed FIND-TOP-LEVEL-COMPONENTS to not make components that might
have a NLX into them top-level.
parent
42ff91c0
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/dfo.lisp
+26
-6
26 additions, 6 deletions
compiler/dfo.lisp
with
26 additions
and
6 deletions
compiler/dfo.lisp
+
26
−
6
View file @
33b4e3cf
...
@@ -248,13 +248,34 @@
...
@@ -248,13 +248,34 @@
(
declare
(
type
component
res
))))))))
(
declare
(
type
component
res
))))))))
(
not
(
find
:external
funs
:key
#'
functional-kind
))
(
not
(
find-if
#'
(
lambda
(
x
)
(
let
((
entries
(
lambda-entries
x
)))
(
and
entries
(
find-if
#'
entry-exits
entries
))))
funs
))
)
;;; HAS-XEP-OR-NLX -- Internal
;;;
;;; Return true if Fun is either an XEP or has EXITS to some of its ENTRIES.
;;;
(
defun
has-xep-or-nlx
(
fun
)
(
declare
(
type
clambda
fun
))
(
or
(
eq
(
functional-kind
fun
)
:external
)
(
let
((
entries
(
lambda-entries
fun
)))
(
and
entries
(
find-if
#'
entry-exits
entries
)))))
;;; FIND-TOP-LEVEL-COMPONENTS -- Internal
;;; FIND-TOP-LEVEL-COMPONENTS -- Internal
;;;
;;;
;;; Compute the result of FIND-INITIAL-DFO given the list of all resulting
;;; Compute the result of FIND-INITIAL-DFO given the list of all resulting
;;; components.
We find c
omponents that
contain a :Top-Level lambda. If there
;;; components.
C
omponents that
have no normal XEPs or potential non-local
;;;
is no normal XEP, then we mark the component as :Top-Level. If there is a
;;;
exits are marked as :TOP-LEVEL. If there is a :Top-Level lambda, and also
;;;
:Top-Level lambda, and also
a normal XEP, then we treat the component as
;;; a normal XEP, then we treat the component as
normal, but also return such
;;;
normal, but also return such
components in a list as the third value.
;;; components in a list as the third value.
;;;
;;;
(
defun
find-top-level-components
(
components
)
(
defun
find-top-level-components
(
components
)
(
declare
(
list
components
))
(
declare
(
list
components
))
...
@@ -265,8 +286,7 @@
...
@@ -265,8 +286,7 @@
(
unless
(
eq
(
block-next
(
component-head
com
))
(
component-tail
com
))
(
unless
(
eq
(
block-next
(
component-head
com
))
(
component-tail
com
))
(
let*
((
funs
(
component-lambdas
com
))
(
let*
((
funs
(
component-lambdas
com
))
(
has-top
(
find
:top-level
funs
:key
#'
functional-kind
)))
(
has-top
(
find
:top-level
funs
:key
#'
functional-kind
)))
(
cond
((
and
has-top
(
cond
((
and
has-top
(
not
(
find-if
#'
has-xep-or-nlx
funs
)))
(
not
(
find
:external
funs
:key
#'
functional-kind
)))
(
setf
(
component-kind
com
)
:top-level
)
(
setf
(
component-kind
com
)
:top-level
)
(
setf
(
component-name
com
)
"Top-Level Form"
)
(
setf
(
component-name
com
)
"Top-Level Form"
)
(
top
com
))
(
top
com
))
...
...
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