Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jon Boone
cmucl
Commits
9122483a
Commit
9122483a
authored
Oct 13, 2011
by
Raymond Toy
Browse files
Merge branch 'master' into dynamic-stack-alloc
Conflicts: tools/create-target.sh tools/load-world.sh
parents
d452655e
a34b7f0e
Changes
4
Hide whitespace changes
Inline
Side-by-side
compiler/main.lisp
View file @
9122483a
...
...
@@ -4,8 +4,7 @@
;;; This code was written as part of the CMU Common Lisp project at
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(
ext:file-comment
"$Header: src/compiler/main.lisp $"
)
(
ext:file-comment
"$Header: src/compiler/main.lisp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -54,8 +53,8 @@
;;; Exported:
(
defvar
*byte-compile-top-level*
t
"Similar to *BYTE-COMPILE-DEFAULT*, but controls the compilation of top-level
forms (evaluated at load-time) when the :BYTE-COMPILE argument is :MAYBE
(the default.) When true, we decide to byte-compile."
)
forms (evaluated at load-time) when the :BYTE-COMPILE argument is :MAYBE
(the default.) When true, we decide to byte-compile."
)
;;; Exported:
(
defvar
*loop-analyze*
nil
...
...
@@ -139,9 +138,9 @@
(
defvar
*user-source-info*
nil
"The user supplied source-info for the current compilation.
This is the :source-info argument to COMPILE-FROM-STREAM and will be
stored in the INFO slot of the DEBUG-SOURCE in code components and
in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs."
)
This is the :source-info argument to COMPILE-FROM-STREAM and will be
stored in the INFO slot of the DEBUG-SOURCE in code components and
in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs."
)
;;; Maybe-Mumble -- Internal
;;;
...
...
@@ -1127,11 +1126,13 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
(
setf
(
default-directory
)
cwd
))))
(
generate-comment
(
file-info
)
(
let*
((
name
(
pathname
(
source-info-stream
file-info
)))
(
proc
(
run-git
name
)))
(
if
(
and
proc
(
zerop
(
process-exit-code
proc
)))
(
proc
(
run-git
name
))
(
comment
(
and
proc
(
zerop
(
process-exit-code
proc
))
(
read-line
(
process-output
proc
)
nil
nil
))))
(
if
comment
(
format
nil
"$Header: ~A ~A $"
(
enough-namestring
name
)
(
read-line
(
process-output
proc
))
)
comment
)
(
second
form
)))))
(
cond
((
file-info-comment
file
)
(
compiler-warning
_N
"Ignoring extra file comment:~% ~S."
form
))
...
...
@@ -1800,54 +1801,64 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
*byte-compile-default*
)
((
:xref
*record-xref-info*
)
*record-xref-info*
))
"Compiles Source, producing a corresponding .FASL file. Source may be a list
of files, in which case the files are compiled as a unit, producing a single
.FASL file. The output file names are defaulted from the first (or only)
input file name. Other options available via keywords:
:Output-File
The name of the fasl to output, NIL for none, T for the default.
:Error-File
The name of the error listing file, NIL for none (the default), T for
.err.
:Trace-File
If specified, internal data structures are dumped to this file. T for
the .trace default.
:Error-Output
If a stream, then error output is sent there as well as to the listing
file. NIL suppresses this additional error output. The default is T,
which means use *ERROR-OUTPUT*.
:Block-Compile {NIL | :SPECIFIED | T}
Determines whether multiple functions are compiled together as a unit,
resolving function references at compile time. NIL means that global
function names are never resolved at compilation time. :SPECIFIED means
that names are resolved at compile-time when convenient (as in a
self-recursive call), but the compiler doesn't combine top-level DEFUNs.
With :SPECIFIED, an explicit START-BLOCK declaration will enable block
compilation. A value of T indicates that all forms in the file(s) should
be compiled as a unit. The default is the value of
EXT:*BLOCK-COMPILE-DEFAULT*, which is initially :SPECIFIED.
:Entry-Points
This specifies a list of function names for functions in the file(s) that
must be given global definitions. This only applies to block
compilation, and is useful mainly when :BLOCK-COMPILE T is specified on a
file that lacks START-BLOCK declarations. If the value is NIL (the
default) then all functions will be globally defined.
:Byte-Compile {T | NIL | :MAYBE}
Determines whether to compile into interpreted byte code instead of
machine instructions. Byte code is several times smaller, but much
slower. If :MAYBE, then only byte-compile when SPEED is 0 and
DEBUG <= 1. The default is the value of EXT:*BYTE-COMPILE-DEFAULT*,
which is initially :MAYBE.
:Xref
If non-NIL, enable recording of cross-reference information. The default
is the value of C:*RECORD-XREF-INFO*
:External-Format
The external format to use when opening the source file
:Decoding-Error
How to handle decoding errors in the external format when reading the
source file. Default (T) is to signal an error. Nil means silently
continue, replacing the invalid sequence with a suitable replacment
character."
"Compiles Source, producing a corresponding FASL file. Source may be a list
of files, in which case the files are compiled as a unit, producing a single
FASL file. The output file names are defaulted from the first (or only)
input file name. (The use of a list for Source is a CMUCL extension, not
specified in CLHS.)
These keywords are supported:
:Output-File
The name of the FASL to output, NIL for none, T for the default.
(Note the difference between the treatment of NIL :Output-File
here and in COMPILE-FILE-PATHNAME.) The returned pathname of the
output file may differ from the pathname of the :Output-File
parameter, e.g. when the latter is a designator for a directory.
:Load
Load the compiled file; T here requires :Output-File to be
non-NIL, as well. The default for :Load is NIL.
:Error-File
The name of the error listing file, NIL for none (the default), T for .err.
:Trace-File
If specified, internal data structures are dumped to this file. T for
the .trace default.
:Error-Output
If a stream, then error output is sent there as well as to the listing
file. NIL suppresses this additional error output. The default is T,
which means use *ERROR-OUTPUT*.
:Block-Compile {NIL | :SPECIFIED | T}
Determines whether multiple functions are compiled together as a unit,
resolving function references at compile time. NIL means that global
function names are never resolved at compilation time. :SPECIFIED means
that names are resolved at compile-time when convenient (as in a
self-recursive call), but the compiler doesn't combine top-level DEFUNs.
With :SPECIFIED, an explicit START-BLOCK declaration will enable block
compilation. A value of T indicates that all forms in the file(s) should
be compiled as a unit. The default is the value of
EXT:*BLOCK-COMPILE-DEFAULT*, which is initially :SPECIFIED.
:Entry-Points
This specifies a list of function names for functions in the file(s) that
must be given global definitions. This only applies to block
compilation, and is useful mainly when :BLOCK-COMPILE T is specified on a
file that lacks START-BLOCK declarations. If the value is NIL (the
default) then all functions will be globally defined.
:Byte-Compile {T | NIL | :MAYBE}
Determines whether to compile into interpreted byte code instead of
machine instructions. Byte code is several times smaller, but much
slower. If :MAYBE, then only byte-compile when SPEED is 0 and
DEBUG <= 1. The default is the value of EXT:*BYTE-COMPILE-DEFAULT*,
which is initially :MAYBE.
:Xref
If non-NIL, enable recording of cross-reference information. The default
is the value of C:*RECORD-XREF-INFO*
:External-Format
The external format to use when opening the source file.
:Decoding-Error
How to handle decoding errors in the external format when reading the
source file. Default (T) is to signal an error. NIL means silently
continue, replacing the invalid sequence with a suitable replacment
character."
(
let*
((
fasl-file
nil
)
(
error-file-stream
nil
)
(
output-file-pathname
nil
)
...
...
@@ -1998,7 +2009,7 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
be compiled. IF NAME names a macro, then the compiled expression
replaces the existing macro-function. If NAME names a function, the
compiled expression is placed in the function cell of NAME. If NAME
is N
il
, the compiled code object is returned."
is N
IL
, the compiled code object is returned."
(
with-compilation-unit
()
(
with-ir1-namespace
(
let*
((
*backend*
*native-backend*
)
...
...
@@ -2125,8 +2136,12 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
(
byte-compile
*byte-compile-default*
)
(
output-file
t
output-file-supplied-p
)
&allow-other-keys
)
"Return a pathname describing what file COMPILE-FILE would write to given
these arguments."
"Return a pathname describing what file COMPILE-FILE would write to
given these arguments. The returned pathname of the output file may
differ from the pathname of the :Output-File parameter, e.g. when
the latter is a designator for a directory. The CMUCL caveat: NIL is
accepted for :Output-File there but not here, which is probably not
in line with CLHS."
(
declare
(
type
(
or
string
pathname
stream
)
input-file
)
(
type
(
or
string
pathname
stream
(
member
t
))
output-file
)
(
values
(
or
null
pathname
)))
...
...
tools/build-all.sh
View file @
9122483a
...
...
@@ -6,7 +6,7 @@
usage
()
{
echo
"build-all.sh [bBCvU] [-o old] [-8 old8bit]"
echo
"build-all.sh [
-
bBCvU
P
] [-o old] [-8 old8bit]"
echo
""
echo
"Build all variants of cmucl for a specific architecture."
echo
"This means build the unicode and non-unicode variants."
...
...
@@ -24,20 +24,21 @@ usage ()
echo
' -C [l m] Create the build directories. The args are what'
echo
' you would give to create-target.sh for the lisp'
echo
' and motif variant.'
echo
' -v v Use the given string as the version. Default is'
echo
" today's date"
echo
' -v v Use the given string as the version.'
echo
" -o x Use specified Lisp to build unicode version."
echo
" (only applicable for build 1)"
echo
" -8 x Use specified Lisp to build 8-bit version."
echo
" (only applicable for build 1)"
echo
" -U Update and overwite the CVS translations files."
echo
" -U Update and overwite the translations files."
echo
" -P On the last build, (re)generate cmucl.pot and the"
echo
" translations"
}
VERSION
=
"
`
date
'+%Y-%m-%d %H:%M:%S'
`
"
BASE
=
build
CREATE_OPT
=
""
UPDATE_POT
=
"-P"
while
getopts
"UB:b:v:C:o:8:?"
arg
while
getopts
"
P
UB:b:v:C:o:8:?"
arg
do
case
$arg
in
b
)
BASE
=
"
$OPTARG
"
;;
...
...
@@ -47,6 +48,7 @@ do
8
)
OLD8
=
"
$OPTARG
"
;;
v
)
VERSION
=
"
$OPTARG
"
;;
U
)
UPDATE_TRANS
=
"-U"
;;
P
)
UPDATE_POT
=
""
;;
\?
)
usage
;;
esac
done
...
...
@@ -66,15 +68,15 @@ buildx86 ()
if
[
-n
"
$OLD8
"
]
;
then
# Build non-unicode versions
set
-x
src/tools/build.sh
-f
x87
-b
${
BASE
}
-8bit
$bootfiles
-v
"
$VERSION
"
-C
"
${
CREATE_OPT
}
"
${
UPDATE_TRANS
}
-o
"
$OLD8
"
src/tools/build.sh
-f
sse2
-b
${
BASE
}
-8bit
$bootfiles
-v
"
$VERSION
"
-C
"
${
CREATE_OPT
}
"
${
UPDATE_TRANS
}
-o
"
$OLD8
"
src/tools/build.sh
-f
x87
-b
${
BASE
}
-8bit
$bootfiles
${
VERSION
:+
-v
"
$VERSION
"
}
-C
"
${
CREATE_OPT
}
"
${
UPDATE_TRANS
}
${
UPDATE_POT
}
-o
"
$OLD8
"
src/tools/build.sh
-f
sse2
-b
${
BASE
}
-8bit
$bootfiles
${
VERSION
:+
-v
"
$VERSION
"
}
-C
"
${
CREATE_OPT
}
"
${
UPDATE_TRANS
}
${
UPDATE_POT
}
-o
"
$OLD8
"
set
+x
fi
# Build the unicode versions
if
[
-n
"
$OLDLISP
"
]
;
then
set
-x
src/tools/build.sh
-f
x87
-b
${
BASE
}
$bootfiles
-v
"
$VERSION
"
-C
"
${
CREATE_OPT
}
"
${
UPDATE_TRANS
}
-o
"
$OLDLISP
"
src/tools/build.sh
-f
sse2
-b
${
BASE
}
$bootfiles
-v
"
$VERSION
"
-C
"
${
CREATE_OPT
}
"
${
UPDATE_TRANS
}
-o
"
$OLDLISP
"
src/tools/build.sh
-f
x87
-b
${
BASE
}
$bootfiles
${
VERSION
:+
-v
"
$VERSION
"
}
-C
"
${
CREATE_OPT
}
"
${
UPDATE_TRANS
}
${
UPDATE_POT
}
-o
"
$OLDLISP
"
src/tools/build.sh
-f
sse2
-b
${
BASE
}
$bootfiles
${
VERSION
:+
-v
"
$VERSION
"
}
-C
"
${
CREATE_OPT
}
"
${
UPDATE_TRANS
}
${
UPDATE_POT
}
-o
"
$OLDLISP
"
set
+x
fi
}
...
...
@@ -84,13 +86,13 @@ buildsun4 ()
# Build non-unicode versions
if
[
-n
"
$OLD8
"
]
;
then
set
-x
src/tools/build.sh
-b
${
BASE
}
-8bit
$bootfiles
-v
"
$VERSION
"
-C
"
$CREATE_OPT
"
${
UPDATE_TRANS
}
-o
"
$OLD8
"
src/tools/build.sh
-b
${
BASE
}
-8bit
$bootfiles
${
VERSION
:+
-v
"
$VERSION
"
}
-C
"
$CREATE_OPT
"
${
UPDATE_TRANS
}
${
UPDATE_POT
}
-o
"
$OLD8
"
set
+x
fi
# Build the unicode version.
if
[
-n
"
$OLDLISP
"
]
;
then
set
-x
src/tools/build.sh
-b
${
BASE
}
$bootfiles
-v
"
$VERSION
"
-C
"
$CREATE_OPT
"
${
UPDATE_TRANS
}
-o
"
$OLDLISP
"
src/tools/build.sh
-b
${
BASE
}
$bootfiles
${
VERSION
:+
-v
"
$VERSION
"
}
-C
"
$CREATE_OPT
"
${
UPDATE_TRANS
}
${
UPDATE_POT
}
-o
"
$OLDLISP
"
set
+x
fi
}
...
...
tools/create-target.sh
View file @
9122483a
...
...
@@ -92,7 +92,7 @@ cd $bld_dir/lisp || quit "Can't cd $bld_dir/lisp"
ln
-s
../../src/lisp/GNUmakefile ../../src/lisp/Config.
$lisp_variant
../../src/lisp/Config.
*
_common
.
ln
-s
Config.
$lisp_variant
Config
[
-n
"
$motif_variant
"
]
&&
(
cd
motif/server
||
quit
"Can't cd motif/server"
# We will still continue in the outer shell
cd
../
motif/server
||
quit
"Can't cd motif/server"
# We will still continue in the outer shell
ln
-s
../../../src/motif/server/GNUmakefile ./Makefile
ln
-s
../../../src/motif/server/Config.
$motif_variant
./Config
)
...
...
tools/load-world.sh
View file @
9122483a
...
...
@@ -11,9 +11,9 @@ usage()
SKIP_PCL
=
NO_PCL_FEATURE
=
# Default version is the date
and
the git hash
# Default version is the date
with
the git hash
.
GIT_HASH
=
"
`
(
cd
src
;
git describe
--dirty
2>/dev/null
)
`
"
VERSION
=
"
`
date
'+%Y-%m-%d %H:%M:%S'
`
"
VERSION
=
"
`
date
'+%Y-%m-%d %H:%M:%S'
`
${
GIT_HASH
:+
$GIT_HASH
}
"
while
getopts
"p"
arg
do
...
...
@@ -41,7 +41,7 @@ fi
# If version string give, use it, otherwise use the default.
if
[
-n
"
$2
"
]
;
then
VERSION
=
$2
VERSION
=
"
$2
"
fi
$TARGET
/lisp/lisp
-core
$TARGET
/lisp/kernel.core
<<
EOF
...
...
@@ -58,6 +58,6 @@ $TARGET/lisp/lisp -core $TARGET/lisp/kernel.core <<EOF
$NO_PCL_FEATURE
(load "target:tools/worldload")
$VERSION
$GIT_HASH
$VERSION
EOF
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment