Commit 4d19a274 authored by Daniel Kochmański's avatar Daniel Kochmański

cosmetic: untabify

Signed-off-by: default avatarDaniel Kochmański <dkochmanski@turtle-solutions.eu>
parent c0f7a926
......@@ -49,7 +49,7 @@
;;; ")
(if (or (member "ECL-MIN" *features* :test #'string-equal)
(member "CROSS" *features* :test #'string-equal))
(member "CROSS" *features* :test #'string-equal))
(load "lsp/load.lsp" :verbose nil))
(defun si::process-command-args () )
......@@ -101,14 +101,14 @@
(defun compile-if-old (destdir sources &rest options)
(ensure-directories-exist destdir :mode #o0777)
(mapcar #'(lambda (source)
(let ((object (merge-pathnames destdir (compile-file-pathname source :type :object))))
(unless (and (probe-file object)
(>= (file-write-date object) (file-write-date source)))
(format t "~&(compile-file ~S :output-file ~S~{ ~S~})~%"
source object options)
(apply #'compile-file source :output-file object options))
object))
sources))
(let ((object (merge-pathnames destdir (compile-file-pathname source :type :object))))
(unless (and (probe-file object)
(>= (file-write-date object) (file-write-date source)))
(format t "~&(compile-file ~S :output-file ~S~{ ~S~})~%"
source object options)
(apply #'compile-file source :output-file object options))
object))
sources))
(defvar *module-symbols* nil)
(defvar *module-files* nil)
......@@ -129,21 +129,21 @@
(defun build-fake-asdf (name static-library compiled-filename &key depends-on)
(let ((path (make-pathname :name name :type "asd"))
(compiled (make-pathname :host "SYS"
:name (pathname-name compiled-filename)
:type (pathname-type compiled-filename)))
(library (make-pathname :host "SYS"
:name (pathname-name static-library)
:type (pathname-type static-library))))
(compiled (make-pathname :host "SYS"
:name (pathname-name compiled-filename)
:type (pathname-type compiled-filename)))
(library (make-pathname :host "SYS"
:name (pathname-name static-library)
:type (pathname-type static-library))))
(with-open-file (*standard-output* path
:direction :output :if-exists :supersede
:if-does-not-exist :create)
(format t "
(defsystem ~S :class asdf::prebuilt-system
:lib ~S
:depends-on ~S
:components ((:compiled-file ~S :pathname ~S)))"
name library depends-on (string name) compiled))
:lib ~S
:depends-on ~S
:components ((:compiled-file ~S :pathname ~S)))"
name library depends-on (string name) compiled))
path))
(defun build-module (name sources &key additional-files depends-on
......@@ -155,8 +155,8 @@
(setf *module-files* (append additional-files *module-files*)))
(let* ((objects (compile-if-old dir sources :system-p t :c-file t
:data-file t :h-file t))
(compiled-file-name (string name))
(static-library (c::build-static-library name :lisp-files objects)))
(compiled-file-name (string name))
(static-library (c::build-static-library name :lisp-files objects)))
(push static-library *module-files*)
(when builtin
(push (intern name) *module-symbols*))
......@@ -164,11 +164,11 @@
(push (build-fake-module name sources) *module-files*)
#+:wants-dlopen
(push (setf compiled-file-name (c::build-fasl name :lisp-files objects))
*module-files*)
*module-files*)
(push (if (equalp name "asdf")
(build-fake-asdf "prebuilt-asdf" static-library compiled-file-name :depends-on '("cmp"))
(build-fake-asdf name static-library compiled-file-name :depends-on depends-on))
*module-files*)
(build-fake-asdf "prebuilt-asdf" static-library compiled-file-name :depends-on '("cmp"))
(build-fake-asdf name static-library compiled-file-name :depends-on depends-on))
*module-files*)
)))
;;;
......@@ -179,18 +179,18 @@
(when commit-id
(let ((last nil))
(with-open-file (file commit-id :direction :input :element-type :default
:external-format :default)
(loop for l = (read-line file nil nil nil)
while l
do (setf last l)))
:external-format :default)
(loop for l = (read-line file nil nil nil)
while l
do (setf last l)))
(when last
(handler-case
(let* ((start (position #\Space last)))
(when start
(let ((end (position #\Space last :start (incf start))))
(when end
(setq si::+commit-id+ (subseq last start end))))))
(serious-condition ()))))))
(handler-case
(let* ((start (position #\Space last)))
(when start
(let ((end (position #\Space last :start (incf start))))
(when end
(setq si::+commit-id+ (subseq last start end))))))
(serious-condition ()))))))
;;;
;;; * Go back to build directory to start compiling
;;;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -19,89 +19,89 @@
cl_object
APPLY(cl_narg n, cl_objectfn fn, cl_object *x)
{
cl_object output;
asm volatile (
"movl 4(%%ebp),%%edx\n\t" /* Create a fake frame for debugger */
"pushl %%edx\n\t"
"pushl %%ebp\n\t"
"movl %%ecx, %%edx\n\t"
"cmpl $63, %%ecx\n\t" /* Copy at most 63 arguments onto the stack */
"jle FOO1\n\t"
"movl $63, %%ecx\n\t"
"FOO1:\n\t" /* Here we compute the new address of the stack pointer */
"movl %%esp, %%ebp\n\t" /* using the formula ESP = (ESP - ECX*4 - 4) & -16 */
"negl %%ecx\n\t" /* which rounds ESP making it a multiple of 16 bytes. */
"leal -4(%%esp,%%ecx,4), %%esp\n\t"
"andl $-16, %%esp\n\t"
"movl %%edx, (%%esp)\n\t" /* Then ESP[0] is the number of arguments */
"negl %%ecx\n\t"
"leal 4(%%esp), %%edi\n\t" /* and the other arguments are copied from ESP[4] on */
"rep\n\t"
cl_object output;
asm volatile (
"movl 4(%%ebp),%%edx\n\t" /* Create a fake frame for debugger */
"pushl %%edx\n\t"
"pushl %%ebp\n\t"
"movl %%ecx, %%edx\n\t"
"cmpl $63, %%ecx\n\t" /* Copy at most 63 arguments onto the stack */
"jle FOO1\n\t"
"movl $63, %%ecx\n\t"
"FOO1:\n\t" /* Here we compute the new address of the stack pointer */
"movl %%esp, %%ebp\n\t" /* using the formula ESP = (ESP - ECX*4 - 4) & -16 */
"negl %%ecx\n\t" /* which rounds ESP making it a multiple of 16 bytes. */
"leal -4(%%esp,%%ecx,4), %%esp\n\t"
"andl $-16, %%esp\n\t"
"movl %%edx, (%%esp)\n\t" /* Then ESP[0] is the number of arguments */
"negl %%ecx\n\t"
"leal 4(%%esp), %%edi\n\t" /* and the other arguments are copied from ESP[4] on */
"rep\n\t"
"movsl\n\t"
"call *%%eax\n\t" /* At this point the stack must be aligned */
"movl %%ebp, %%esp\n\t"
"popl %%ebp\n\t"
"popl %%edx\n\t"
"call *%%eax\n\t" /* At this point the stack must be aligned */
"movl %%ebp, %%esp\n\t"
"popl %%ebp\n\t"
"popl %%edx\n\t"
: "=a" (output) : "c" (n), "a" (fn), "S" (x) : "%edx", "%edi");
return output;
return output;
}
cl_object
APPLY_fixed(cl_narg n, cl_object (*fn)(), cl_object *x)
{
cl_object output;
asm volatile (
"movl 4(%%ebp),%%edx\n\t" /* Create a fake frame for debugger */
"pushl %%edx\n\t"
"pushl %%ebp\n\t"
"movl %%ecx, %%edx\n\t" /* Copy at most 63 arguments onto the stack */
"cmpl $63, %%ecx\n\t"
"jle FOO2\n\t"
"movl $63, %%ecx\n"
"FOO2:\n\t" /* Here we compute the new address of the stack pointer */
"movl %%esp, %%ebp\n\t" /* using the formula ESP = (ESP - ECX*4) & -16 */
"negl %%ecx\n\t" /* which rounds ESP making it a multiple of 16 bytes. */
"leal (%%esp,%%ecx,4), %%esp\n\t"
"andl $-16, %%esp\n\t"
"negl %%ecx\n\t"
"movl %%esp, %%edi\n\t" /* then the arguments are copied from ESP[0] on */
"rep\n\t"
cl_object output;
asm volatile (
"movl 4(%%ebp),%%edx\n\t" /* Create a fake frame for debugger */
"pushl %%edx\n\t"
"pushl %%ebp\n\t"
"movl %%ecx, %%edx\n\t" /* Copy at most 63 arguments onto the stack */
"cmpl $63, %%ecx\n\t"
"jle FOO2\n\t"
"movl $63, %%ecx\n"
"FOO2:\n\t" /* Here we compute the new address of the stack pointer */
"movl %%esp, %%ebp\n\t" /* using the formula ESP = (ESP - ECX*4) & -16 */
"negl %%ecx\n\t" /* which rounds ESP making it a multiple of 16 bytes. */
"leal (%%esp,%%ecx,4), %%esp\n\t"
"andl $-16, %%esp\n\t"
"negl %%ecx\n\t"
"movl %%esp, %%edi\n\t" /* then the arguments are copied from ESP[0] on */
"rep\n\t"
"movsl\n\t"
"call *%%eax\n\t" /* At this point the stack must be aligned */
"movl %%ebp, %%esp\n\t"
"popl %%ebp\n\t"
"popl %%edx\n\t"
"call *%%eax\n\t" /* At this point the stack must be aligned */
"movl %%ebp, %%esp\n\t"
"popl %%ebp\n\t"
"popl %%edx\n\t"
: "=a" (output) : "c" (n), "a" (fn), "S" (x) : "%edx", "%edi");
return output;
return output;
}
cl_object
APPLY_closure(cl_narg n, cl_objectfn fn, cl_object cl, cl_object *x)
{
cl_object output;
asm volatile (
"movl 4(%%ebp),%%edx\n\t" /* Create a fake frame for debugger */
"pushl %%edx\n\t"
"pushl %%ebp\n\t"
"movl %%ecx, %%edx\n\t"
"cmpl $63, %%ecx\n\t" /* Copy at most 63 arguments onto the stack */
"jle FOO3\n\t"
"movl $63, %%ecx\n\t"
"FOO3:\n\t" /* Here we compute the new address of the stack pointer */
"movl %%esp, %%ebp\n\t" /* using the formula ESP = (ESP - ECX*4 - 8) & -16 */
"negl %%ecx\n\t" /* which rounds ESP making it a multiple of 16 bytes. */
"leal -8(%%esp,%%ecx,4), %%esp\n\t"
"andl $-16, %%esp\n\t"
"movl %%edx, (%%esp)\n\t" /* Then ESP[0] is the number of arguments */
"movl %%edi, 4(%%esp)\n\t" /* ESP[4] is the closure environment */
"negl %%ecx\n\t"
"leal 8(%%esp), %%edi\n\t" /* and the other arguments are copied from ESP[8] on */
"rep\n\t"
cl_object output;
asm volatile (
"movl 4(%%ebp),%%edx\n\t" /* Create a fake frame for debugger */
"pushl %%edx\n\t"
"pushl %%ebp\n\t"
"movl %%ecx, %%edx\n\t"
"cmpl $63, %%ecx\n\t" /* Copy at most 63 arguments onto the stack */
"jle FOO3\n\t"
"movl $63, %%ecx\n\t"
"FOO3:\n\t" /* Here we compute the new address of the stack pointer */
"movl %%esp, %%ebp\n\t" /* using the formula ESP = (ESP - ECX*4 - 8) & -16 */
"negl %%ecx\n\t" /* which rounds ESP making it a multiple of 16 bytes. */
"leal -8(%%esp,%%ecx,4), %%esp\n\t"
"andl $-16, %%esp\n\t"
"movl %%edx, (%%esp)\n\t" /* Then ESP[0] is the number of arguments */
"movl %%edi, 4(%%esp)\n\t" /* ESP[4] is the closure environment */
"negl %%ecx\n\t"
"leal 8(%%esp), %%edi\n\t" /* and the other arguments are copied from ESP[8] on */
"rep\n\t"
"movsl\n\t"
"call *%%eax\n\t" /* At this point the stack must be aligned */
"movl %%ebp, %%esp\n\t"
"popl %%ebp\n\t"
"popl %%edx\n\t"
"call *%%eax\n\t" /* At this point the stack must be aligned */
"movl %%ebp, %%esp\n\t"
"popl %%ebp\n\t"
"popl %%edx\n\t"
: "=a" (output) : "c" (n), "a" (fn), "S" (x), "D" (cl) : "%edx");
return output;
return output;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -22,15 +22,15 @@ _ecl_big_register_free(cl_object x) {}
cl_object
_ecl_big_register_copy(cl_object old)
{
cl_object new_big = ecl_alloc_object(t_bignum);
cl_object new_big = ecl_alloc_object(t_bignum);
new_big->big.big_num = old->big.big_num;
return new_big;
return new_big;
}
static cl_object
big_normalize(cl_object x)
{
if (x->big.big_num == 0ll)
if (x->big.big_num == 0ll)
return(ecl_make_fixnum(0));
if (x->big.big_num <= MOST_POSITIVE_FIXNUM && x->big.big_num >= MOST_NEGATIVE_FIXNUM)
return(ecl_make_fixnum(x->big.big_num));
......@@ -40,29 +40,29 @@ big_normalize(cl_object x)
cl_object
_ecl_big_register_normalize(cl_object x)
{
if (x->big.big_num == 0ll)
if (x->big.big_num == 0ll)
return(ecl_make_fixnum(0));
if (x->big.big_num <= MOST_POSITIVE_FIXNUM && x->big.big_num >= MOST_NEGATIVE_FIXNUM)
return(ecl_make_fixnum(x->big.big_num));
return _ecl_big_register_copy(x);
return _ecl_big_register_copy(x);
}
static cl_object
big_alloc(int size)
{
volatile cl_object x = ecl_alloc_object(t_bignum);
if (size <= 0)
ecl_internal_error("negative or zero size for bignum in big_alloc");
x->big.big_num = 0ll;
return x;
volatile cl_object x = ecl_alloc_object(t_bignum);
if (size <= 0)
ecl_internal_error("negative or zero size for bignum in big_alloc");
x->big.big_num = 0ll;
return x;
}
static cl_object
_ecl_big_copy(cl_object x)
{
volatile cl_object y = ecl_alloc_object(t_bignum);
volatile cl_object y = ecl_alloc_object(t_bignum);
y->big.big_num = x->big.big_num;
return y;
return y;
}
cl_object
......@@ -90,7 +90,7 @@ _ecl_big_gcd(cl_object x, cl_object y)
int
_ecl_big_num_t_sgn(big_num_t x)
{
return ( x == (big_num_t)0 ) ? 0 : (x < (big_num_t)0) ? -1 : 1;
return ( x == (big_num_t)0 ) ? 0 : (x < (big_num_t)0) ? -1 : 1;
}
cl_object
......@@ -98,15 +98,15 @@ _ecl_big_times_big(cl_object x, cl_object y)
{
cl_object z = ecl_alloc_object(t_bignum);
z->big.big_num = x->big.big_num * y->big.big_num;
return z;
return z;
}
cl_object
_ecl_big_times_fix(cl_object x, cl_fixnum y)
{
cl_object z = ecl_alloc_object(t_bignum);
cl_object z = ecl_alloc_object(t_bignum);
z->big.big_num = x->big.big_num * y;
return big_normalize(z);
return big_normalize(z);
}
cl_object
......@@ -114,23 +114,23 @@ _ecl_big_plus_big(cl_object x, cl_object y)
{
cl_object z = ecl_alloc_object(t_bignum);
z->big.big_num = x->big.big_num + y->big.big_num;
return z;
return z;
}
cl_object
_ecl_big_plus_fix(cl_object x, cl_fixnum y)
{
cl_object z = ecl_alloc_object(t_bignum);
cl_object z = ecl_alloc_object(t_bignum);
z->big.big_num = x->big.big_num + y;
return big_normalize(z);
return big_normalize(z);
}
cl_object
_ecl_fix_times_fix(cl_fixnum x, cl_fixnum y)
{
cl_object z = ecl_alloc_object(t_bignum);
cl_object z = ecl_alloc_object(t_bignum);
z->big.big_num = x * y;
return big_normalize(z);
return big_normalize(z);
}
cl_object
......@@ -158,9 +158,9 @@ _ecl_big_floor(cl_object a, cl_object b, cl_object *pr)
cl_object
_ecl_big_negate(cl_object x)
{
cl_object z = ecl_alloc_object(t_bignum);
cl_object z = ecl_alloc_object(t_bignum);
z->big.big_num = -x->big.big_num;
return z;
return z;
}
void
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -42,7 +42,7 @@ si_get_cdata(cl_object filename)
}
if (memcmp(header->code, HEADER_PREFIX, HEADER_PREFIX_LENGTH)) {
displaced = str_no_data;
displaced = str_no_data;
} else {
displaced = cl_funcall(8, @'make-array',
ecl_make_fixnum(header->size),
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -57,7 +57,7 @@ ecl_cos_long_float(cl_object x)
static cl_object
ecl_cos_complex(cl_object x)
{
/* z = x + I y
/* z = x + I y
cos(z) = cosh(I z) = cosh(-y + I x)
*/
cl_object dx = x->complex.real;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.