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
9cb3a53d
Commit
9cb3a53d
authored
32 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Changed loop destructuring to destructuring-bind.
parent
c7dc5712
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/seqtran.lisp
+49
-48
49 additions, 48 deletions
compiler/seqtran.lisp
with
49 additions
and
48 deletions
compiler/seqtran.lisp
+
49
−
48
View file @
9cb3a53d
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/seqtran.lisp,v 1.1
5
1992/0
3/14 02:16:56
ram Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/seqtran.lisp,v 1.1
6
1992/0
8/05 00:36:42
ram Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -412,17 +412,17 @@
;;; version. This is an IR1 transform so that we don't have to worry about
;;; changing the order of evaluation.
;;;
(
loop
for
(
fun
pred*
)
in
'
(
(
string
<
string
<
*
)
(
string
>
string
>
*
)
(
string
<
=
string
<
=*
)
(
string
>
=
string
>
=*
)
(
string=
string=*
)
(
string/=
string/=*
))
do
(
deftransform
fun
((
string1
string2
&key
(
start1
0
)
end1
(
start2
0
)
end2
)
'*
'*
:eval-name
t
)
`
(
,
pred*
string1
string2
start1
end1
start2
end2
)))
(
dolist
(
stuff
'
((
string<
string<*
)
(
string
>
string
>
*
)
(
string
<=
string
<=
*
)
(
string
>
=
string
>
=*
)
(
string=
string=*
)
(
string
/
=
string
/
=*
)
))
(
destructuring-bind
(
fun
pred*
)
stuff
(
deftransform
fun
((
string1
string2
&key
(
start1
0
)
end1
(
start2
0
)
end2
)
'*
'*
:eval-name
t
)
`
(
,
pred*
string1
string2
start1
end1
start2
end2
)))
)
;;; STRING-xxx* transform -- Internal
...
...
@@ -431,39 +431,40 @@
;;; ordering relationship specified by Lessp and Equalp. The start and end are
;;; also gotten from the environment. Both strings must be simple strings.
;;;
(
loop
for
(
name
lessp
equalp
)
in
'
((
string<*
t
nil
)
(
string<=*
t
t
)
(
string>*
nil
nil
)
(
string>=*
nil
t
))
do
(
deftransform
name
((
string1
string2
start1
end1
start2
end2
)
'
(
simple-string
simple-string
t
t
t
t
)
'*
:eval-name
t
)
`
(
let*
((
end1
(
if
(
not
end1
)
(
length
string1
)
end1
))
(
end2
(
if
(
not
end2
)
(
length
string2
)
end2
))
(
index
(
lisp::%sp-string-compare
string1
start1
end1
string2
start2
end2
)))
(
if
index
(
cond
((
=
index
,
(
if
lessp
'end1
'end2
))
index
)
((
=
index
,
(
if
lessp
'end2
'end1
))
nil
)
((
,
(
if
lessp
'char<
'char>
)
(
schar
string1
index
)
(
schar
string2
(
truly-the
index
(
+
index
(
truly-the
fixnum
(
-
start2
start1
))))))
index
)
(
t
nil
))
,
(
if
equalp
'end1
'nil
)))))
(
loop
for
(
name
result-fun
)
in
'
((
string=*
not
)
(
string/=*
identity
))
do
(
deftransform
name
((
string1
string2
start1
end1
start2
end2
)
'
(
simple-string
simple-string
t
t
t
t
)
'*
:eval-name
t
)
`
(
,
result-fun
(
lisp::%sp-string-compare
string1
start1
(
or
end1
(
length
string1
))
string2
start2
(
or
end2
(
length
string2
))))))
(
dolist
(
stuff
'
((
string<*
t
nil
)
(
string<=*
t
t
)
(
string>*
nil
nil
)
(
string>=*
nil
t
)))
(
destructuring-bind
(
name
lessp
equalp
)
stuff
(
deftransform
name
((
string1
string2
start1
end1
start2
end2
)
'
(
simple-string
simple-string
t
t
t
t
)
'*
:eval-name
t
)
`
(
let*
((
end1
(
if
(
not
end1
)
(
length
string1
)
end1
))
(
end2
(
if
(
not
end2
)
(
length
string2
)
end2
))
(
index
(
lisp::%sp-string-compare
string1
start1
end1
string2
start2
end2
)))
(
if
index
(
cond
((
=
index
,
(
if
lessp
'end1
'end2
))
index
)
((
=
index
,
(
if
lessp
'end2
'end1
))
nil
)
((
,
(
if
lessp
'char<
'char>
)
(
schar
string1
index
)
(
schar
string2
(
truly-the
index
(
+
index
(
truly-the
fixnum
(
-
start2
start1
))))))
index
)
(
t
nil
))
,
(
if
equalp
'end1
'nil
))))))
(
dolist
(
stuff
'
((
string=*
not
)
(
string/=*
identity
)))
(
destructuring-bind
(
name
result-fun
)
stuff
(
deftransform
name
((
string1
string2
start1
end1
start2
end2
)
'
(
simple-string
simple-string
t
t
t
t
)
'*
:eval-name
t
)
`
(
,
result-fun
(
lisp::%sp-string-compare
string1
start1
(
or
end1
(
length
string1
))
string2
start2
(
or
end2
(
length
string2
)))))))
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