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
aadbea6c
Commit
aadbea6c
authored
34 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Changed DUMP-FLOAT to use the new FOP-SINGLE-FLOAT and FOP-DOUBLE-FLOAT
faslops so that we can reliably dump all IEEE floats.
parent
f4cfb880
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/dump.lisp
+17
-16
17 additions, 16 deletions
compiler/dump.lisp
with
17 additions
and
16 deletions
compiler/dump.lisp
+
17
−
16
View file @
aadbea6c
...
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/dump.lisp,v 1.1
2
1990/
07/12 12:52:12 wlott
Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/dump.lisp,v 1.1
3
1990/
10/04 15:08:02 ram
Exp $
;;;
;;; This file contains stuff that knows about dumping FASL files.
;;;
...
...
@@ -727,6 +727,12 @@
(
sub-dump-object
(
imagpart
x
)
file
)
(
dump-fop
'lisp::fop-complex
file
))
;;; Compute how many bytes it will take to represent signed integer N.
(
defun
compute-bytes
(
n
)
(
ceiling
(
1+
(
integer-length
n
))
8
))
;;; Dump an integer.
(
defun
dump-integer
(
n
file
)
...
...
@@ -745,23 +751,18 @@
(
quick-dump-number
bytes
4
file
)
(
quick-dump-number
n
bytes
file
)))))
;;; Compute how many bytes it will take to represent signed integer N.
(
defun
compute-bytes
(
n
)
(
ceiling
(
1+
(
integer-length
n
))
8
))
(
defun
dump-float
(
x
file
)
(
let
((
digits
(
float-digits
x
)))
(
multiple-value-bind
(
sig
exp
sign
)
(
integer-decode-float
x
)
(
let
((
significand
(
*
sig
#-
new-compiler
(
truncate
sign
)
#+
new-compiler
sign
))
;### i-d-f bug.
(
exponent
(
+
exp
digits
)))
(
dump-fop
'lisp::fop-float
file
)
(
dump-byte
(
1+
(
integer-length
exponent
))
file
)
(
quick-dump-number
exponent
(
compute-bytes
exponent
)
file
)
(
dump-byte
(
1+
digits
)
file
)
(
quick-dump-number
significand
(
ceiling
(
1+
digits
)
8
)
file
)))))
(
etypecase
x
(
single-float
(
dump-fop
'lisp::fop-single-float
file
)
(
quick-dump-number
(
vm:single-float-bits
x
)
4
file
))
(
double-float
(
dump-fop
'lisp::fop-double-float
file
)
(
let
((
x
x
))
(
declare
(
double-float
x
))
(
quick-dump-number
(
vm:double-float-low-bits
x
)
4
file
)
(
quick-dump-number
(
vm:double-float-high-bits
x
)
4
file
)))))
;;;; Symbol Dumping:
...
...
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