Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b349d111
Commit
b349d111
authored
Nov 03, 2009
by
Stefan Monnier
Browse files
Make USE_LSB_TAG work with USE_LISP_UNION_TYPE.
(P_): Support for prototypes is now required.
parent
6e39d3b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
21 deletions
+34
-21
src/ChangeLog
src/ChangeLog
+5
-0
src/lisp.h
src/lisp.h
+29
-21
No files found.
src/ChangeLog
View file @
b349d111
2009-11-03 Stefan Monnier <monnier@iro.umontreal.ca>
* lisp.h: Make USE_LSB_TAG work with USE_LISP_UNION_TYPE.
(P_): Support for prototypes is now required.
2009-10-31 Chong Yidong <cyd@stupidchicken.com>
* frame.c (Fmake_frame_invisible, Fframe_visible_p): Doc fix
...
...
src/lisp.h
View file @
b349d111
...
...
@@ -22,11 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define EMACS_LISP_H
/* Declare the prototype for a general external function. */
#if defined (PROTOTYPES) || defined (WINDOWSNT)
#define P_(proto) proto
#else
#define P_(proto) ()
#endif
/* Use the configure flag --enable-checking[=LIST] to enable various
types of run time checks for Lisp objects. */
...
...
@@ -139,10 +135,7 @@ extern void die P_((const char *, const char *, int)) NO_RETURN;
#if defined GNU_MALLOC || defined DOUG_LEA_MALLOC || defined __GLIBC__ || defined DARWIN_OS
/* We also need to be able to specify mult-of-8 alignment on static vars. */
# if defined DECL_ALIGN
/* We currently do not support USE_LSB_TAG with a union Lisp_Object. */
# ifndef USE_LISP_UNION_TYPE
# define USE_LSB_TAG
# endif
# define USE_LSB_TAG
# endif
#endif
...
...
@@ -367,12 +360,6 @@ enum pvec_type
(var) = ((EMACS_INT) (type)) | ((EMACS_INT) (ptr)))
#define make_number(N) (((EMACS_INT) (N)) << GCTYPEBITS)
/* XFASTINT and XSETFASTINT are for use when the integer is known to be
positive, in which case the implementation can sometimes be faster
depending on the tagging scheme. With USE_LSB_TAG, there's no benefit. */
#define XFASTINT(a) XINT (a)
#define XSETFASTINT(a, b) ((a) = make_number (b))
#define XPNTR(a) ((EMACS_INT) ((a) & ~TYPEMASK))
#else
/* not USE_LSB_TAG */
...
...
@@ -423,12 +410,6 @@ enum pvec_type
#define XTYPE(a) ((enum Lisp_Type) (a).u.type)
/* For integers known to be positive, XFASTINT provides fast retrieval
and XSETFASTINT provides fast storage. This takes advantage of the
fact that Lisp_Int is 0. */
#define XFASTINT(a) ((a).i + 0)
#define XSETFASTINT(a, b) ((a).i = (b))
#ifdef EXPLICIT_SIGN_EXTEND
/* Make sure we sign-extend; compilers have been known to fail to do so. */
#define XINT(a) (((a).s.val << (BITS_PER_EMACS_INT - VALBITS)) \
...
...
@@ -439,9 +420,28 @@ enum pvec_type
#define XUINT(a) ((a).u.val)
#define XSET(var, vartype, ptr) \
#ifdef USE_LSB_TAG
# define XSET(var, vartype, ptr) \
(eassert ((((EMACS_UINT) (ptr)) & ((1 << GCTYPEBITS) - 1)) == 0), \
(var).u.val = ((EMACS_UINT) (ptr)) >> GCTYPEBITS, \
(var).u.type = ((char) (vartype)))
# define XPNTR(v) (((v).s.val) << GCTYPEBITS)
#else
/* !USE_LSB_TAG */
/* For integers known to be positive, XFASTINT provides fast retrieval
and XSETFASTINT provides fast storage. This takes advantage of the
fact that Lisp_Int is 0. */
# define XFASTINT(a) ((a).i + 0)
# define XSETFASTINT(a, b) ((a).i = (b))
# define XSET(var, vartype, ptr) \
(((var).s.val = ((EMACS_INT) (ptr))), ((var).s.type = ((char) (vartype))))
#endif
/* !USE_LSB_TAG */
#if __GNUC__ >= 2 && defined (__OPTIMIZE__)
#define make_number(N) \
(__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; }))
...
...
@@ -451,6 +451,14 @@ extern Lisp_Object make_number P_ ((EMACS_INT));
#endif
/* USE_LISP_UNION_TYPE */
/* For integers known to be positive, XFASTINT sometimes provides
faster retrieval and XSETFASTINT provides faster storage.
If not, fallback on the non-accelerated path. */
#ifndef XFASTINT
# define XFASTINT(a) (XINT (a))
# define XSETFASTINT(a, b) (XSETINT (a, b))
#endif
#define EQ(x, y) (XHASH (x) == XHASH (y))
#ifndef XPNTR
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment