diff --git a/build-aux/build-x86_64-mes.sh b/build-aux/build-x86_64-mes.sh index 4f35f0e1..b3d3d240 100755 --- a/build-aux/build-x86_64-mes.sh +++ b/build-aux/build-x86_64-mes.sh @@ -157,4 +157,5 @@ bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/malloc ##sh ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/tiny-mes # bash ${srcdest}build-aux/cc-x86_64-mes.sh scaffold/mini-mes bash ${srcdest}build-aux/cc-x86_64-mes.sh src/mes -cp src/mes.x86_64-mes-out src/mes +# not yet, broken +# cp src/mes.x86_64-mes-out src/mes diff --git a/src/lib.c b/src/lib.c index ff0574b2..999f35ca 100644 --- a/src/lib.c +++ b/src/lib.c @@ -37,7 +37,7 @@ display_helper (SCM x, int cont, char* sep, int fd, int write_p) else { fdputs ("#\\", fd); - int v = VALUE (x); + long v = VALUE (x); if (v == '\0') fdputs ("nul", fd); else if (v == '\a') fdputs ("alarm", fd); else if (v == '\b') fdputs ("backspace", fd); @@ -139,7 +139,7 @@ display_helper (SCM x, int cont, char* sep, int fd, int write_p) SCM t = CAR (x); while (t && t != cell_nil) { - int v = write_p ? VALUE (CAR (t)) : -1; + long v = write_p ? VALUE (CAR (t)) : -1; if (v == '\0') fdputs ("\\0", fd); else if (v == '\a') fdputs ("\\a", fd); else if (v == '\b') fdputs ("\\b", fd); @@ -170,7 +170,7 @@ display_helper (SCM x, int cont, char* sep, int fd, int write_p) { fdputs ("#(", fd); SCM t = CAR (x); - for (int i = 0; i < LENGTH (x); i++) + for (long i = 0; i < LENGTH (x); i++) { if (i) fdputc (' ', fd); @@ -302,7 +302,7 @@ equal2_p (SCM a, SCM b) { if (LENGTH (a) != LENGTH (b)) return cell_f; - for (int i=0; i < LENGTH (a); i++) + for (long i=0; i < LENGTH (a); i++) { SCM ai = VECTOR (a) + i; SCM bi = VECTOR (b) + i; diff --git a/src/math.c b/src/math.c index 1b3477d5..b33af933 100644 --- a/src/math.c +++ b/src/math.c @@ -36,7 +36,7 @@ greater_p (SCM x) ///((name . ">") (arity . n)) if (x == cell_nil) return cell_t; assert_number ("greater_p", CAR (x)); - int n = VALUE (CAR (x)); + long n = VALUE (CAR (x)); x = CDR (x); while (x != cell_nil) { @@ -55,7 +55,7 @@ less_p (SCM x) ///((name . "<") (arity . n)) if (x == cell_nil) return cell_t; assert_number ("less_p", CAR (x)); - int n = VALUE (CAR (x)); + long n = VALUE (CAR (x)); x = CDR (x); while (x != cell_nil) { @@ -74,7 +74,7 @@ is_p (SCM x) ///((name . "=") (arity . n)) if (x == cell_nil) return cell_t; assert_number ("is_p", CAR (x)); - int n = VALUE (CAR (x)); + long n = VALUE (CAR (x)); x = cdr (x); while (x != cell_nil) { @@ -89,7 +89,7 @@ SCM minus (SCM x) ///((name . "-") (arity . n)) { assert_number ("minus", CAR (x)); - int n = VALUE (CAR (x)); + long n = VALUE (CAR (x)); x = cdr (x); if (x == cell_nil) n = -n; @@ -105,7 +105,7 @@ minus (SCM x) ///((name . "-") (arity . n)) SCM plus (SCM x) ///((name . "+") (arity . n)) { - int n = 0; + long n = 0; while (x != cell_nil) { assert_number ("plus", CAR (x)); @@ -118,7 +118,7 @@ plus (SCM x) ///((name . "+") (arity . n)) SCM divide (SCM x) ///((name . "/") (arity . n)) { - int n = 1; + long n = 1; if (x != cell_nil) { assert_number ("divide", CAR (x)); @@ -139,7 +139,7 @@ modulo (SCM a, SCM b) { assert_number ("modulo", a); assert_number ("modulo", b); - int x = VALUE (a); + long x = VALUE (a); while (x < 0) x += VALUE (b); return MAKE_NUMBER (x % VALUE (b)); } @@ -147,7 +147,7 @@ modulo (SCM a, SCM b) SCM multiply (SCM x) ///((name . "*") (arity . n)) { - int n = 1; + long n = 1; while (x != cell_nil) { assert_number ("multiply", CAR (x)); @@ -160,7 +160,7 @@ multiply (SCM x) ///((name . "*") (arity . n)) SCM logand (SCM x) ///((arity . n)) { - int n = 0; + long n = 0; while (x != cell_nil) { assert_number ("multiply", CAR (x)); @@ -173,7 +173,7 @@ logand (SCM x) ///((arity . n)) SCM logior (SCM x) ///((arity . n)) { - int n = 0; + long n = 0; while (x != cell_nil) { assert_number ("logior", CAR (x)); @@ -187,14 +187,14 @@ SCM lognot (SCM x) { assert_number ("lognot", x); - int n = ~VALUE (x); + long n = ~VALUE (x); return MAKE_NUMBER (n); } SCM logxor (SCM x) ///((arity . n)) { - int n = 0; + long n = 0; while (x != cell_nil) { assert_number ("logxor", CAR (x)); @@ -209,7 +209,7 @@ ash (SCM n, SCM count) { assert_number ("ash", n); assert_number ("ash", count); - int cn = VALUE (n); - int ccount = VALUE (count); + long cn = VALUE (n); + long ccount = VALUE (count); return MAKE_NUMBER ((ccount < 0) ? cn >> -ccount : cn << ccount); } diff --git a/src/mes.c b/src/mes.c index 46020d13..64c380d6 100644 --- a/src/mes.c +++ b/src/mes.c @@ -39,7 +39,7 @@ char *g_arena = 0; typedef long SCM; int g_debug = 0; -int g_free = 0; +long g_free = 0; SCM g_continuations = 0; SCM g_symbols = 0; @@ -1029,7 +1029,7 @@ eval_apply () int global_p; int macro_p; int t; - int c; + long c; eval_apply: if (r3 == cell_vm_evlis) goto evlis; diff --git a/src/reader.c b/src/reader.c index 2cf54d00..3d9355a0 100644 --- a/src/reader.c +++ b/src/reader.c @@ -507,7 +507,7 @@ dump () eputs ("\n"); } - int i; + long i; for (i=0; i