#ifndef SCM_TAGS_H
#define SCM_TAGS_H
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2008,2009
* 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 as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
*/
\f
and that there is no performance hit. However, the alternative is
compiled, and does generate a warning when used with the wrong
pointer type.
- */
+
+ The Tru64 and ia64-hp-hpux11.23 compilers fail on `case (0?0=0:x)'
+ statements, so for them type-checking is disabled. */
+#if defined __DECC || defined __HP_cc
+# define SCM_UNPACK(x) ((scm_t_bits) (x))
+#else
# define SCM_UNPACK(x) ((scm_t_bits) (0? (*(SCM*)0=(x)): x))
+#endif
/*
There is no typechecking on SCM_PACK, since all kinds of types
* macro instead, which is the equivalent of the scheme predicate 'eq?'.
*/
#define scm_is_eq(x, y) (SCM_UNPACK (x) == SCM_UNPACK (y))
-#define SCM_EQ_P scm_is_eq
\f
* tc16 (for tc7==scm_tc7_smob):
* The largest part of the space of smob types is not subdivided in a
* predefined way, since smobs can be added arbitrarily by user C code.
- * However, while Guile also defines a number of smob types throughout,
- * there is one smob type, namely scm_tc_free_cell, for which Guile assumes
- * that it is declared first and thus gets a known-in-advance tc16-code.
- * The reason of requiring a fixed tc16-code for this type is performance.
*/
\f
/* Checking if a SCM variable holds an immediate integer: See numbers.h for
* the definition of the following macros: SCM_I_FIXNUM_BIT,
- * SCM_MOST_POSITIVE_FIXNUM, SCM_INUMP, SCM_I_MAKINUM, SCM_INUM. */
+ * SCM_MOST_POSITIVE_FIXNUM, SCM_I_INUMP, SCM_I_MAKINUM, SCM_I_INUM. */
/* Checking if a SCM variable holds a pair (for historical reasons, in Guile
* also known as a cons-cell): This is done by first checking that the SCM
* variable holds a non-immediate, and second, by checking that tc1==0 holds
- * for the SCM_CELL_TYPE of the SCM variable. */
-#define SCM_CONSP(x) (!SCM_IMP (x) && ((1 & SCM_CELL_TYPE (x)) == 0))
-#define SCM_NCONSP(x) (!SCM_CONSP (x))
+ * for the SCM_CELL_TYPE of the SCM variable.
+*/
+
+#define SCM_I_CONSP(x) (!SCM_IMP (x) && ((1 & SCM_CELL_TYPE (x)) == 0))
\f
#define scm_tc7_string 21
#define scm_tc7_number 23
+#define scm_tc7_stringbuf 39
+#define scm_tc7_bytevector 77
/* Many of the following should be turned
* into structs or smobs. We need back some
#define scm_tc7_pws 31
-#if SCM_HAVE_ARRAYS
-#define scm_tc7_llvect 29
-#define scm_tc7_uvect 37
-/* free 39 */
-#define scm_tc7_fvect 45
-#define scm_tc7_dvect 47
-#define scm_tc7_cvect 53
-#define scm_tc7_svect 55
-#define scm_tc7_bvect 71
-#define scm_tc7_byvect 77
-#define scm_tc7_ivect 79
-#endif
+#define scm_tc7_unused_1 29
+#define scm_tc7_unused_2 37
+#define scm_tc7_unused_3 45
+#define scm_tc7_unused_4 47
+#define scm_tc7_unused_5 53
+#define scm_tc7_unused_6 55
+#define scm_tc7_unused_7 71
#define scm_tc7_dsubr 61
-#define scm_tc7_cclo 63
+#define scm_tc7_gsubr 63
#define scm_tc7_rpsubr 69
+#define scm_tc7_program 79
#define scm_tc7_subr_0 85
#define scm_tc7_subr_1 87
#define scm_tc7_cxr 93
#define SCM_TYP16_PREDICATE(tag, x) (!SCM_IMP (x) && SCM_TYP16 (x) == (tag))
-/* Here is the first smob subtype. */
-
-/* scm_tc_free_cell is the 0th smob type. We place this in free cells to tell
- * the conservative marker not to trace it. */
-#define scm_tc_free_cell (scm_tc7_smob + 0 * 256L)
-
\f
/* {Immediate Values}
#define SCM_ELISP_NIL SCM_MAKIFLAG (7)
-#define SCM_UNBNDP(x) (SCM_EQ_P ((x), SCM_UNDEFINED))
+#define SCM_UNBNDP(x) (scm_is_eq ((x), SCM_UNDEFINED))
\f
case scm_tc7_subr_1o:\
case scm_tc7_subr_2o:\
case scm_tc7_lsubr_2:\
- case scm_tc7_lsubr
+ case scm_tc7_lsubr: \
+ case scm_tc7_gsubr
\f