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
dff75ed1
Commit
dff75ed1
authored
21 years ago
by
pmai
Browse files
Options
Downloads
Patches
Plain Diff
Added bootstrap file for cross-compiling type-union related changes to the
type-system.
parent
1d681ff5
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
bootfiles/18e/boot6.lisp
+55
-0
55 additions, 0 deletions
bootfiles/18e/boot6.lisp
with
55 additions
and
0 deletions
bootfiles/18e/boot6.lisp
0 → 100644
+
55
−
0
View file @
dff75ed1
;;;;
;;;; This boot-file is needed only when cross-compiling from a lisp which
;;;; doesn't have the type-union related type-system changes to one which
;;;; has. If one does a normal recompile to do the update, this isn't
;;;; needed, but if one wants to e.g. go from 18e directly to current HEAD,
;;;; a cross-compile is necessary, as is this boot file.
;;;;
;;;; This needs to be placed in the target:bootstrap.lisp file, while doing
;;;; the cross-compile, which is loaded after compiling the cross-compiler,
;;;; unlike the target:cross-bootstrap.lisp file.
;;;;
(
in-package
:C
)
(
defun
make-canonical-union-type
(
type-list
)
(
let
((
members
'
())
(
misc-types
'
()))
(
dolist
(
type
type-list
)
(
if
(
member-type-p
type
)
(
setf
members
(
union
members
(
member-type-members
type
)))
(
push
type
misc-types
)))
#+
long-float
(
when
(
null
(
set-difference
'
(
-0l0
0l0
)
members
))
#-
negative-zero-is-not-zero
(
push
(
specifier-type
'
(
long-float
0l0
0l0
))
misc-types
)
#+
negative-zero-is-not-zero
(
push
(
specifier-type
'
(
long-float
-0l0
0l0
))
misc-types
)
(
setf
members
(
set-difference
members
'
(
-0l0
0l0
))))
(
when
(
null
(
set-difference
'
(
-0d0
0d0
)
members
))
#-
negative-zero-is-not-zero
(
push
(
specifier-type
'
(
double-float
0d0
0d0
))
misc-types
)
#+
negative-zero-is-not-zero
(
push
(
specifier-type
'
(
double-float
-0d0
0d0
))
misc-types
)
(
setf
members
(
set-difference
members
'
(
-0d0
0d0
))))
(
when
(
null
(
set-difference
'
(
-0f0
0f0
)
members
))
#-
negative-zero-is-not-zero
(
push
(
specifier-type
'
(
single-float
0f0
0f0
))
misc-types
)
#+
negative-zero-is-not-zero
(
push
(
specifier-type
'
(
single-float
-0f0
0f0
))
misc-types
)
(
setf
members
(
set-difference
members
'
(
-0f0
0f0
))))
(
cond
((
null
members
)
(
let
((
res
(
first
misc-types
)))
(
dolist
(
type
(
rest
misc-types
))
(
setq
res
(
type-union
res
type
)))
res
))
((
null
misc-types
)
(
make-member-type
:members
members
))
(
t
(
let
((
res
(
first
misc-types
)))
(
dolist
(
type
(
rest
misc-types
))
(
setq
res
(
type-union
res
type
)))
(
dolist
(
type
members
)
(
setq
res
(
type-union
res
(
make-member-type
:members
(
list
type
)))))
res
)))))
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