/[cmucl]/src/code/save.lisp
ViewVC logotype

Diff of /src/code/save.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.53 by rtoy, Wed Apr 26 20:49:23 2006 UTC revision 1.54 by fgilham, Sat Jul 7 17:17:40 2007 UTC
# Line 114  Line 114 
114    (file c-call:c-string)    (file c-call:c-string)
115    (initial-function (alien:unsigned #.vm:word-bits)))    (initial-function (alien:unsigned #.vm:word-bits)))
116    
117    #+:executable
118    (alien:def-alien-routine "save_executable" (alien:boolean)
119      (file c-call:c-string)
120      (initial-function (alien:unsigned #.vm:word-bits)))
121    
122  (defun save-lisp (core-file-name &key  (defun save-lisp (core-file-name &key
123                                   (purify t)                                   (purify t)
124                                   (root-structures ())                                   (root-structures ())
# Line 123  Line 128 
128                                   (site-init "library:site-init")                                   (site-init "library:site-init")
129                                   (print-herald t)                                   (print-herald t)
130                                   (process-command-line t)                                   (process-command-line t)
131                                      #+:executable
132                                     (executable nil)
133                                   (batch-mode nil))                                   (batch-mode nil))
134    "Saves a CMU Common Lisp core image in the file of the specified name.  The    "Saves a CMU Common Lisp core image in the file of the specified name.  The
135    following keywords are defined:    following keywords are defined:
# Line 163  Line 170 
170    mechanisms, otherwise ignore all switches (except those processed by the    mechanisms, otherwise ignore all switches (except those processed by the
171    C startup code).    C startup code).
172    
173      :executable
174          If nil (the default), save-lisp will save using the traditional
175       core-file format.  If true, save-lisp will create an executable
176       file that contains the lisp image built in.
177       (Not all architectures support this yet.)
178    
179    :batch-mode    :batch-mode
180        If nil (the default), then the presence of the -batch command-line        If nil (the default), then the presence of the -batch command-line
181    switch will invoke batch-mode processing.  If true, the produced core    switch will invoke batch-mode processing.  If true, the produced core
# Line 251  Line 264 
264      (setq *cmucl-core-dump-time* (get-universal-time))      (setq *cmucl-core-dump-time* (get-universal-time))
265      (setq *cmucl-core-dump-host* (machine-instance))      (setq *cmucl-core-dump-host* (machine-instance))
266    
267      (let ((initial-function (get-lisp-obj-address #'restart-lisp)))      (let ((initial-function (get-lisp-obj-address #'restart-lisp))
268              (core-name (unix-namestring core-file-name nil)))
269        (without-gcing        (without-gcing
270          (save (unix-namestring core-file-name nil) initial-function))))            #+:executable
271            (if executable
272                (save-executable core-name initial-function)
273                (save core-name initial-function))
274            #-:executable
275            (save core-name initial-function))))
276    nil)    nil)
277    
278    

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.5