|
|
385abae |
Description: <short summary of the patch>
|
|
|
385abae |
TODO: Put a short summary on the line above and replace this paragraph
|
|
|
385abae |
with a longer explanation of this change. Complete the meta-information
|
|
|
385abae |
with other relevant fields (see below for details). To make it easier, the
|
|
|
385abae |
information below has been extracted from the changelog. Adjust it or drop
|
|
|
385abae |
it.
|
|
|
385abae |
.
|
|
|
385abae |
gcl (2.6.12-8) unstable; urgency=medium
|
|
|
385abae |
.
|
|
|
385abae |
* Version_2_6_13pre7
|
|
|
385abae |
Author: Camm Maguire <camm@debian.org>
|
|
|
385abae |
|
|
|
385abae |
---
|
|
|
385abae |
The information above should follow the Patch Tagging Guidelines, please
|
|
|
385abae |
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
|
385abae |
are templates for supplementary fields that you might want to add:
|
|
|
385abae |
|
|
|
385abae |
Origin: <vendor|upstream|other>, <url of original patch>
|
|
|
385abae |
Bug: <url in upstream bugtracker>
|
|
|
385abae |
Bug-Debian: https://bugs.debian.org/<bugnumber>
|
|
|
385abae |
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
|
385abae |
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
|
385abae |
Reviewed-By: <name and email of someone who approved the patch>
|
|
|
385abae |
Last-Update: <YYYY-MM-DD>
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/gcl-tk/comm.c
|
|
|
385abae |
+++ gcl-2.6.12/gcl-tk/comm.c
|
|
|
385abae |
@@ -66,7 +66,7 @@ fScheck_fd_for_input(fixnum fd,fixnum ti
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
struct connection_state *
|
|
|
385abae |
-setup_connection_state(fd)
|
|
|
385abae |
+setup_connection_state(int fd)
|
|
|
385abae |
{ struct connection_state * res;
|
|
|
385abae |
res = (void *)malloc(sizeof(struct connection_state));
|
|
|
385abae |
bzero(res,sizeof(struct connection_state));
|
|
|
385abae |
--- gcl-2.6.12.orig/gcl-tk/guis.h
|
|
|
385abae |
+++ gcl-2.6.12/gcl-tk/guis.h
|
|
|
385abae |
@@ -4,6 +4,10 @@
|
|
|
385abae |
#include <stdlib.h>
|
|
|
385abae |
|
|
|
385abae |
#define NO_PRELINK_UNEXEC_DIVERSION
|
|
|
385abae |
+#define IMMNUM_H
|
|
|
385abae |
+#define GMP_WRAPPERS_H
|
|
|
385abae |
+#define ERROR_H
|
|
|
385abae |
+
|
|
|
385abae |
#include "include.h"
|
|
|
385abae |
|
|
|
385abae |
#ifdef NeXT
|
|
|
385abae |
--- gcl-2.6.12.orig/gmp4/mpn/x86_64/k8/redc_1.asm
|
|
|
385abae |
+++ gcl-2.6.12/gmp4/mpn/x86_64/k8/redc_1.asm
|
|
|
385abae |
@@ -114,7 +114,7 @@ ifdef(`PIC',`
|
|
|
385abae |
|
|
|
385abae |
JUMPTABSECT
|
|
|
385abae |
ALIGN(8)
|
|
|
385abae |
-L(tab): JMPENT( L(0m4), L(tab))
|
|
|
385abae |
+L(tab): JMPENT( L(0), L(tab))
|
|
|
385abae |
JMPENT( L(1), L(tab))
|
|
|
385abae |
JMPENT( L(2), L(tab))
|
|
|
385abae |
JMPENT( L(3), L(tab))
|
|
|
385abae |
@@ -397,6 +397,7 @@ L(le1): add %r10, (up)
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
ALIGN(16)
|
|
|
385abae |
+L(0):
|
|
|
385abae |
L(0m4):
|
|
|
385abae |
L(lo0): mov (mp,nneg,8), %rax
|
|
|
385abae |
mov nneg, i
|
|
|
385abae |
--- gcl-2.6.12.orig/h/att_ext.h
|
|
|
385abae |
+++ gcl-2.6.12/h/att_ext.h
|
|
|
385abae |
@@ -29,7 +29,7 @@ void *malloc(size_t);
|
|
|
385abae |
void *realloc(void *,size_t);
|
|
|
385abae |
/* void * memalign(size_t,size_t); */
|
|
|
385abae |
void *alloc_contblock(size_t);
|
|
|
385abae |
-inline void *alloc_relblock(size_t);
|
|
|
385abae |
+void *alloc_relblock(size_t);
|
|
|
385abae |
/* object fSallocate_contiguous_pages(); */
|
|
|
385abae |
/* object fSallocate_relocatable_pages(); */
|
|
|
385abae |
|
|
|
385abae |
@@ -291,9 +291,7 @@ EXTER object sSAsystem_directoryA;
|
|
|
385abae |
#ifdef UNIX
|
|
|
385abae |
EXTER char *kcl_self;
|
|
|
385abae |
#endif
|
|
|
385abae |
-#if !defined(IN_MAIN) || !defined(ATT)
|
|
|
385abae |
EXTER bool raw_image;
|
|
|
385abae |
-#endif
|
|
|
385abae |
char *merge_system_directory();
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/h/cmpincl1.h
|
|
|
385abae |
+++ gcl-2.6.12/h/cmpincl1.h
|
|
|
385abae |
@@ -1,2 +1 @@
|
|
|
385abae |
-#define EXTER extern
|
|
|
385abae |
#define CMPINCLUDE
|
|
|
385abae |
--- gcl-2.6.12.orig/h/compbas.h
|
|
|
385abae |
+++ gcl-2.6.12/h/compbas.h
|
|
|
385abae |
@@ -1,2 +1,12 @@
|
|
|
385abae |
#include <stdarg.h>
|
|
|
385abae |
#define _VA_LIST_DEFINED
|
|
|
385abae |
+#ifndef EXTER
|
|
|
385abae |
+#define EXTER extern
|
|
|
385abae |
+#endif
|
|
|
385abae |
+#ifndef INLINE
|
|
|
385abae |
+#if defined(__GNUC__) && __GNUC__ <= 4
|
|
|
385abae |
+#define INLINE extern inline
|
|
|
385abae |
+#else
|
|
|
385abae |
+#define INLINE inline
|
|
|
385abae |
+#endif
|
|
|
385abae |
+#endif
|
|
|
385abae |
--- gcl-2.6.12.orig/h/error.h
|
|
|
385abae |
+++ gcl-2.6.12/h/error.h
|
|
|
385abae |
@@ -1,4 +1,7 @@
|
|
|
385abae |
-#define Icall_error_handler(a_,b_,c_,d_...) \
|
|
|
385abae |
+#ifndef ERROR_H
|
|
|
385abae |
+#define ERROR_H
|
|
|
385abae |
+
|
|
|
385abae |
+#define Icall_error_handler(a_,b_,c_,d_...) \
|
|
|
385abae |
Icall_gen_error_handler(Cnil,null_string,a_,b_,c_,##d_)
|
|
|
385abae |
#define Icall_continue_error_handler(a_,b_,c_,d_,e_...) \
|
|
|
385abae |
Icall_gen_error_handler(Ct,a_,b_,c_,d_,##e_)
|
|
|
385abae |
@@ -8,12 +11,8 @@ extern enum type t_vtype;
|
|
|
385abae |
extern int vtypep_fn(object);
|
|
|
385abae |
extern void Check_type(object *,int (*)(object),object);
|
|
|
385abae |
|
|
|
385abae |
+#define PFN(a_) INLINE int Join(a_,_fn)(object x) {return a_(x);}
|
|
|
385abae |
|
|
|
385abae |
-#ifdef IN_MAIN
|
|
|
385abae |
-#define PFN(a_) int Join(a_,_fn)(object x) {return a_(x);}
|
|
|
385abae |
-#else
|
|
|
385abae |
-#define PFN(a_) extern int Join(a_,_fn)(object x);
|
|
|
385abae |
-#endif
|
|
|
385abae |
PFN(integerp)
|
|
|
385abae |
PFN(non_negative_integerp)
|
|
|
385abae |
PFN(rationalp)
|
|
|
385abae |
@@ -201,3 +200,4 @@ object ihs_top_function_name(ihs_ptr h);
|
|
|
385abae |
abort();\
|
|
|
385abae |
})
|
|
|
385abae |
|
|
|
385abae |
+#endif /*ERROR_H*/
|
|
|
385abae |
--- gcl-2.6.12.orig/h/gmp_wrappers.h
|
|
|
385abae |
+++ gcl-2.6.12/h/gmp_wrappers.h
|
|
|
385abae |
@@ -1,12 +1,8 @@
|
|
|
385abae |
-#ifndef GMP_EXTERN
|
|
|
385abae |
-#define GMP_EXTERN extern
|
|
|
385abae |
-#endif
|
|
|
385abae |
-#ifndef GMP_EXTERN_INLINE
|
|
|
385abae |
-#define GMP_EXTERN_INLINE GMP_EXTERN __inline__
|
|
|
385abae |
-#endif
|
|
|
385abae |
+#ifndef GMP_WRAPPERS_H
|
|
|
385abae |
+#define GMP_WRAPPERS_H
|
|
|
385abae |
|
|
|
385abae |
-GMP_EXTERN jmp_buf gmp_jmp;
|
|
|
385abae |
-GMP_EXTERN int jmp_gmp,gmp_relocatable;
|
|
|
385abae |
+EXTER jmp_buf gmp_jmp;
|
|
|
385abae |
+EXTER int jmp_gmp,gmp_relocatable;
|
|
|
385abae |
|
|
|
385abae |
#define join(a_,b_) a_ ## b_
|
|
|
385abae |
#define Join(a_,b_) join(a_,b_)
|
|
|
385abae |
@@ -95,7 +91,7 @@ GMP_EXTERN int jmp_gmp,gmp_relocatable;
|
|
|
385abae |
set to -1 otherwise. 20040815 CM*/
|
|
|
385abae |
|
|
|
385abae |
#define MEM_GMP_CALL(n_,rt_,a_,s_,b_...) \
|
|
|
385abae |
- GMP_EXTERN_INLINE Join(RF_,rt_) Join(m,a_)(Join(P,n_)(b_)) { \
|
|
|
385abae |
+ INLINE Join(RF_,rt_) Join(m,a_)(Join(P,n_)(b_)) { \
|
|
|
385abae |
int j;\
|
|
|
385abae |
Join(RD_,rt_);\
|
|
|
385abae |
if (gmp_relocatable) {\
|
|
|
385abae |
@@ -195,3 +191,5 @@ MEM_GMP_CALL(2,size_t,mpz_sizeinbase,0,m
|
|
|
385abae |
/*#define __gmpz_realloc m__gmpz_realloc*/
|
|
|
385abae |
#define __gmpz_size m__gmpz_size
|
|
|
385abae |
#define __gmpz_sizeinbase m__gmpz_sizeinbase
|
|
|
385abae |
+
|
|
|
385abae |
+#endif /*GMP_WRAPPERS_H*/
|
|
|
385abae |
--- gcl-2.6.12.orig/h/immnum.h
|
|
|
385abae |
+++ gcl-2.6.12/h/immnum.h
|
|
|
385abae |
@@ -17,10 +17,10 @@
|
|
|
385abae |
#define iif2(x,y) is_imm_fixnum2(x,y)
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline fixnum
|
|
|
385abae |
+INLINE fixnum
|
|
|
385abae |
lnabs(fixnum x) {return x<0 ? ~x : x;}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline char
|
|
|
385abae |
+INLINE char
|
|
|
385abae |
clz(ufixnum x) {
|
|
|
385abae |
#ifdef HAVE_CLZL
|
|
|
385abae |
return x ? __builtin_clzl(x) : sizeof(x)*8;
|
|
|
385abae |
@@ -29,7 +29,7 @@ clz(ufixnum x) {
|
|
|
385abae |
#endif
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline char
|
|
|
385abae |
+INLINE char
|
|
|
385abae |
ctz(ufixnum x) {
|
|
|
385abae |
#ifdef HAVE_CTZL
|
|
|
385abae |
return __builtin_ctzl(x);/*x ? __builtin_clzl(x) : sizeof(x)*8;*/
|
|
|
385abae |
@@ -38,10 +38,10 @@ ctz(ufixnum x) {
|
|
|
385abae |
#endif
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline char
|
|
|
385abae |
+INLINE char
|
|
|
385abae |
fixnum_length(fixnum x) {return sizeof(x)*8-clz(lnabs(x));}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_length(object x) {return iif(x) ? mif(fixnum_length(fif(x))) : integer_length(x);}
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
@@ -57,7 +57,7 @@ immnum_length(object x) {return iif(x) ?
|
|
|
385abae |
#define POPD 0x3F
|
|
|
385abae |
#endif
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline char
|
|
|
385abae |
+INLINE char
|
|
|
385abae |
fixnum_popcount(ufixnum x) {
|
|
|
385abae |
x-=POPA&(x>>1);
|
|
|
385abae |
x=(x&POPB)+((x>>2)&POPB);
|
|
|
385abae |
@@ -70,33 +70,33 @@ fixnum_popcount(ufixnum x) {
|
|
|
385abae |
return x&POPD;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline char
|
|
|
385abae |
+INLINE char
|
|
|
385abae |
/* fixnum_count(fixnum x) {return __builtin_popcountl(lnabs(x));} */
|
|
|
385abae |
fixnum_count(fixnum x) {return fixnum_popcount(lnabs(x));}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_count(object x) {return iif(x) ? mif(fixnum_count(fif(x))) : integer_count(x);}
|
|
|
385abae |
|
|
|
385abae |
/*bs=sizeof(long)*8;
|
|
|
385abae |
lb=bs-clz(labs(x));|x*y|=|x|*|y|<2^(lbx+lby)<2^(bs-1);
|
|
|
385abae |
0 bounded by 2^0, +-1 by 2^1,mpf by 2^(bs-1), which is sign bit
|
|
|
385abae |
protect labs from most negative fix, here all immfix ok*/
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
fixnum_mul_safe_abs(fixnum x,fixnum y) {return clz(x)+clz(y)>sizeof(x)*8+1;}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
safe_mul_abs(fixnum x,fixnum y) {return fixnum_mul_safe_abs(x,y) ? make_fixnum(x*y) : fixnum_times(x,y);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
fixnum_mul_safe(fixnum x,fixnum y) {return fixnum_mul_safe_abs(labs(x),labs(y));}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
safe_mul(fixnum x,fixnum y) {return fixnum_mul_safe(x,y) ? make_fixnum(x*y) : fixnum_times(x,y);}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_times(object x,object y) {return iif2(x,y) ? safe_mul(fif(x),fif(y)) : number_times(x,y);}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_plus(object x,object y) {return iif2(x,y) ? make_fixnum(fif(x)+fif(y)) : number_plus(x,y);}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_minus(object x,object y) {return iif2(x,y) ? make_fixnum(fif(x)-fif(y)) : number_minus(x,y);}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_negate(object x) {return iif(x) ? make_fixnum(-fif(x)) : number_negate(x);}
|
|
|
385abae |
|
|
|
385abae |
#define BOOLCLR 0
|
|
|
385abae |
@@ -116,7 +116,7 @@ immnum_negate(object x) {return iif(x) ?
|
|
|
385abae |
#define BOOLORC1 015
|
|
|
385abae |
#define BOOLORC2 013
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline fixnum
|
|
|
385abae |
+INLINE fixnum
|
|
|
385abae |
fixnum_boole(fixnum op,fixnum x,fixnum y) {
|
|
|
385abae |
switch(op) {
|
|
|
385abae |
case BOOLCLR: return 0;
|
|
|
385abae |
@@ -139,7 +139,7 @@ fixnum_boole(fixnum op,fixnum x,fixnum y
|
|
|
385abae |
return 0;/*FIXME error*/
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_boole(fixnum o,object x,object y) {return iif2(x,y) ? mif(fixnum_boole(o,fif(x),fif(y))) : log_op2(o,x,y);}
|
|
|
385abae |
|
|
|
385abae |
#define immnum_bool(o,x,y) immnum_boole(fixint(o),x,y)
|
|
|
385abae |
@@ -156,93 +156,93 @@ immnum_boole(fixnum o,object x,object y)
|
|
|
385abae |
#define immnum_orc1(x,y) immnum_boole(BOOLORC1,x,y)
|
|
|
385abae |
#define immnum_orc2(x,y) immnum_boole(BOOLORC2,x,y)
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline fixnum
|
|
|
385abae |
+INLINE fixnum
|
|
|
385abae |
fixnum_div(fixnum x,fixnum y,fixnum d) {
|
|
|
385abae |
fixnum z=x/y;
|
|
|
385abae |
if (d && x!=y*z && (x*d>0 ? y>0 : y<0))
|
|
|
385abae |
z+=d;
|
|
|
385abae |
return z;
|
|
|
385abae |
}
|
|
|
385abae |
-EXTER inline fixnum
|
|
|
385abae |
+INLINE fixnum
|
|
|
385abae |
fixnum_rem(fixnum x,fixnum y,fixnum d) {
|
|
|
385abae |
fixnum z=x%y;
|
|
|
385abae |
if (d && z && (x*d>0 ? y>0 : y<0))
|
|
|
385abae |
z+=y;
|
|
|
385abae |
return z;
|
|
|
385abae |
}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_truncate(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_div(fif(x),fif(y),0)) : (intdivrem(x,y,0,&x,NULL),x);}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_floor(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_div(fif(x),fif(y),-1)) : (intdivrem(x,y,-1,&x,NULL),x);}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_ceiling(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_div(fif(x),fif(y),1)) : (intdivrem(x,y,1,&x,NULL),x);}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_mod(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_rem(fif(x),fif(y),-1)) : (intdivrem(x,y,-1,NULL,&y),y);}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_rem(object x,object y) {return iif2(x,y)&&y!=make_fixnum(0) ? mif(fixnum_rem(fif(x),fif(y),0)) : (intdivrem(x,y,0,NULL,&y),y);}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline fixnum
|
|
|
385abae |
+INLINE fixnum
|
|
|
385abae |
fixnum_rshft(fixnum x,fixnum y) {
|
|
|
385abae |
return y>=sizeof(x)*8 ? (x<0 ? -1 : 0) : x>>y;
|
|
|
385abae |
}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
fixnum_lshft(fixnum x,fixnum y) {
|
|
|
385abae |
return clz(labs(x))>y ? make_fixnum(x<
|
|
|
385abae |
}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
fixnum_shft(fixnum x,fixnum y) {
|
|
|
385abae |
return y<0 ? make_fixnum(fixnum_rshft(x,-y)) : fixnum_lshft(x,y);
|
|
|
385abae |
}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_shft(object x,object y) {return iif2(x,y) ? fixnum_shft(fif(x),fif(y)) : integer_shift(x,y);}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
fixnum_bitp(fixnum p,fixnum x) {return fixnum_rshft(x,p)&0x1;}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_bitp(object x,object y) {return iif2(x,y) ? fixnum_bitp(fif(x),fif(y)) : integer_bitp(x,y);}
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
#define immnum_comp(x,y,c) iif2(x,y) ? (x c y) : (number_compare(x,y) c 0)
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_lt(object x,object y) {return immnum_comp(x,y,<);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_le(object x,object y) {return immnum_comp(x,y,<=);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_eq(object x,object y) {return immnum_comp(x,y,==);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_ne(object x,object y) {return immnum_comp(x,y,!=);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_gt(object x,object y) {return immnum_comp(x,y,>);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_ge(object x,object y) {return immnum_comp(x,y,>=);}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_minusp(object x) {return iif(x) ? ((ufixnum)x)<((ufixnum)make_fixnum(0)) : number_minusp(x);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_plusp(object x) {return iif(x) ? ((ufixnum)x)>((ufixnum)make_fixnum(0)) : number_plusp(x);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_zerop(object x) {return iif(x) ? ((ufixnum)x)==((ufixnum)make_fixnum(0)) : number_zerop(x);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_evenp(object x) {return iif(x) ? !(((ufixnum)x)&0x1) : number_evenp(x);}
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_oddp(object x) {return iif(x) ? (((ufixnum)x)&0x1) : number_oddp(x);}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_signum(object x) {
|
|
|
385abae |
ufixnum ux=(ufixnum)x,uz=((ufixnum)make_fixnum(0));
|
|
|
385abae |
return iif(x) ? (ux
|
|
|
385abae |
}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_abs(object x) {return iif(x) ? make_fixnum(labs(fif(x))) : number_abs(x);}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline fixnum
|
|
|
385abae |
+INLINE fixnum
|
|
|
385abae |
fixnum_ldb(fixnum s,fixnum p,fixnum i) {
|
|
|
385abae |
return ((1UL<
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_ldb(object x,object i) {
|
|
|
385abae |
if (iif(i))
|
|
|
385abae |
if (consp(x)) {
|
|
|
385abae |
@@ -256,7 +256,7 @@ immnum_ldb(object x,object i) {
|
|
|
385abae |
return number_ldb(x,i);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_ldbt(object x,object i) {
|
|
|
385abae |
if (iif(i))
|
|
|
385abae |
if (consp(x)) {
|
|
|
385abae |
@@ -270,13 +270,13 @@ immnum_ldbt(object x,object i) {
|
|
|
385abae |
return number_ldbt(x,i)!=Cnil;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline fixnum
|
|
|
385abae |
+INLINE fixnum
|
|
|
385abae |
fixnum_dpb(fixnum s,fixnum p,fixnum n,fixnum i) {
|
|
|
385abae |
fixnum z=(1UL<
|
|
|
385abae |
return (i&~(z<
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_dpb(object n,object x,object i) {
|
|
|
385abae |
if (iif2(n,i))
|
|
|
385abae |
if (consp(x)) {
|
|
|
385abae |
@@ -290,13 +290,13 @@ immnum_dpb(object n,object x,object i) {
|
|
|
385abae |
return number_dpb(n,x,i);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline fixnum
|
|
|
385abae |
+INLINE fixnum
|
|
|
385abae |
fixnum_dpf(fixnum s,fixnum p,fixnum n,fixnum i) {
|
|
|
385abae |
fixnum z=((1UL<
|
|
|
385abae |
return (i&~z)|(n&z);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_dpf(object n,object x,object i) {
|
|
|
385abae |
if (iif2(n,i))
|
|
|
385abae |
if (consp(x)) {
|
|
|
385abae |
@@ -310,15 +310,15 @@ immnum_dpf(object n,object x,object i) {
|
|
|
385abae |
return number_dpf(n,x,i);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_max(object x,object y) {return iif2(x,y) ? ((ufixnum)x>=(ufixnum)y ? x : y) : (number_compare(x,y)>=0?x:y);}
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_min(object x,object y) {return iif2(x,y) ? ((ufixnum)x<=(ufixnum)y ? x : y) : (number_compare(x,y)<=0?x:y);}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline bool
|
|
|
385abae |
+INLINE bool
|
|
|
385abae |
immnum_logt(object x,object y) {return iif2(x,y) ? fixnum_boole(BOOLAND,fif(x),fif(y))!=0 : !number_zerop(log_op2(BOOLAND,x,y));}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline fixnum
|
|
|
385abae |
+INLINE fixnum
|
|
|
385abae |
fixnum_gcd(fixnum x,fixnum y) {
|
|
|
385abae |
|
|
|
385abae |
fixnum t;
|
|
|
385abae |
@@ -343,16 +343,16 @@ fixnum_gcd(fixnum x,fixnum y) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_gcd(object x,object y) {return iif2(x,y) ? mif(fixnum_gcd(labs(fif(x)),labs(fif(y)))) : get_gcd(x,y);}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
fixnum_lcm(fixnum x,fixnum y) {
|
|
|
385abae |
fixnum g=fixnum_gcd(x,y);
|
|
|
385abae |
return g ? safe_mul_abs(x,fixnum_div(y,g,0)) : make_fixnum(0);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline object
|
|
|
385abae |
+INLINE object
|
|
|
385abae |
immnum_lcm(object x,object y) {return iif2(x,y) ? fixnum_lcm(labs(fif(x)),labs(fif(y))) : get_lcm(x,y);}
|
|
|
385abae |
|
|
|
385abae |
#endif
|
|
|
385abae |
--- gcl-2.6.12.orig/h/include.h
|
|
|
385abae |
+++ gcl-2.6.12/h/include.h
|
|
|
385abae |
@@ -87,12 +87,6 @@ Foundation, 675 Mass Ave, Cambridge, MA
|
|
|
385abae |
#define isalphanum(x) isalnum(x)
|
|
|
385abae |
#endif
|
|
|
385abae |
|
|
|
385abae |
-#ifdef IN_MAIN
|
|
|
385abae |
-#define EXTER
|
|
|
385abae |
-#else
|
|
|
385abae |
-#define EXTER extern
|
|
|
385abae |
-#endif
|
|
|
385abae |
-
|
|
|
385abae |
#if defined(GMP) || defined(NEED_MP_H)
|
|
|
385abae |
#include "../h/mp.h"
|
|
|
385abae |
#endif
|
|
|
385abae |
--- gcl-2.6.12.orig/h/notcomp.h
|
|
|
385abae |
+++ gcl-2.6.12/h/notcomp.h
|
|
|
385abae |
@@ -28,10 +28,7 @@ EXTER long real_maxpage;
|
|
|
385abae |
char *getenv();
|
|
|
385abae |
EXTER char *this_lisp;
|
|
|
385abae |
|
|
|
385abae |
-#ifndef IN_MAIN
|
|
|
385abae |
-EXTER
|
|
|
385abae |
-char stdin_buf[], stdout_buf[];
|
|
|
385abae |
-#endif
|
|
|
385abae |
+EXTER char stdin_buf[],stdout_buf[];
|
|
|
385abae |
|
|
|
385abae |
EXTER object user_package;
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/h/page.h
|
|
|
385abae |
+++ gcl-2.6.12/h/page.h
|
|
|
385abae |
@@ -106,7 +106,7 @@ extern fixnum writable_pages;
|
|
|
385abae |
EXTER long first_data_page,real_maxpage,phys_pages,available_pages;
|
|
|
385abae |
EXTER void *data_start,*initial_sbrk;
|
|
|
385abae |
|
|
|
385abae |
-#if !defined(IN_MAIN) && defined(SGC)
|
|
|
385abae |
+#if defined(SGC)
|
|
|
385abae |
#include "writable.h"
|
|
|
385abae |
#endif
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/h/protoize.h
|
|
|
385abae |
+++ gcl-2.6.12/h/protoize.h
|
|
|
385abae |
@@ -1,13 +1,12 @@
|
|
|
385abae |
/* alloc.c:89:OF */ extern void *alloc_page (long n); /* (n) int n; */
|
|
|
385abae |
-/* alloc.c:149:OF */ inline void add_page_to_freelist (char *p, struct typemanager *tm); /* (p, tm) char *p; struct typemanager *tm; */
|
|
|
385abae |
/* alloc.c:196:OF */ extern object type_name (int t); /* (t) int t; */
|
|
|
385abae |
-/* alloc.c:213:OF */ inline object alloc_object (enum type t); /* (t) enum type t; */
|
|
|
385abae |
-/* alloc.c:213:OF */ inline void add_pages(struct typemanager *,fixnum);
|
|
|
385abae |
-/* alloc.c:296:OF */ extern inline object make_cons (object a, object d); /* (a, d) object a; object d; */
|
|
|
385abae |
+/* alloc.c:213:OF */ object alloc_object (enum type t); /* (t) enum type t; */
|
|
|
385abae |
+/* alloc.c:213:OF */ void add_pages(struct typemanager *,fixnum);
|
|
|
385abae |
+/* alloc.c:296:OF */ extern object make_cons (object a, object d); /* (a, d) object a; object d; */
|
|
|
385abae |
/* alloc.c:364:OF */ extern object on_stack_cons (object x, object y); /* (x, y) object x; object y; */
|
|
|
385abae |
/* alloc.c:376:OF */ extern object fSallocated (object typ); /* (typ) object typ; */
|
|
|
385abae |
/* alloc.c:401:OF */ extern object fSreset_number_used (object typ); /* (typ) object typ; */
|
|
|
385abae |
-/* alloc.c:480:OF */ extern inline void insert_contblock (void *p, ufixnum s); /* (p, s) char *p; int s; */
|
|
|
385abae |
+/* alloc.c:480:OF */ extern void insert_contblock (void *p, ufixnum s); /* (p, s) char *p; int s; */
|
|
|
385abae |
/* alloc.c:480:OF */ extern void insert_maybe_sgc_contblock (char *p, int s); /* (p, s) char *p; int s; */
|
|
|
385abae |
/* alloc.c:611:OF */ extern void set_maxpage (void); /* () */
|
|
|
385abae |
/* alloc.c:635:OF */ extern void gcl_init_alloc (void *); /* () */
|
|
|
385abae |
@@ -1841,43 +1840,40 @@ struct htent *gethash(object,object);
|
|
|
385abae |
int
|
|
|
385abae |
update_real_maxpage(void);
|
|
|
385abae |
|
|
|
385abae |
-inline fixnum
|
|
|
385abae |
+fixnum
|
|
|
385abae |
set_tm_maxpage(struct typemanager *,fixnum);
|
|
|
385abae |
|
|
|
385abae |
void
|
|
|
385abae |
init_gmp_rnd_state(__gmp_randstate_struct *);
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
-set_sgc_bit(struct pageinfo *,void *);
|
|
|
385abae |
-
|
|
|
385abae |
void
|
|
|
385abae |
reinit_gmp(void);
|
|
|
385abae |
|
|
|
385abae |
object
|
|
|
385abae |
mod(object,object);
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+void
|
|
|
385abae |
intdivrem(object,object,fixnum,object *,object *);
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
integer_count(object);
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
integer_length(object);
|
|
|
385abae |
|
|
|
385abae |
-inline bool
|
|
|
385abae |
+bool
|
|
|
385abae |
integer_bitp(object,object);
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
fixnum_times(fixnum,fixnum);
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
log_op2(fixnum,object,object);
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
fixnum_big_shift(fixnum,fixnum);
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
integer_shift(object,object);
|
|
|
385abae |
|
|
|
385abae |
object
|
|
|
385abae |
@@ -1921,22 +1917,19 @@ sigint(void);
|
|
|
385abae |
void
|
|
|
385abae |
allocate_code_block_reserve(void);
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
-resize_hole(ufixnum,enum type);
|
|
|
385abae |
-
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+void *
|
|
|
385abae |
alloc_contblock_no_gc(size_t);
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+void
|
|
|
385abae |
reset_contblock_freelist(void);
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+void
|
|
|
385abae |
empty_relblock(void);
|
|
|
385abae |
|
|
|
385abae |
fixnum
|
|
|
385abae |
check_avail_pages(void);
|
|
|
385abae |
|
|
|
385abae |
-inline int
|
|
|
385abae |
+int
|
|
|
385abae |
mbrk(void *);
|
|
|
385abae |
|
|
|
385abae |
void
|
|
|
385abae |
@@ -1948,5 +1941,8 @@ alloc_code_space(size_t);
|
|
|
385abae |
object
|
|
|
385abae |
fSmake_vector1_2(fixnum,fixnum,object,object);
|
|
|
385abae |
|
|
|
385abae |
-inline struct pageinfo *
|
|
|
385abae |
+struct pageinfo *
|
|
|
385abae |
get_pageinfo(void *);
|
|
|
385abae |
+
|
|
|
385abae |
+void
|
|
|
385abae |
+add_page_to_freelist(char *, struct typemanager *);
|
|
|
385abae |
--- gcl-2.6.12.orig/h/writable.h
|
|
|
385abae |
+++ gcl-2.6.12/h/writable.h
|
|
|
385abae |
@@ -1,7 +1,7 @@
|
|
|
385abae |
EXTER fixnum last_page;
|
|
|
385abae |
EXTER int last_result;
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline int
|
|
|
385abae |
+INLINE int
|
|
|
385abae |
set_writable(fixnum i,bool m) {
|
|
|
385abae |
|
|
|
385abae |
fixnum j;
|
|
|
385abae |
@@ -32,7 +32,7 @@ set_writable(fixnum i,bool m) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline int
|
|
|
385abae |
+INLINE int
|
|
|
385abae |
is_writable(fixnum i) {
|
|
|
385abae |
|
|
|
385abae |
fixnum j;
|
|
|
385abae |
@@ -51,7 +51,7 @@ is_writable(fixnum i) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-EXTER inline int
|
|
|
385abae |
+INLINE int
|
|
|
385abae |
is_writable_cached(fixnum i) {
|
|
|
385abae |
|
|
|
385abae |
if (last_page==i)
|
|
|
385abae |
--- gcl-2.6.12.orig/makefile
|
|
|
385abae |
+++ gcl-2.6.12/makefile
|
|
|
385abae |
@@ -265,7 +265,7 @@ $(HDIR)new_decl.h:
|
|
|
385abae |
|
|
|
385abae |
$(HDIR)mcompdefs.h: $(HDIR)compdefs.h $(HDIR)new_decl.h
|
|
|
385abae |
$(AWK) 'BEGIN {print "#include \"include.h\"";print "#include \"cmponly.h\"";print "---"} {a=$$1;gsub("\\.\\.\\.","",a);print "\"#define " $$1 "\" " a}' $< |\
|
|
|
385abae |
- $(CC) -E -I./$(HDIR) - |\
|
|
|
385abae |
+ $(CC) -E -P -I./$(HDIR) - |\
|
|
|
385abae |
$(AWK) '/^\-\-\-$$/ {i=1;next} {if (!i) next} {gsub("\"","");print}' >$@
|
|
|
385abae |
|
|
|
385abae |
$(HDIR)cmpinclude.h: $(HDIR)mcompdefs.h $(CMPINCLUDE_FILES) $(HDIR)config.h
|
|
|
385abae |
--- gcl-2.6.12.orig/o/alloc.c
|
|
|
385abae |
+++ gcl-2.6.12/o/alloc.c
|
|
|
385abae |
@@ -134,7 +134,7 @@ acomp(const void *v1,const void *v2) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline struct pageinfo *
|
|
|
385abae |
+struct pageinfo *
|
|
|
385abae |
get_pageinfo(void *x) {
|
|
|
385abae |
|
|
|
385abae |
struct pageinfo **pp=bsearchleq(&x,contblock_array->v.v_self,contblock_array->v.v_fillp,sizeof(*contblock_array->v.v_self),acomp);
|
|
|
385abae |
@@ -144,7 +144,7 @@ get_pageinfo(void *x) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+static inline void
|
|
|
385abae |
add_page_to_contblock_list(void *p,fixnum m) {
|
|
|
385abae |
|
|
|
385abae |
struct pageinfo *pp=pageinfo(p);
|
|
|
385abae |
@@ -176,7 +176,70 @@ icomp(const void *v1,const void *v2) {
|
|
|
385abae |
return *f1<*f2 ? -1 : *f1==*f2 ? 0 : +1;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+
|
|
|
385abae |
+void
|
|
|
385abae |
+add_page_to_freelist(char *p, struct typemanager *tm) {
|
|
|
385abae |
+
|
|
|
385abae |
+ short t,size;
|
|
|
385abae |
+ long i=tm->tm_nppage,fw;
|
|
|
385abae |
+ object x,f;
|
|
|
385abae |
+ struct pageinfo *pp;
|
|
|
385abae |
+
|
|
|
385abae |
+ t=tm->tm_type;
|
|
|
385abae |
+
|
|
|
385abae |
+ size=tm->tm_size;
|
|
|
385abae |
+ f=tm->tm_free;
|
|
|
385abae |
+ pp=pageinfo(p);
|
|
|
385abae |
+ bzero(pp,sizeof(*pp));
|
|
|
385abae |
+ pp->type=t;
|
|
|
385abae |
+ pp->magic=PAGE_MAGIC;
|
|
|
385abae |
+
|
|
|
385abae |
+ if (cell_list_head==NULL)
|
|
|
385abae |
+ cell_list_tail=cell_list_head=pp;
|
|
|
385abae |
+ else if (pp > cell_list_tail) {
|
|
|
385abae |
+ cell_list_tail->next=pp;
|
|
|
385abae |
+ cell_list_tail=pp;
|
|
|
385abae |
+ }
|
|
|
385abae |
+
|
|
|
385abae |
+ x= (object)pagetochar(page(p));
|
|
|
385abae |
+ /* set_type_of(x,t); */
|
|
|
385abae |
+ make_free(x);
|
|
|
385abae |
+
|
|
|
385abae |
+#ifdef SGC
|
|
|
385abae |
+
|
|
|
385abae |
+ if (sgc_enabled && tm->tm_sgc)
|
|
|
385abae |
+ pp->sgc_flags=SGC_PAGE_FLAG;
|
|
|
385abae |
+
|
|
|
385abae |
+#ifndef SGC_WHOLE_PAGE
|
|
|
385abae |
+ if (TYPEWORD_TYPE_P(pp->type))
|
|
|
385abae |
+ x->d.s=(sgc_enabled && tm->tm_sgc) ? SGC_RECENT : SGC_NORMAL;
|
|
|
385abae |
+#endif
|
|
|
385abae |
+
|
|
|
385abae |
+ /* array headers must be always writable, since a write to the
|
|
|
385abae |
+ body does not touch the header. It may be desirable if there
|
|
|
385abae |
+ are many arrays in a system to make the headers not writable,
|
|
|
385abae |
+ but just SGC_TOUCH the header each time you write to it. this
|
|
|
385abae |
+ is what is done with t_structure */
|
|
|
385abae |
+ if (t==(tm_of(t_array)->tm_type))
|
|
|
385abae |
+ pp->sgc_flags|=SGC_PERM_WRITABLE;
|
|
|
385abae |
+
|
|
|
385abae |
+#endif
|
|
|
385abae |
+
|
|
|
385abae |
+ fw= *(fixnum *)x;
|
|
|
385abae |
+ while (--i >= 0) {
|
|
|
385abae |
+ *(fixnum *)x=fw;
|
|
|
385abae |
+ SET_LINK(x,f);
|
|
|
385abae |
+ f=x;
|
|
|
385abae |
+ x= (object) ((char *)x + size);
|
|
|
385abae |
+ }
|
|
|
385abae |
+
|
|
|
385abae |
+ tm->tm_free=f;
|
|
|
385abae |
+ tm->tm_nfree += tm->tm_nppage;
|
|
|
385abae |
+ tm->tm_npage++;
|
|
|
385abae |
+
|
|
|
385abae |
+}
|
|
|
385abae |
+
|
|
|
385abae |
+static inline void
|
|
|
385abae |
maybe_reallocate_page(struct typemanager *ntm,ufixnum count) {
|
|
|
385abae |
|
|
|
385abae |
void **y,**n;
|
|
|
385abae |
@@ -248,7 +311,7 @@ int reserve_pages_for_signal_handler=30;
|
|
|
385abae |
reserve_pages_for_signal_handler pages on hand in the hole
|
|
|
385abae |
*/
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+void
|
|
|
385abae |
empty_relblock(void) {
|
|
|
385abae |
|
|
|
385abae |
object o=sSAleaf_collection_thresholdA->s.s_dbind;
|
|
|
385abae |
@@ -262,7 +325,7 @@ empty_relblock(void) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+static inline void
|
|
|
385abae |
resize_hole(ufixnum hp,enum type tp) {
|
|
|
385abae |
|
|
|
385abae |
char *new_start=heap_end+hp*PAGESIZE;
|
|
|
385abae |
@@ -283,7 +346,7 @@ resize_hole(ufixnum hp,enum type tp) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+void *
|
|
|
385abae |
alloc_page(long n) {
|
|
|
385abae |
|
|
|
385abae |
bool s=n<0;
|
|
|
385abae |
@@ -332,7 +395,7 @@ alloc_page(long n) {
|
|
|
385abae |
|
|
|
385abae |
struct pageinfo *cell_list_head=NULL,*cell_list_tail=NULL;;
|
|
|
385abae |
|
|
|
385abae |
-inline ufixnum
|
|
|
385abae |
+static inline ufixnum
|
|
|
385abae |
sum_maxpages(void) {
|
|
|
385abae |
|
|
|
385abae |
ufixnum i,j;
|
|
|
385abae |
@@ -352,7 +415,7 @@ check_avail_pages(void) {
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
-inline fixnum
|
|
|
385abae |
+fixnum
|
|
|
385abae |
set_tm_maxpage(struct typemanager *tm,fixnum n) {
|
|
|
385abae |
|
|
|
385abae |
fixnum r=tm->tm_type==t_relocatable,j=tm->tm_maxpage,z=(n-j)*(r ? 2 : 1);
|
|
|
385abae |
@@ -365,69 +428,6 @@ set_tm_maxpage(struct typemanager *tm,fi
|
|
|
385abae |
return 1;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-
|
|
|
385abae |
-inline void
|
|
|
385abae |
-add_page_to_freelist(char *p, struct typemanager *tm) {
|
|
|
385abae |
-
|
|
|
385abae |
- short t,size;
|
|
|
385abae |
- long i=tm->tm_nppage,fw;
|
|
|
385abae |
- object x,f;
|
|
|
385abae |
- struct pageinfo *pp;
|
|
|
385abae |
-
|
|
|
385abae |
- t=tm->tm_type;
|
|
|
385abae |
-
|
|
|
385abae |
- size=tm->tm_size;
|
|
|
385abae |
- f=tm->tm_free;
|
|
|
385abae |
- pp=pageinfo(p);
|
|
|
385abae |
- bzero(pp,sizeof(*pp));
|
|
|
385abae |
- pp->type=t;
|
|
|
385abae |
- pp->magic=PAGE_MAGIC;
|
|
|
385abae |
-
|
|
|
385abae |
- if (cell_list_head==NULL)
|
|
|
385abae |
- cell_list_tail=cell_list_head=pp;
|
|
|
385abae |
- else if (pp > cell_list_tail) {
|
|
|
385abae |
- cell_list_tail->next=pp;
|
|
|
385abae |
- cell_list_tail=pp;
|
|
|
385abae |
- }
|
|
|
385abae |
-
|
|
|
385abae |
- x= (object)pagetochar(page(p));
|
|
|
385abae |
- /* set_type_of(x,t); */
|
|
|
385abae |
- make_free(x);
|
|
|
385abae |
-
|
|
|
385abae |
-#ifdef SGC
|
|
|
385abae |
-
|
|
|
385abae |
- if (sgc_enabled && tm->tm_sgc)
|
|
|
385abae |
- pp->sgc_flags=SGC_PAGE_FLAG;
|
|
|
385abae |
-
|
|
|
385abae |
-#ifndef SGC_WHOLE_PAGE
|
|
|
385abae |
- if (TYPEWORD_TYPE_P(pp->type))
|
|
|
385abae |
- x->d.s=(sgc_enabled && tm->tm_sgc) ? SGC_RECENT : SGC_NORMAL;
|
|
|
385abae |
-#endif
|
|
|
385abae |
-
|
|
|
385abae |
- /* array headers must be always writable, since a write to the
|
|
|
385abae |
- body does not touch the header. It may be desirable if there
|
|
|
385abae |
- are many arrays in a system to make the headers not writable,
|
|
|
385abae |
- but just SGC_TOUCH the header each time you write to it. this
|
|
|
385abae |
- is what is done with t_structure */
|
|
|
385abae |
- if (t==(tm_of(t_array)->tm_type))
|
|
|
385abae |
- pp->sgc_flags|=SGC_PERM_WRITABLE;
|
|
|
385abae |
-
|
|
|
385abae |
-#endif
|
|
|
385abae |
-
|
|
|
385abae |
- fw= *(fixnum *)x;
|
|
|
385abae |
- while (--i >= 0) {
|
|
|
385abae |
- *(fixnum *)x=fw;
|
|
|
385abae |
- SET_LINK(x,f);
|
|
|
385abae |
- f=x;
|
|
|
385abae |
- x= (object) ((char *)x + size);
|
|
|
385abae |
- }
|
|
|
385abae |
-
|
|
|
385abae |
- tm->tm_free=f;
|
|
|
385abae |
- tm->tm_nfree += tm->tm_nppage;
|
|
|
385abae |
- tm->tm_npage++;
|
|
|
385abae |
-
|
|
|
385abae |
-}
|
|
|
385abae |
-
|
|
|
385abae |
object
|
|
|
385abae |
type_name(int t) {
|
|
|
385abae |
return make_simple_string(tm_table[(int)t].tm_name+1);
|
|
|
385abae |
@@ -435,7 +435,7 @@ type_name(int t) {
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
static void
|
|
|
385abae |
-call_after_gbc_hook(t) {
|
|
|
385abae |
+call_after_gbc_hook(int t) {
|
|
|
385abae |
if (sSAafter_gbc_hookA && sSAafter_gbc_hookA->s.s_dbind!= Cnil) {
|
|
|
385abae |
set_up_string_register(tm_table[(int)t].tm_name+1);
|
|
|
385abae |
ifuncall1(sSAafter_gbc_hookA->s.s_dbind,intern(string_register,system_package));
|
|
|
385abae |
@@ -536,7 +536,7 @@ rebalance_maxpages(struct typemanager *m
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline long
|
|
|
385abae |
+long
|
|
|
385abae |
opt_maxpage(struct typemanager *my_tm) {
|
|
|
385abae |
|
|
|
385abae |
double x=0.0,y=0.0,z,r;
|
|
|
385abae |
@@ -707,7 +707,7 @@ find_contblock(ufixnum n,void **p) {
|
|
|
385abae |
return find_cbpp(*p,n);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+void
|
|
|
385abae |
print_cb(int print) {
|
|
|
385abae |
|
|
|
385abae |
struct contblock *cbp,***cbppp,**cbpp=&cb_pointer;
|
|
|
385abae |
@@ -729,7 +729,7 @@ print_cb(int print) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+void
|
|
|
385abae |
insert_contblock(void *p,ufixnum s) {
|
|
|
385abae |
|
|
|
385abae |
struct contblock *cbp=p,**cbpp,***cbppp;
|
|
|
385abae |
@@ -761,7 +761,7 @@ delete_contblock(void *p,struct contbloc
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+void
|
|
|
385abae |
reset_contblock_freelist(void) {
|
|
|
385abae |
|
|
|
385abae |
cb_pointer=NULL;
|
|
|
385abae |
@@ -769,7 +769,7 @@ reset_contblock_freelist(void) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+static inline void *
|
|
|
385abae |
alloc_from_freelist(struct typemanager *tm,fixnum n) {
|
|
|
385abae |
|
|
|
385abae |
void *p;
|
|
|
385abae |
@@ -851,7 +851,7 @@ too_full_p(struct typemanager *tm) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+static inline void *
|
|
|
385abae |
alloc_after_gc(struct typemanager *tm,fixnum n) {
|
|
|
385abae |
|
|
|
385abae |
if (tm->tm_npage+tpage(tm,n)>tm->tm_maxpage && GBC_enable) {
|
|
|
385abae |
@@ -883,7 +883,7 @@ alloc_after_gc(struct typemanager *tm,fi
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+void
|
|
|
385abae |
add_pages(struct typemanager *tm,fixnum m) {
|
|
|
385abae |
|
|
|
385abae |
switch (tm->tm_type) {
|
|
|
385abae |
@@ -923,7 +923,7 @@ add_pages(struct typemanager *tm,fixnum
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+static inline void *
|
|
|
385abae |
alloc_after_adding_pages(struct typemanager *tm,fixnum n) {
|
|
|
385abae |
|
|
|
385abae |
fixnum m=tpage(tm,n);
|
|
|
385abae |
@@ -945,7 +945,7 @@ alloc_after_adding_pages(struct typemana
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+static inline void *
|
|
|
385abae |
alloc_after_reclaiming_pages(struct typemanager *tm,fixnum n) {
|
|
|
385abae |
|
|
|
385abae |
fixnum m=tpage(tm,n),reloc_min;
|
|
|
385abae |
@@ -972,10 +972,10 @@ alloc_after_reclaiming_pages(struct type
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *alloc_mem(struct typemanager *,fixnum);
|
|
|
385abae |
+static inline void *alloc_mem(struct typemanager *,fixnum);
|
|
|
385abae |
|
|
|
385abae |
#ifdef SGC
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+static inline void *
|
|
|
385abae |
alloc_after_turning_off_sgc(struct typemanager *tm,fixnum n) {
|
|
|
385abae |
|
|
|
385abae |
if (!sgc_enabled) return NULL;
|
|
|
385abae |
@@ -985,7 +985,7 @@ alloc_after_turning_off_sgc(struct typem
|
|
|
385abae |
}
|
|
|
385abae |
#endif
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+static inline void *
|
|
|
385abae |
alloc_mem(struct typemanager *tm,fixnum n) {
|
|
|
385abae |
|
|
|
385abae |
void *p;
|
|
|
385abae |
@@ -1007,7 +1007,7 @@ alloc_mem(struct typemanager *tm,fixnum
|
|
|
385abae |
return exhausted_report(tm->tm_type,tm);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
alloc_object(enum type t) {
|
|
|
385abae |
|
|
|
385abae |
object obj;
|
|
|
385abae |
@@ -1022,12 +1022,12 @@ alloc_object(enum type t) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+void *
|
|
|
385abae |
alloc_contblock(size_t n) {
|
|
|
385abae |
return alloc_mem(tm_of(t_contiguous),CEI(n,CPTR_SIZE));
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+void *
|
|
|
385abae |
alloc_contblock_no_gc(size_t n) {
|
|
|
385abae |
|
|
|
385abae |
struct typemanager *tm=tm_of(t_contiguous);
|
|
|
385abae |
@@ -1073,7 +1073,7 @@ alloc_code_space(size_t sz) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+void *
|
|
|
385abae |
alloc_relblock(size_t n) {
|
|
|
385abae |
|
|
|
385abae |
return alloc_mem(tm_of(t_relocatable),CEI(n,PTR_ALIGN));
|
|
|
385abae |
@@ -1089,7 +1089,7 @@ load_cons(object p,object a,object d) {
|
|
|
385abae |
p->c.c_car=a;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
make_cons(object a,object d) {
|
|
|
385abae |
|
|
|
385abae |
static struct typemanager *tm=tm_table+t_cons;/*FIXME*/
|
|
|
385abae |
@@ -1105,7 +1105,7 @@ make_cons(object a,object d) {
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
-inline object on_stack_cons(object x, object y) {
|
|
|
385abae |
+object on_stack_cons(object x, object y) {
|
|
|
385abae |
object p = (object) alloca_val;
|
|
|
385abae |
load_cons(p,x,y);
|
|
|
385abae |
return p;
|
|
|
385abae |
--- gcl-2.6.12.orig/o/gbc.c
|
|
|
385abae |
+++ gcl-2.6.12/o/gbc.c
|
|
|
385abae |
@@ -158,7 +158,7 @@ in_contblock_stack_list(void *p,void ***
|
|
|
385abae |
return a && a[0]==p;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline char
|
|
|
385abae |
+static inline char
|
|
|
385abae |
get_bit(char *v,struct pageinfo *pi,void *x) {
|
|
|
385abae |
void *ve=CB_DATA_START(pi);
|
|
|
385abae |
fixnum off=(x-ve)>>LOG_BYTES_CONTBLOCK,i=off>>LOG_BITS_CHAR,s=off&~(~0UL<
|
|
|
385abae |
@@ -168,7 +168,7 @@ get_bit(char *v,struct pageinfo *pi,void
|
|
|
385abae |
return (v[i]>>s)&0x1;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+static inline void
|
|
|
385abae |
set_bit(char *v,struct pageinfo *pi,void *x) {
|
|
|
385abae |
void *ve=CB_DATA_START(pi);
|
|
|
385abae |
fixnum off=(x-ve)>>LOG_BYTES_CONTBLOCK,i=off>>LOG_BITS_CHAR,s=off&~(~0UL<
|
|
|
385abae |
@@ -183,7 +183,7 @@ set_bit(char *v,struct pageinfo *pi,void
|
|
|
385abae |
#define ptr_get(v,i,s) (v+(((i<
|
|
|
385abae |
#define ptr_set(x,v,i,s) ({fixnum _o=(x-v)>>LOG_BYTES_CONTBLOCK;i=_o>>LOG_BITS_CHAR;s=_o&~(~0UL<
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+static inline void
|
|
|
385abae |
set_bits(char *v,struct pageinfo *pi,void *x1,void *x2) {
|
|
|
385abae |
|
|
|
385abae |
void *ds=CB_DATA_START(pi);
|
|
|
385abae |
@@ -206,7 +206,7 @@ set_bits(char *v,struct pageinfo *pi,voi
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+static inline void *
|
|
|
385abae |
get_bits(char *v,struct pageinfo *pi,void *x) {
|
|
|
385abae |
|
|
|
385abae |
void *ds=CB_DATA_START(pi),*de=CB_DATA_END(pi);
|
|
|
385abae |
@@ -232,42 +232,42 @@ get_bits(char *v,struct pageinfo *pi,voi
|
|
|
385abae |
return ds
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline char
|
|
|
385abae |
+static inline char
|
|
|
385abae |
get_mark_bit(struct pageinfo *pi,void *x) {
|
|
|
385abae |
return get_bit(CB_MARK_START(pi),pi,x);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+static inline void
|
|
|
385abae |
set_mark_bit(struct pageinfo *pi,void *x) {
|
|
|
385abae |
set_bit(CB_MARK_START(pi),pi,x);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+static inline void *
|
|
|
385abae |
get_mark_bits(struct pageinfo *pi,void *x) {
|
|
|
385abae |
return get_bits(CB_MARK_START(pi),pi,x);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+static inline void
|
|
|
385abae |
set_mark_bits(struct pageinfo *pi,void *x1,void *x2) {
|
|
|
385abae |
set_bits(CB_MARK_START(pi),pi,x1,x2);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline char
|
|
|
385abae |
+static inline char
|
|
|
385abae |
get_sgc_bit(struct pageinfo *pi,void *x) {
|
|
|
385abae |
return get_bit(CB_SGCF_START(pi),pi,x);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+static inline void
|
|
|
385abae |
set_sgc_bit(struct pageinfo *pi,void *x) {
|
|
|
385abae |
set_bit(CB_SGCF_START(pi),pi,x);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void *
|
|
|
385abae |
+static inline void *
|
|
|
385abae |
get_sgc_bits(struct pageinfo *pi,void *x) {
|
|
|
385abae |
return get_bits(CB_SGCF_START(pi),pi,x);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+static inline void
|
|
|
385abae |
set_sgc_bits(struct pageinfo *pi,void *x1,void *x2) {
|
|
|
385abae |
set_bits(CB_SGCF_START(pi),pi,x1,x2);
|
|
|
385abae |
}
|
|
|
385abae |
--- gcl-2.6.12.orig/o/gmp_big.c
|
|
|
385abae |
+++ gcl-2.6.12/o/gmp_big.c
|
|
|
385abae |
@@ -93,6 +93,7 @@ object big_fixnum1;
|
|
|
385abae |
void
|
|
|
385abae |
gcl_init_big1(void) {
|
|
|
385abae |
mp_set_memory_functions( gcl_gmp_alloc,gcl_gmp_realloc,gcl_gmp_free);
|
|
|
385abae |
+ jmp_gmp=0;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
#else
|
|
|
385abae |
--- gcl-2.6.12.orig/o/gmp_num_log.c
|
|
|
385abae |
+++ gcl-2.6.12/o/gmp_num_log.c
|
|
|
385abae |
@@ -46,7 +46,7 @@ integer_log_op2(fixnum op,object x,enum
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
log_op2(fixnum op,object x,object y) {
|
|
|
385abae |
|
|
|
385abae |
enum type tx=type_of(x),ty=type_of(y);
|
|
|
385abae |
--- gcl-2.6.12.orig/o/main.c
|
|
|
385abae |
+++ gcl-2.6.12/o/main.c
|
|
|
385abae |
@@ -38,8 +38,6 @@ initlisp(void);
|
|
|
385abae |
static int
|
|
|
385abae |
multiply_stacks(int);
|
|
|
385abae |
|
|
|
385abae |
-#define IN_MAIN
|
|
|
385abae |
-
|
|
|
385abae |
#ifdef KCLOVM
|
|
|
385abae |
#include <ovm/ovm.h>
|
|
|
385abae |
void change_contexts();
|
|
|
385abae |
@@ -47,6 +45,11 @@ int ovm_process_created;
|
|
|
385abae |
void initialize_process();
|
|
|
385abae |
#endif
|
|
|
385abae |
|
|
|
385abae |
+
|
|
|
385abae |
+#define EXTER
|
|
|
385abae |
+#define INLINE
|
|
|
385abae |
+
|
|
|
385abae |
+
|
|
|
385abae |
#include "include.h"
|
|
|
385abae |
#include <signal.h>
|
|
|
385abae |
#include "page.h"
|
|
|
385abae |
@@ -118,7 +121,7 @@ cstack_dir(fixnum j) {
|
|
|
385abae |
|
|
|
385abae |
fixnum log_maxpage_bound=sizeof(fixnum)*8-1;
|
|
|
385abae |
|
|
|
385abae |
-inline int
|
|
|
385abae |
+int
|
|
|
385abae |
mbrk(void *v) {
|
|
|
385abae |
|
|
|
385abae |
ufixnum uv=(ufixnum)v,uc=(ufixnum)sbrk(0),ux,um;
|
|
|
385abae |
@@ -1120,10 +1123,6 @@ init_main(void) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-#ifdef SGC
|
|
|
385abae |
-#include "writable.h"
|
|
|
385abae |
-#endif
|
|
|
385abae |
-
|
|
|
385abae |
#ifdef HAVE_PRINT_INSN_I386
|
|
|
385abae |
|
|
|
385abae |
#include "dis-asm.h"
|
|
|
385abae |
--- gcl-2.6.12.orig/o/makefile
|
|
|
385abae |
+++ gcl-2.6.12/o/makefile
|
|
|
385abae |
@@ -20,7 +20,7 @@ OBJS:=$(addsuffix .o,typespec main alloc
|
|
|
385abae |
num_pred num_comp num_arith num_sfun num_co num_log num_rand earith character sequence list hash\
|
|
|
385abae |
array string regexpr structure toplevel file read backq print format pathname unixfsys unixfasl\
|
|
|
385abae |
error unixtime unixsys unixsave funlink fat_string run_process nfunlink usig usig2 utils makefun\
|
|
|
385abae |
- sockets gmp_wrappers clxsocket init_pari nsocket sfasl prelink)
|
|
|
385abae |
+ sockets clxsocket init_pari nsocket sfasl prelink)
|
|
|
385abae |
OBJS:=$(OBJS) $(RL_OBJS) $(EXTRAS)
|
|
|
385abae |
|
|
|
385abae |
INI_FILES=$(patsubst %.o,%.ini,${OBJS})
|
|
|
385abae |
--- gcl-2.6.12.orig/o/num_arith.c
|
|
|
385abae |
+++ gcl-2.6.12/o/num_arith.c
|
|
|
385abae |
@@ -62,7 +62,7 @@ object fixnum_sub(fixnum i, fixnum j)
|
|
|
385abae |
}
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
fixnum_times(fixnum i, fixnum j) {
|
|
|
385abae |
|
|
|
385abae |
#ifdef HAVE_CLZL
|
|
|
385abae |
--- gcl-2.6.12.orig/o/num_co.c
|
|
|
385abae |
+++ gcl-2.6.12/o/num_co.c
|
|
|
385abae |
@@ -277,7 +277,7 @@ LFD(Ldenominator)(void)
|
|
|
385abae |
vs_base[0] = small_fixnum(1);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline void
|
|
|
385abae |
+void
|
|
|
385abae |
intdivrem(object x,object y,fixnum d,object *q,object *r) {
|
|
|
385abae |
|
|
|
385abae |
enum type tx=type_of(x),ty=type_of(y);
|
|
|
385abae |
--- gcl-2.6.12.orig/o/num_log.c
|
|
|
385abae |
+++ gcl-2.6.12/o/num_log.c
|
|
|
385abae |
@@ -37,12 +37,12 @@ Foundation, 675 Mass Ave, Cambridge, MA
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
fixnum_big_shift(fixnum x,fixnum w) {
|
|
|
385abae |
MPOP(return,shifti,SI_TO_MP(x,big_fixnum1),w);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
integer_fix_shift(object x, fixnum w) {
|
|
|
385abae |
if (type_of(x)==t_fixnum) {
|
|
|
385abae |
fixnum fx=fix(x);
|
|
|
385abae |
@@ -51,7 +51,7 @@ integer_fix_shift(object x, fixnum w) {
|
|
|
385abae |
MPOP(return,shifti,MP(x),w);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
integer_shift(object x,object y) {
|
|
|
385abae |
enum type tx=type_of(x),ty=type_of(y);
|
|
|
385abae |
if (ty==t_fixnum)
|
|
|
385abae |
@@ -66,12 +66,12 @@ integer_shift(object x,object y) {
|
|
|
385abae |
}
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
integer_length(object x) {
|
|
|
385abae |
return make_fixnum(type_of(x)==t_fixnum ? fixnum_length(fix(x)) : MP_SIZE_IN_BASE2(MP(x)));
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+object
|
|
|
385abae |
integer_count(object x) {
|
|
|
385abae |
return make_fixnum(type_of(x)==t_fixnum ? fixnum_count(fix(x)) : MP_BITCOUNT(MP(x)));
|
|
|
385abae |
}
|
|
|
385abae |
@@ -120,7 +120,7 @@ LFD(Lboole)(void)
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline bool
|
|
|
385abae |
+bool
|
|
|
385abae |
integer_bitp(object p,object x) {
|
|
|
385abae |
enum type tp=type_of(p),tx=type_of(x);
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/o/num_sfun.c
|
|
|
385abae |
+++ gcl-2.6.12/o/num_sfun.c
|
|
|
385abae |
@@ -94,7 +94,7 @@ number_exp(object x)
|
|
|
385abae |
}
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+static inline object
|
|
|
385abae |
number_fix_iexpt(object x,fixnum y,fixnum ly,fixnum j) {
|
|
|
385abae |
object z;
|
|
|
385abae |
|
|
|
385abae |
@@ -103,7 +103,7 @@ number_fix_iexpt(object x,fixnum y,fixnu
|
|
|
385abae |
return fixnum_bitp(j,y) ? number_times(x,z) : z;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+static inline object
|
|
|
385abae |
number_big_iexpt(object x,object y,fixnum ly,fixnum j) {
|
|
|
385abae |
object z;
|
|
|
385abae |
|
|
|
385abae |
@@ -113,7 +113,7 @@ number_big_iexpt(object x,object y,fixnu
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+static inline object
|
|
|
385abae |
number_zero_expt(object x,bool promote_short_p) {
|
|
|
385abae |
|
|
|
385abae |
switch (type_of(x)) {
|
|
|
385abae |
@@ -135,7 +135,7 @@ number_zero_expt(object x,bool promote_s
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+static inline object
|
|
|
385abae |
number_ui_expt(object x,fixnum fy) {
|
|
|
385abae |
|
|
|
385abae |
switch (type_of(x)) {
|
|
|
385abae |
@@ -173,17 +173,17 @@ number_ui_expt(object x,fixnum fy) {
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+static inline object
|
|
|
385abae |
number_ump_expt(object x,object y) {
|
|
|
385abae |
return number_big_iexpt(x,y,fix(integer_length(y)),0);
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+static inline object
|
|
|
385abae |
number_log_expt(object x,object y) {
|
|
|
385abae |
return number_zerop(y) ? number_zero_expt(y,type_of(x)==t_longfloat) : number_exp(number_times(number_nlog(x),y));
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+static inline object
|
|
|
385abae |
number_invert(object x,object y,object z) {
|
|
|
385abae |
|
|
|
385abae |
switch (type_of(z)) {
|
|
|
385abae |
@@ -198,7 +198,7 @@ number_invert(object x,object y,object z
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
|
|
|
385abae |
-inline object
|
|
|
385abae |
+static inline object
|
|
|
385abae |
number_si_expt(object x,object y) {
|
|
|
385abae |
switch (type_of(y)) {
|
|
|
385abae |
case t_fixnum:
|
|
|
385abae |
--- gcl-2.6.12.orig/o/package.d
|
|
|
385abae |
+++ gcl-2.6.12/o/package.d
|
|
|
385abae |
@@ -114,7 +114,7 @@ static int package_sizes[]={
|
|
|
385abae |
32749, 65521, 131071, 262139, 524287, 1048573};
|
|
|
385abae |
|
|
|
385abae |
static int
|
|
|
385abae |
-suitable_package_size(n)
|
|
|
385abae |
+suitable_package_size(int n)
|
|
|
385abae |
{int *i=package_sizes;
|
|
|
385abae |
if (n>= 1000000) return 1048573;
|
|
|
385abae |
while(*i < n) { i++;}
|