1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

add SCM_PROGRAM_IS_PRIMITIVE_GENERIC flag and checker

* libguile/programs.h (SCM_F_PROGRAM_IS_PRIMITIVE_GENERIC)
  (SCM_PROGRAM_IS_PRIMITIVE_GENERIC): Add a primitive-generic flag and
  accessor, for when we switch primitives to be implemented using VM
  trampolines.
This commit is contained in:
Andy Wingo 2010-01-05 16:50:58 +01:00
parent 31a26df2cc
commit f318aa1e38

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2001, 2009 Free Software Foundation, Inc.
/* Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@ -27,6 +27,7 @@
*/
#define SCM_F_PROGRAM_IS_BOOT 0x100
#define SCM_F_PROGRAM_IS_PRIMITIVE_GENERIC 0x200
#define SCM_PROGRAM_P(x) (!SCM_IMP (x) && SCM_TYP7(x) == scm_tc7_program)
#define SCM_PROGRAM_OBJCODE(x) (SCM_CELL_OBJECT_1 (x))
@ -35,6 +36,7 @@
#define SCM_PROGRAM_DATA(x) (SCM_OBJCODE_DATA (SCM_PROGRAM_OBJCODE (x)))
#define SCM_VALIDATE_PROGRAM(p,x) SCM_MAKE_VALIDATE (p, x, PROGRAM_P)
#define SCM_PROGRAM_IS_BOOT(x) (SCM_CELL_WORD_0 (x) & SCM_F_PROGRAM_IS_BOOT)
#define SCM_PROGRAM_IS_PRIMITIVE_GENERIC(x) (SCM_CELL_WORD_0 (x) & SCM_F_PROGRAM_IS_PRIMITIVE_GENERIC)
SCM_API SCM scm_make_program (SCM objcode, SCM objtable, SCM free_variables);