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
fb26edf5
Commit
fb26edf5
authored
34 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Fixed up DUMP-FLOAT to make 0d0 be dumped so that it will be loaded as a double
float.
parent
8167b21f
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
+13
-10
13 additions, 10 deletions
compiler/dump.lisp
with
13 additions
and
10 deletions
compiler/dump.lisp
+
13
−
10
View file @
fb26edf5
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; Scott Fahlman (FAHLMAN@CMUC).
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/dump.lisp,v 1.1
0
1990/0
6/26 06:27:44 wlott
Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/dump.lisp,v 1.1
1
1990/0
7/10 10:23:07 ram
Exp $
;;;
;;;
;;; This file contains stuff that knows about dumping FASL files.
;;; This file contains stuff that knows about dumping FASL files.
;;;
;;;
...
@@ -748,17 +748,20 @@
...
@@ -748,17 +748,20 @@
;;; Compute how many bytes it will take to represent signed integer N.
;;; Compute how many bytes it will take to represent signed integer N.
(
defun
compute-bytes
(
n
)
(
defun
compute-bytes
(
n
)
(
truncate
(
+
(
integer-length
n
)
8
)
8
))
(
ceiling
(
1
+
(
integer-length
n
))
8
))
(
defun
dump-float
(
x
file
)
(
defun
dump-float
(
x
file
)
(
multiple-value-bind
(
f
exponent
sign
)
(
decode-float
x
)
(
let
((
digits
(
float-digits
x
)))
(
let
((
mantissa
(
truncate
(
scale-float
(
*
f
sign
)
(
float-precision
f
)))))
(
multiple-value-bind
(
sig
exp
sign
)
(
dump-fop
'lisp::fop-float
file
)
(
integer-decode-float
x
)
(
dump-byte
(
1+
(
integer-length
exponent
))
file
)
(
let
((
significand
(
*
sig
#-
new-compiler
(
truncate
sign
)
(
quick-dump-number
exponent
(
compute-bytes
exponent
)
file
)
#+
new-compiler
sign
))
;### i-d-f bug.
(
dump-byte
(
1+
(
integer-length
mantissa
))
file
)
(
exponent
(
+
exp
digits
)))
(
quick-dump-number
mantissa
(
compute-bytes
mantissa
)
file
))))
(
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
)))))
;;;; Symbol Dumping:
;;;; 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