Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
cmucl
cmucl
Commits
a9b6e216
Commit
a9b6e216
authored
Feb 11, 1994
by
ram
Browse files
Add MAYBE-BYTE-LOAD and BYTE-LOAD-OVER functions for controlling loading of
byte code in worldload.
parent
c1f08ed2
Changes
1
Hide whitespace changes
Inline
Side-by-side
code/save.lisp
View file @
a9b6e216
...
@@ -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/save.lisp,v 1.
19
1994/0
1/28 17:22:59 wlott
Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/save.lisp,v 1.
20
1994/0
2/11 13:36:59 ram
Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -255,3 +255,30 @@
...
@@ -255,3 +255,30 @@
(
defun
assert-user-package
()
(
defun
assert-user-package
()
(
unless
(
eq
*package*
(
find-package
"USER"
))
(
unless
(
eq
*package*
(
find-package
"USER"
))
(
error
"Change *PACKAGE* to the USER package and try again."
)))
(
error
"Change *PACKAGE* to the USER package and try again."
)))
;;; MAYBE-BYTE-LOAD -- Interface
;;;
;;; If Name has been byte-compiled, and :runtime is a feature, then load the
;;; byte-compiled version, otherwise just do normal load.
;;;
(
defun
maybe-byte-load
(
name
&optional
(
load-native
t
))
(
let
((
bname
(
make-pathname
:defaults
name
:type
#.
(
c:backend-byte-fasl-file-type
c:*target-backend*
))))
(
cond
((
and
(
featurep
:runtime
)
(
probe-file
bname
))
(
load
bname
))
(
load-native
(
load
name
)))))
;;; BYTE-LOAD-OVER -- Interface
;;;
;;; Replace a cold-loaded native object file with a byte-compiled one, if it
;;; exists.
;;;
(
defun
byte-load-over
(
name
)
(
load
(
make-pathname
:defaults
name
:type
#.
(
c:backend-byte-fasl-file-type
c:*target-backend*
))
:if-does-not-exist
nil
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment