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
c5cd3440
Commit
c5cd3440
authored
34 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Changed DO-NODES to work even when multiple next nodes are deleted.
Added some uses of REQUIRED-ARGUMENT in slot defaults.
parent
65d6aa81
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/macros.lisp
+12
-8
12 additions, 8 deletions
compiler/macros.lisp
with
12 additions
and
8 deletions
compiler/macros.lisp
+
12
−
8
View file @
c5cd3440
...
@@ -646,7 +646,8 @@
...
@@ -646,7 +646,8 @@
;;;
;;;
;;; In the forward case, we terminate on Last-Cont so that we don't have to
;;; In the forward case, we terminate on Last-Cont so that we don't have to
;;; worry about our termination condition being changed when new code is added
;;; worry about our termination condition being changed when new code is added
;;; during the iteration. In the backward case, we do NODE-PREV before
;;; during the iteration. If CONT gets deleted out from under us, go again
;;; from the previous CONT. In the backward case, we do NODE-PREV before
;;; evaluating the body so that we can keep going when the current node is
;;; evaluating the body so that we can keep going when the current node is
;;; deleted.
;;; deleted.
;;;
;;;
...
@@ -655,11 +656,15 @@
...
@@ -655,11 +656,15 @@
Iterate over the nodes in Block, binding Node-Var to the each node and
Iterate over the nodes in Block, binding Node-Var to the each node and
Cont-Var to the node's Cont."
Cont-Var to the node's Cont."
(
let
((
n-block
(
gensym
))
(
let
((
n-block
(
gensym
))
(
n-last-cont
(
gensym
)))
(
n-last-cont
(
gensym
))
(
n-prev-cont
(
gensym
)))
`
(
let*
((
,
n-block
,
block
)
`
(
let*
((
,
n-block
,
block
)
(
,
n-last-cont
(
node-cont
(
block-last
,
n-block
))))
(
,
n-last-cont
(
node-cont
(
block-last
,
n-block
))))
(
do*
((
,
node-var
(
continuation-next
(
block-start
,
n-block
))
(
do*
((
,
node-var
(
continuation-next
(
block-start
,
n-block
))
(
continuation-next
,
cont-var
))
(
if
(
eq
(
continuation-kind
,
cont-var
)
:deleted
)
(
continuation-next
,
n-prev-cont
)
(
continuation-next
,
cont-var
)))
(
,
n-prev-cont
nil
,
cont-var
)
(
,
cont-var
(
node-cont
,
node-var
)
(
node-cont
,
node-var
)))
(
,
cont-var
(
node-cont
,
node-var
)
(
node-cont
,
node-var
)))
(())
(())
,@
body
,@
body
...
@@ -958,25 +963,24 @@
...
@@ -958,25 +963,24 @@
(
defstruct
event-info
(
defstruct
event-info
;;
;;
;; The name of this event.
;; The name of this event.
(
name
nil
:type
symbol
)
(
name
(
required-argument
)
:type
symbol
)
;;
;;
;; The string rescribing this event.
;; The string rescribing this event.
(
description
nil
:type
string
)
(
description
(
required-argument
)
:type
string
)
;;
;;
;; The name of the variable we stash this in.
;; The name of the variable we stash this in.
(
var
nil
:type
symbol
)
(
var
(
required-argument
)
:type
symbol
)
;;
;;
;; The number of times this event has happened.
;; The number of times this event has happened.
(
count
0
:type
fixnum
)
(
count
0
:type
fixnum
)
;;
;;
;; The level of significance of this event.
;; The level of significance of this event.
(
level
nil
:type
unsigned-byte
)
(
level
(
required-argument
)
:type
unsigned-byte
)
;;
;;
;; If true, a function that gets called with the node that the event happened
;; If true, a function that gets called with the node that the event happened
;; to.
;; to.
(
action
nil
:type
(
or
function
null
)))
(
action
nil
:type
(
or
function
null
)))
;;; A hashtable from event names to event-info structures.
;;; A hashtable from event names to event-info structures.
;;;
;;;
(
defvar
*event-info*
(
make-hash-table
:test
#'
eq
))
(
defvar
*event-info*
(
make-hash-table
:test
#'
eq
))
...
...
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