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
1d393259
Commit
1d393259
authored
20 years ago
by
cwang
Browse files
Options
Downloads
Patches
Plain Diff
A slow version of symbol-value that works for NIL. If we use 4-bit low-tag
we can go back to the faster version.
parent
3f02e304
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/amd64/cell.lisp
+20
-3
20 additions, 3 deletions
compiler/amd64/cell.lisp
with
20 additions
and
3 deletions
compiler/amd64/cell.lisp
+
20
−
3
View file @
1d393259
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/amd64/cell.lisp,v 1.
3
2004/07/
06
20:1
2:08
cwang
Exp
$"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/amd64/cell.lisp,v 1.
4
2004/07/
29
20:1
4:53
cwang
Rel
$"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -89,18 +89,35 @@
;;; With Symbol-Value, we check that the value isn't the trap object. So
;;; Symbol-Value of NIL is NIL.
;;;
;;; This is a slow version. We don't need to check for nil if we move to 4-bit
;;; low-tag.
(
define-vop
(
symbol-value
)
(
:translate
symbol-value
)
(
:policy
:fast-safe
)
(
:args
(
object
:scs
(
descriptor-reg
)
:to
(
:result
1
)))
(
:results
(
value
:scs
(
descriptor-reg
any-reg
)))
(
:temporary
(
:sc
unsigned-reg
)
temp
)
(
:vop-var
vop
)
(
:save-p
:compute-only
)
(
:generator
9
(
let
((
err-lab
(
generate-error-code
vop
unbound-symbol-error
object
)))
(
let
((
err-lab
(
generate-error-code
vop
unbound-symbol-error
object
))
(
itsnil
(
gen-label
))
(
done
(
gen-label
)))
(
inst
mov
temp
nil-value
)
(
inst
cmp
object
temp
)
(
inst
jmp
:e
itsnil
)
;; not nil
(
loadw
value
object
symbol-value-slot
other-pointer-type
)
(
inst
cmp
value
unbound-marker-type
)
(
inst
jmp
:e
err-lab
))))
(
inst
jmp
:e
err-lab
)
(
inst
jmp
done
)
(
emit-label
itsnil
)
(
inst
mov
value
nil-value
)
(
emit-label
done
))))
(
define-vop
(
fast-symbol-value
cell-ref
)
(
:variant
symbol-value-slot
other-pointer-type
)
...
...
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