emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109269: Remove HIDE_LISP_IMPLEMENTAT


From: Dmitry Antipov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109269: Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
Date: Sun, 29 Jul 2012 21:14:51 +0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109269
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Sun 2012-07-29 21:14:51 +0400
message:
  Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
  * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
  time.  Adjust users.
  (CHECK_CONS_LIST): Remove.  Convert all users to check_cons_list.
modified:
  src/ChangeLog
  src/alloc.c
  src/eval.c
  src/lisp.h
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-07-29 16:55:02 +0000
+++ b/src/ChangeLog     2012-07-29 17:14:51 +0000
@@ -1,3 +1,10 @@
+2012-07-29  Dmitry Antipov  <address@hidden>
+
+       Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
+       * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
+       time.  Adjust users.
+       (CHECK_CONS_LIST): Remove.  Convert all users to check_cons_list.
+
 2012-07-29  Jan Djärv  <address@hidden>
 
        * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before

=== modified file 'src/alloc.c'
--- a/src/alloc.c       2012-07-29 16:00:35 +0000
+++ b/src/alloc.c       2012-07-29 17:14:51 +0000
@@ -29,11 +29,6 @@
 #include <pthread.h>
 #endif
 
-/* This file is part of the core Lisp implementation, and thus must
-   deal with the real data structures.  If the Lisp implementation is
-   replaced, this file likely will not be used.  */
-
-#undef HIDE_LISP_IMPLEMENTATION
 #include "lisp.h"
 #include "process.h"
 #include "intervals.h"
@@ -5447,7 +5442,7 @@
   if (pure_bytes_used_before_overflow)
     return Qnil;
 
-  CHECK_CONS_LIST ();
+  check_cons_list ();
 
   /* Don't keep undo information around forever.
      Do this early on, so it is no problem if the user quits.  */
@@ -5615,7 +5610,7 @@
 
   UNBLOCK_INPUT;
 
-  CHECK_CONS_LIST ();
+  check_cons_list ();
 
   gc_in_progress = 0;
 

=== modified file 'src/eval.c'
--- a/src/eval.c        2012-07-26 01:27:33 +0000
+++ b/src/eval.c        2012-07-29 17:14:51 +0000
@@ -2094,7 +2094,7 @@
       args_left = original_args;
       numargs = Flength (args_left);
 
-      CHECK_CONS_LIST ();
+      check_cons_list ();
 
       if (XINT (numargs) < XSUBR (fun)->min_args
          || (XSUBR (fun)->max_args >= 0
@@ -2222,7 +2222,7 @@
       else
        xsignal1 (Qinvalid_function, original_fun);
     }
-  CHECK_CONS_LIST ();
+  check_cons_list ();
 
   lisp_eval_depth--;
   if (backtrace.debug_on_exit)
@@ -2762,7 +2762,7 @@
   if (debug_on_next_call)
     do_debug_on_call (Qlambda);
 
-  CHECK_CONS_LIST ();
+  check_cons_list ();
 
   original_fun = args[0];
 
@@ -2871,13 +2871,13 @@
       else if (EQ (funcar, Qautoload))
        {
          Fautoload_do_load (fun, original_fun, Qnil);
-         CHECK_CONS_LIST ();
+         check_cons_list ();
          goto retry;
        }
       else
        xsignal1 (Qinvalid_function, original_fun);
     }
-  CHECK_CONS_LIST ();
+  check_cons_list ();
   lisp_eval_depth--;
   if (backtrace.debug_on_exit)
     val = call_debugger (Fcons (Qexit, Fcons (val, Qnil)));

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2012-07-28 23:05:32 +0000
+++ b/src/lisp.h        2012-07-29 17:14:51 +0000
@@ -28,20 +28,6 @@
 
 #include <intprops.h>
 
-/* Use the configure flag --enable-checking[=LIST] to enable various
-   types of run time checks for Lisp objects.  */
-
-#ifdef GC_CHECK_CONS_LIST
-extern void check_cons_list (void);
-#define CHECK_CONS_LIST() check_cons_list ()
-#else
-#define CHECK_CONS_LIST() ((void) 0)
-#endif
-
-/* Temporarily disable wider-than-pointer integers until they're tested more.
-   Build with CFLAGS='-DWIDE_EMACS_INT' to try them out.  */
-/* #undef WIDE_EMACS_INT */
-
 /* EMACS_INT - signed integer wide enough to hold an Emacs value
    EMACS_INT_MAX - maximum value of EMACS_INT; can be used in #if
    pI - printf length modifier for EMACS_INT
@@ -642,21 +628,12 @@
   {
     /* Please do not use the names of these elements in code other
        than the core lisp implementation.  Use XCAR and XCDR below.  */
-#ifdef HIDE_LISP_IMPLEMENTATION
-    Lisp_Object car_;
-    union
-    {
-      Lisp_Object cdr_;
-      struct Lisp_Cons *chain;
-    } u;
-#else
     Lisp_Object car;
     union
     {
       Lisp_Object cdr;
       struct Lisp_Cons *chain;
     } u;
-#endif
   };
 
 /* Take the car or cdr of something known to be a cons cell.  */
@@ -666,13 +643,8 @@
    fields are not accessible as lvalues.  (What if we want to switch to
    a copying collector someday?  Cached cons cell field addresses may be
    invalidated at arbitrary points.)  */
-#ifdef HIDE_LISP_IMPLEMENTATION
-#define XCAR_AS_LVALUE(c) (XCONS ((c))->car_)
-#define XCDR_AS_LVALUE(c) (XCONS ((c))->u.cdr_)
-#else
 #define XCAR_AS_LVALUE(c) (XCONS ((c))->car)
 #define XCDR_AS_LVALUE(c) (XCONS ((c))->u.cdr)
-#endif
 
 /* Use these from normal code.  */
 #define XCAR(c)        LISP_MAKE_RVALUE (XCAR_AS_LVALUE (c))
@@ -1485,23 +1457,13 @@
   {
     union
     {
-#ifdef HIDE_LISP_IMPLEMENTATION
-      double data_;
-#else
       double data;
-#endif
       struct Lisp_Float *chain;
     } u;
   };
 
-#ifdef HIDE_LISP_IMPLEMENTATION
-#define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data_ : XFLOAT (f)->u.data_)
-#else
-#define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data :  XFLOAT (f)->u.data)
-/* This should be used only in alloc.c, which always disables
-   HIDE_LISP_IMPLEMENTATION.  */
-#define XFLOAT_INIT(f,n) (XFLOAT (f)->u.data = (n))
-#endif
+#define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data :  XFLOAT (f)->u.data)
+#define XFLOAT_INIT(f, n) (XFLOAT (f)->u.data = (n))
 
 /* A character, declared with the following typedef, is a member
    of some character set associated with the current buffer.  */
@@ -2702,6 +2664,11 @@
 extern void syms_of_alloc (void);
 extern struct buffer * allocate_buffer (void);
 extern int valid_lisp_object_p (Lisp_Object);
+#ifdef GC_CHECK_CONS_LIST
+extern void check_cons_list (void);
+#else
+#define check_cons_list() ((void) 0)
+#endif
 
 #ifdef REL_ALLOC
 /* Defined in ralloc.c */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]