1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-22 20:40:29 +02:00

* inline.h: #include "libguile/__scm.h" at the top. Change code

to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
what to do instead of creating a new public #define.  Rename usage
of USE_COOP_THREADS to SCM_USE_COOP_THREADS.  Rename usage of
USE_NULL_THREADS to SCM_USE_NULL_THREADS.  Rename usage of
USE_COPT_THREADS to SCM_USE_COPT_THREADS.

* inline.c: rearrange handling -- now we just #define
SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
"libguile/inline.h".  scmconfig.h will define SCM_C_INLINE as
appropriate, and we use that in inline.h along with the above
define to determine how to respond.
This commit is contained in:
Rob Browning 2003-03-25 23:56:55 +00:00
parent b11761f2ca
commit 60e7529ae4

View file

@ -49,10 +49,10 @@
"inline.c". "inline.c".
*/ */
#include "libguile/__scm.h"
#if (SCM_DEBUG_CELL_ACCESSES == 1) #if (SCM_DEBUG_CELL_ACCESSES == 1)
#include <stdio.h> #include <stdio.h>
#endif #endif
#include "libguile/pairs.h" #include "libguile/pairs.h"
@ -64,18 +64,21 @@ SCM_API SCM scm_cell (scm_t_bits car, scm_t_bits cdr);
SCM_API SCM scm_double_cell (scm_t_bits car, scm_t_bits cbr, SCM_API SCM scm_double_cell (scm_t_bits car, scm_t_bits cbr,
scm_t_bits ccr, scm_t_bits cdr); scm_t_bits ccr, scm_t_bits cdr);
#ifdef HAVE_INLINE
#ifndef EXTERN_INLINE
#define EXTERN_INLINE extern inline #if defined SCM_C_INLINE || defined SCM_INLINE_C_INCLUDING_INLINE_H
#endif /* either inlining, or being included from inline.c. We use (and
repeat) this long #if test here and below so that we don't have to
introduce any extraneous symbols into the public namespace. We
only need SCM_C_INLINE to be seen publically . */
extern unsigned scm_newcell2_count; extern unsigned scm_newcell2_count;
extern unsigned scm_newcell_count; extern unsigned scm_newcell_count;
#if defined SCM_C_INLINE && ! defined SCM_INLINE_C_INCLUDING_INLINE_H
/* definitely inlining */
EXTERN_INLINE extern SCM_C_INLINE
#endif
SCM SCM
scm_cell (scm_t_bits car, scm_t_bits cdr) scm_cell (scm_t_bits car, scm_t_bits cdr)
{ {
@ -146,7 +149,7 @@ scm_cell (scm_t_bits car, scm_t_bits cdr)
SCM_GC_SET_CELL_WORD (z, 0, car); SCM_GC_SET_CELL_WORD (z, 0, car);
#if 0 /*fixme* Hmm... let's consider this later. */ #if 0 /*fixme* Hmm... let's consider this later. */
#if !defined(USE_COOP_THREADS) && !defined(USE_NULL_THREADS) && !defined(USE_COPT_THREADS) #if !defined(SCM_USE_COOP_THREADS) && !defined(SCM_USE_NULL_THREADS) && !defined(SCM_USE_COPT_THREADS)
/* When we are using preemtive threads, we might need to make /* When we are using preemtive threads, we might need to make
sure that the initial values for the slots are protected until sure that the initial values for the slots are protected until
the cell is completely initialized. the cell is completely initialized.
@ -164,7 +167,10 @@ scm_cell (scm_t_bits car, scm_t_bits cdr)
return z; return z;
} }
EXTERN_INLINE #if defined SCM_C_INLINE && ! defined SCM_INLINE_C_INCLUDING_INLINE_H
/* definitely inlining */
extern SCM_C_INLINE
#endif
SCM SCM
scm_double_cell (scm_t_bits car, scm_t_bits cbr, scm_double_cell (scm_t_bits car, scm_t_bits cbr,
scm_t_bits ccr, scm_t_bits cdr) scm_t_bits ccr, scm_t_bits cdr)
@ -194,7 +200,7 @@ scm_double_cell (scm_t_bits car, scm_t_bits cbr,
SCM_GC_SET_CELL_WORD (z, 0, car); SCM_GC_SET_CELL_WORD (z, 0, car);
#if 0 /*fixme* Hmm... let's consider this later. */ #if 0 /*fixme* Hmm... let's consider this later. */
#if !defined(USE_COOP_THREADS) && !defined(USE_NULL_THREADS) && !defined(USE_COPT_THREADS) #if !defined(SCM_USE_COOP_THREADS) && !defined(SCM_USE_NULL_THREADS) && !defined(SCM_USE_COPT_THREADS)
/* When we are using non-cooperating threads, we might need to make /* When we are using non-cooperating threads, we might need to make
sure that the initial values for the slots are protected until sure that the initial values for the slots are protected until
the cell is completely initialized. the cell is completely initialized.