diff options
| author | Andreas Schwab | 2012-06-13 15:40:48 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2012-06-13 15:40:48 +0200 |
| commit | 646b5f55dfc28ea37a6605b060f67017cdb1aea8 (patch) | |
| tree | 877cf977e28772931f3d9f3c6cdd05501efeb7c7 /admin | |
| parent | ef62b23df5a7007c3d8c74dbca87ba83e9da682e (diff) | |
| download | emacs-646b5f55dfc28ea37a6605b060f67017cdb1aea8.tar.gz emacs-646b5f55dfc28ea37a6605b060f67017cdb1aea8.zip | |
Use a simple struct to implement compile time checks for the Lisp_Object type
* configure.in: Rename --enable-use-lisp-union-type to
--enable-check-lisp-object-type and define CHECK_LISP_OBJECT_TYPE
instead of USE_LISP_UNION_TYPE.
* admin/make-emacs: Rename --union-type to --check-lisp-type. Define
CHECK_LISP_OBJECT_TYPE insted of USE_LISP_UNION_TYPE.
* admin/CPP-DEFINES (DEBUG_LISP_OBJECT_TYPE): Renamed from
USE_LISP_UNION_TYPE.
* src/lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
instead of union.
(XLI, XIL): Define.
(XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG): Use
them.
* src/emacs.c (gdb_use_struct): Renamed from gdb_use_union.
* src/.gdbinit: Check gdb_use_struct instead of gdb_use_union.
* src/alloc.c (widen_to_Lisp_Object): Removed.
(mark_memory): Use XIL instead of widen_to_Lisp_Object.
* src/frame.c (delete_frame): Remove outdated comment.
* src/w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
USE_LISP_UNION_TYPE.
(Fw32_unregister_hot_key): Likewise.
(Fw32_toggle_lock_key): Likewise.
* src/w32menu.c (add_menu_item): Likewise.
(w32_menu_display_help): Use XIL instead of checking
USE_LISP_UNION_TYPE.
* src/w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
(init_heap): Likewise.
* src/w32term.c (w32_read_socket): Update comment.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/CPP-DEFINES | 2 | ||||
| -rw-r--r-- | admin/ChangeLog | 7 | ||||
| -rwxr-xr-x | admin/make-emacs | 6 |
3 files changed, 11 insertions, 4 deletions
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index 738ec0a91a0..35de784f852 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES | |||
| @@ -46,7 +46,7 @@ HAVE_PROCFS The /proc filesystem is supported. | |||
| 46 | REL_ALLOC Compile in the relocatable memory allocator ralloc.c. | 46 | REL_ALLOC Compile in the relocatable memory allocator ralloc.c. |
| 47 | SYSTEM_MALLOC Use the system library's malloc. | 47 | SYSTEM_MALLOC Use the system library's malloc. |
| 48 | subprocesses System can use subprocesses (for M-x shell for example). Defined by default, only MSDOS undefines it. | 48 | subprocesses System can use subprocesses (for M-x shell for example). Defined by default, only MSDOS undefines it. |
| 49 | USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int. | 49 | DEBUG_LISP_OBJECT_TYPE Define it in lisp.h enable compile time checks on Lisp_Object use. |
| 50 | 50 | ||
| 51 | ** System specific macros, described in detail in src/s/template.h | 51 | ** System specific macros, described in detail in src/s/template.h |
| 52 | CLASH_DETECTION | 52 | CLASH_DETECTION |
diff --git a/admin/ChangeLog b/admin/ChangeLog index e425c99b8d0..e3b35906ace 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-06-13 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * make-emacs: Rename --union-type to --check-lisp-type. Define | ||
| 4 | CHECK_LISP_OBJECT_TYPE insted of USE_LISP_UNION_TYPE. | ||
| 5 | * CPP-DEFINES (DEBUG_LISP_OBJECT_TYPE): Renamed from | ||
| 6 | USE_LISP_UNION_TYPE. | ||
| 7 | |||
| 1 | 2012-06-03 Glenn Morris <rgm@gnu.org> | 8 | 2012-06-03 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * quick-install-emacs (PUBLIC_LIBSRC_SCRIPTS): Remove rcs-checkin. | 10 | * quick-install-emacs (PUBLIC_LIBSRC_SCRIPTS): Remove rcs-checkin. |
diff --git a/admin/make-emacs b/admin/make-emacs index f64d51b0c41..688f5c196bf 100755 --- a/admin/make-emacs +++ b/admin/make-emacs | |||
| @@ -42,7 +42,7 @@ $rc = GetOptions ("help" => \$help, | |||
| 42 | "check-marked" => \$check_marked, | 42 | "check-marked" => \$check_marked, |
| 43 | "all" => \$all, | 43 | "all" => \$all, |
| 44 | "no-optim" => \$no_optim, | 44 | "no-optim" => \$no_optim, |
| 45 | "union-type" => \$union_type, | 45 | "check-lisp-type" => \$check_lisp_type, |
| 46 | "gprof" => \$profile, | 46 | "gprof" => \$profile, |
| 47 | "malloc-check" => \$malloc_check, | 47 | "malloc-check" => \$malloc_check, |
| 48 | "no-mcheck" => \$no_mcheck, | 48 | "no-mcheck" => \$no_mcheck, |
| @@ -70,7 +70,7 @@ Build Emacs. | |||
| 70 | --check-marked GC_CHECK_MARKED_OBJECTS=1 | 70 | --check-marked GC_CHECK_MARKED_OBJECTS=1 |
| 71 | --optim no debug defines | 71 | --optim no debug defines |
| 72 | --gprof make Emacs for profiling | 72 | --gprof make Emacs for profiling |
| 73 | --union-type define USE_LISP_UNION_TYPE (bad for GDB) | 73 | --check-lisp-type define CHECK_LISP_OBJECT_TYPE |
| 74 | --malloc-check define GC_MALLOC_CHECK | 74 | --malloc-check define GC_MALLOC_CHECK |
| 75 | --no-mcheck don't define GC_MCHECK | 75 | --no-mcheck don't define GC_MCHECK |
| 76 | --wall compile with -Wall | 76 | --wall compile with -Wall |
| @@ -140,7 +140,7 @@ else | |||
| 140 | } | 140 | } |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | $defs = "$defs -DUSE_LISP_UNION_TYPE" if $union_type; | 143 | $defs = "$defs -DCHECK_LISP_OBJECT_TYPE" if $check_lisp_type; |
| 144 | $defs = "$defs -DGC_MALLOC_CHECK=1 -DGC_PROTECT_MALLOC_STATE=1" if $malloc_check; | 144 | $defs = "$defs -DGC_MALLOC_CHECK=1 -DGC_PROTECT_MALLOC_STATE=1" if $malloc_check; |
| 145 | $defs = "$defs -DGC_MCHECK=1" unless $no_mcheck; | 145 | $defs = "$defs -DGC_MCHECK=1" unless $no_mcheck; |
| 146 | 146 | ||