mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
More _scm.h refactoring
* libguile/foreign.c (ROUND_UP): Copy here. * libguile/vm.c (SCM_NOINLINE): Move here, to the only file that uses it. (ROUND_UP): Copy here. * libguile/_scm.h (ROUND_UP, SCM_NOINLINE): Remove. Centralizing private definitions isn't bad, but _scm.h also includes a bunch of Guile API as well, and the include itself is poorly named.
This commit is contained in:
parent
5176db70ca
commit
5159a15306
3 changed files with 16 additions and 12 deletions
|
@ -89,18 +89,6 @@
|
||||||
#include "libguile/strings.h"
|
#include "libguile/strings.h"
|
||||||
|
|
||||||
|
|
||||||
/* Return the first integer greater than or equal to LEN such that
|
|
||||||
LEN % ALIGN == 0. Return LEN if ALIGN is zero. */
|
|
||||||
#define ROUND_UP(len, align) \
|
|
||||||
((align) ? (((len) - 1UL) | ((align) - 1UL)) + 1UL : (len))
|
|
||||||
|
|
||||||
#if (defined __GNUC__)
|
|
||||||
# define SCM_NOINLINE __attribute__ ((__noinline__))
|
|
||||||
#else
|
|
||||||
# define SCM_NOINLINE /* noinline */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* SCM__SCM_H */
|
#endif /* SCM__SCM_H */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -44,6 +44,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Return the first integer greater than or equal to LEN such that
|
||||||
|
LEN % ALIGN == 0. Return LEN if ALIGN is zero. */
|
||||||
|
#define ROUND_UP(len, align) \
|
||||||
|
((align) ? (((len) - 1UL) | ((align) - 1UL)) + 1UL : (len))
|
||||||
|
|
||||||
SCM_SYMBOL (sym_void, "void");
|
SCM_SYMBOL (sym_void, "void");
|
||||||
SCM_SYMBOL (sym_float, "float");
|
SCM_SYMBOL (sym_float, "float");
|
||||||
SCM_SYMBOL (sym_double, "double");
|
SCM_SYMBOL (sym_double, "double");
|
||||||
|
|
|
@ -59,6 +59,12 @@
|
||||||
#include "libguile/vm.h"
|
#include "libguile/vm.h"
|
||||||
#include "libguile/vm-builtins.h"
|
#include "libguile/vm-builtins.h"
|
||||||
|
|
||||||
|
#if (defined __GNUC__)
|
||||||
|
# define SCM_NOINLINE __attribute__ ((__noinline__))
|
||||||
|
#else
|
||||||
|
# define SCM_NOINLINE /* noinline */
|
||||||
|
#endif
|
||||||
|
|
||||||
static int vm_default_engine = SCM_VM_REGULAR_ENGINE;
|
static int vm_default_engine = SCM_VM_REGULAR_ENGINE;
|
||||||
|
|
||||||
/* Unfortunately we can't snarf these: snarfed things are only loaded up from
|
/* Unfortunately we can't snarf these: snarfed things are only loaded up from
|
||||||
|
@ -240,6 +246,11 @@ static void vm_dispatch_pop_continuation_hook
|
||||||
static void vm_dispatch_next_hook (struct scm_vm *vp) SCM_NOINLINE;
|
static void vm_dispatch_next_hook (struct scm_vm *vp) SCM_NOINLINE;
|
||||||
static void vm_dispatch_abort_hook (struct scm_vm *vp) SCM_NOINLINE;
|
static void vm_dispatch_abort_hook (struct scm_vm *vp) SCM_NOINLINE;
|
||||||
|
|
||||||
|
/* Return the first integer greater than or equal to LEN such that
|
||||||
|
LEN % ALIGN == 0. Return LEN if ALIGN is zero. */
|
||||||
|
#define ROUND_UP(len, align) \
|
||||||
|
((align) ? (((len) - 1UL) | ((align) - 1UL)) + 1UL : (len))
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vm_dispatch_hook (struct scm_vm *vp, int hook_num,
|
vm_dispatch_hook (struct scm_vm *vp, int hook_num,
|
||||||
union scm_vm_stack_element *argv, int n)
|
union scm_vm_stack_element *argv, int n)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue