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
3e880d0e
Commit
3e880d0e
authored
31 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Re-declared stuff in gensym.
parent
fcf2d0d8
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
code/symbol.lisp
+14
-7
14 additions, 7 deletions
code/symbol.lisp
with
14 additions
and
7 deletions
code/symbol.lisp
+
14
−
7
View file @
3e880d0e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/symbol.lisp,v 1.1
7
1993/08/
06 14:03
:3
2
ram Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/symbol.lisp,v 1.1
8
1993/08/
11 16:31
:3
8
ram Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -204,6 +204,7 @@
...
@@ -204,6 +204,7 @@
(
defvar
*gensym-counter*
0
(
defvar
*gensym-counter*
0
"Counter for generating unique GENSYM symbols."
)
"Counter for generating unique GENSYM symbols."
)
(
declaim
(
type
unsigned-byte
*gensym-counter*
))
(
defun
gensym
(
&optional
thing
)
(
defun
gensym
(
&optional
thing
)
"Creates a new uninterned symbol whose name is a prefix string (defaults
"Creates a new uninterned symbol whose name is a prefix string (defaults
...
@@ -211,18 +212,24 @@
...
@@ -211,18 +212,24 @@
alter the prefix if it is a string, or the decimal number if it is a
alter the prefix if it is a string, or the decimal number if it is a
number, of this symbol. The number, defaultly *gensym-counter*, is
number, of this symbol. The number, defaultly *gensym-counter*, is
incremented by each call to GENSYM."
incremented by each call to GENSYM."
(
let
((
old
*gensym-counter*
))
(
let
((
new
(
etypecase
old
(
index
(
1+
old
))
(
unsigned-byte
(
1+
old
)))))
(
declare
(
optimize
(
speed
3
)
(
safety
0
)))
(
setq
*gensym-counter*
new
)
(
multiple-value-bind
(
multiple-value-bind
(
prefix
int
)
(
prefix
int
)
(
etypecase
thing
(
etypecase
thing
(
null
(
values
"G"
(
incf
*gensym-counter*
)
))
(
null
(
values
"G"
new
))
(
simple-string
(
values
thing
(
incf
*gensym-counter*
)
))
(
simple-string
(
values
thing
new
))
(
fixnum
(
values
"G"
thing
))
(
fixnum
(
values
"G"
thing
))
(
string
(
values
(
coerce
thing
'simple-string
)
(
string
(
values
(
coerce
thing
'simple-string
)
new
)))
(
incf
*gensym-counter*
))))
(
declare
(
simple-string
prefix
)
(
fixnum
int
))
(
declare
(
simple-string
prefix
)
(
fixnum
int
))
(
make-symbol
(
make-symbol
(
concatenate
'simple-string
prefix
(
concatenate
'simple-string
prefix
(
quick-integer-to-string
int
)))))
(
the
simple-string
(
quick-integer-to-string
int
))))))))
(
defvar
*gentemp-counter*
0
)
(
defvar
*gentemp-counter*
0
)
(
declaim
(
type
index
*gentemp-counter*
))
(
declaim
(
type
index
*gentemp-counter*
))
...
...
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