diff options
| author | Stefan Monnier | 2003-11-17 23:30:28 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-11-17 23:30:28 +0000 |
| commit | 854c1a594ebbf4a13cedb1da97495aa612a54b29 (patch) | |
| tree | 56a8c334ebb833e72bc76dd979b9ccbb9daa11f1 /src | |
| parent | e22216b8a5c42df9f0b449b2c4c6907ec00662d7 (diff) | |
| download | emacs-854c1a594ebbf4a13cedb1da97495aa612a54b29.tar.gz emacs-854c1a594ebbf4a13cedb1da97495aa612a54b29.zip | |
(hashfn_eq, hashfn_eql, hashfn_equal, hash_put)
(sxhash_string, sxhash): Use INTMASK instead of VALMASK.
(maybe_resize_hash_table): Use MOST_POSITIVE_FIXNUM.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 93 | ||||
| -rw-r--r-- | src/fns.c | 16 |
2 files changed, 69 insertions, 40 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9d7197dc6e4..581f6513201 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,24 @@ | |||
| 1 | 2003-11-17 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * keyboard.c (parse_modifiers, apply_modifiers): Use INTMASK instead | ||
| 4 | of VALMASK. | ||
| 5 | |||
| 6 | * fns.c (hashfn_eq, hashfn_eql, hashfn_equal, hash_put) | ||
| 7 | (sxhash_string, sxhash): Use INTMASK instead of VALMASK. | ||
| 8 | (maybe_resize_hash_table): Use MOST_POSITIVE_FIXNUM. | ||
| 9 | |||
| 10 | * lisp.h (VALMASK): Only define for non-union type. | ||
| 11 | (MARKBIT): Remove. | ||
| 12 | (ARRAY_MARK_FLAG): Use previous value of MARKBIT. | ||
| 13 | (XTYPE): Define unconditionally. | ||
| 14 | (XSETTYPE): Remove one more remnant. | ||
| 15 | (EQ): Define differently for the union and non-union cases. | ||
| 16 | (INTMASK): New bit mask. | ||
| 17 | (struct Lisp_Marker): Move down to prepare for upcoming patch. | ||
| 18 | (GC_EQ): Delegate to EQ. | ||
| 19 | |||
| 20 | * coding.c (coding_restore_composition): Lisp_Object/int mixup. | ||
| 21 | |||
| 1 | 2003-11-17 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 22 | 2003-11-17 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 23 | ||
| 3 | * xterm.c (x_window_to_scroll_bar): Move check of display to | 24 | * xterm.c (x_window_to_scroll_bar): Move check of display to |
| @@ -14,12 +35,12 @@ | |||
| 14 | 2003-11-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 35 | 2003-11-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 15 | 36 | ||
| 16 | * w32fns.c (XPutPixel): | 37 | * w32fns.c (XPutPixel): |
| 17 | * w32bdf.c (w32_init_bdf_font): | 38 | * w32bdf.c (w32_init_bdf_font): |
| 18 | * sunfns.c (sel_read): | 39 | * sunfns.c (sel_read): |
| 19 | * process.c (Fmake_network_process): | 40 | * process.c (Fmake_network_process): |
| 20 | * frame.c (store_frame_param): | 41 | * frame.c (store_frame_param): |
| 21 | * fontset.c (Fset_fontset_font): | 42 | * fontset.c (Fset_fontset_font): |
| 22 | * emacs.c (shut_down_emacs): | 43 | * emacs.c (shut_down_emacs): |
| 23 | * ccl.c (ccl_driver): Remove period at end of error message. | 44 | * ccl.c (ccl_driver): Remove period at end of error message. |
| 24 | 45 | ||
| 25 | * config.in: Regenerate. | 46 | * config.in: Regenerate. |
| @@ -37,7 +58,7 @@ | |||
| 37 | x_window_to_scroll_bar. | 58 | x_window_to_scroll_bar. |
| 38 | (x_window_to_scroll_bar): Take a Display* argument. | 59 | (x_window_to_scroll_bar): Take a Display* argument. |
| 39 | Check that display for frame is equal to Display* argument. | 60 | Check that display for frame is equal to Display* argument. |
| 40 | (event_handler_gdk): current_dpyinfo removed. Get dpyinfo from | 61 | (event_handler_gdk): Remove current_dpyinfo. Get dpyinfo from |
| 41 | x_display_info_for_display instead. Use Display in xev instead | 62 | x_display_info_for_display instead. Use Display in xev instead |
| 42 | of GDK_DISPLAY. | 63 | of GDK_DISPLAY. |
| 43 | (x_dispatch_event): Call x_display_info_for_display. | 64 | (x_dispatch_event): Call x_display_info_for_display. |
| @@ -57,8 +78,8 @@ | |||
| 57 | (xg_display_close, xg_create_default_cursor) | 78 | (xg_display_close, xg_create_default_cursor) |
| 58 | (xg_get_gdk_pixmap_and_mask): New functions for multiple display | 79 | (xg_get_gdk_pixmap_and_mask): New functions for multiple display |
| 59 | handling. | 80 | handling. |
| 60 | (xg_left_ptr_cursor): Removed. | 81 | (xg_left_ptr_cursor): Remove. |
| 61 | (xg_set_cursor): cursor changed to GdkCursor*. Do not create | 82 | (xg_set_cursor): Change cursor to GdkCursor*. Do not create |
| 62 | cursor here. | 83 | cursor here. |
| 63 | (xg_win_to_widget): Take Display* argument, call | 84 | (xg_win_to_widget): Take Display* argument, call |
| 64 | gdk_xid_table_lookup_for_display. | 85 | gdk_xid_table_lookup_for_display. |
| @@ -68,7 +89,7 @@ | |||
| 68 | in FRAME_X_DISPLAY_INFO. | 89 | in FRAME_X_DISPLAY_INFO. |
| 69 | (xg_get_scroll_id_for_window): Take Display* argument. | 90 | (xg_get_scroll_id_for_window): Take Display* argument. |
| 70 | (update_frame_tool_bar): Call xg_get_gdk_pixmap_and_mask. | 91 | (update_frame_tool_bar): Call xg_get_gdk_pixmap_and_mask. |
| 71 | (xg_initialize): xg_left_ptr_cursor removed. | 92 | (xg_initialize): Remove xg_left_ptr_cursor. |
| 72 | 93 | ||
| 73 | * gtkutil.h: xg_get_scroll_id_for_window, xg_win_to_widget takes | 94 | * gtkutil.h: xg_get_scroll_id_for_window, xg_win_to_widget takes |
| 74 | Display* argument also. Declare xg_display_open, | 95 | Display* argument also. Declare xg_display_open, |
| @@ -83,7 +104,7 @@ | |||
| 83 | 104 | ||
| 84 | * dispnew.c (update_text_area): Fix redisplay error when hscroll | 105 | * dispnew.c (update_text_area): Fix redisplay error when hscroll |
| 85 | is active and first glyph is only partially visible. | 106 | is active and first glyph is only partially visible. |
| 86 | 107 | ||
| 87 | 2003-11-13 Kenichi Handa <handa@m17n.org> | 108 | 2003-11-13 Kenichi Handa <handa@m17n.org> |
| 88 | 109 | ||
| 89 | * xdisp.c (select_frame_for_redisplay): New function. | 110 | * xdisp.c (select_frame_for_redisplay): New function. |
| @@ -116,11 +137,22 @@ | |||
| 116 | 137 | ||
| 117 | 2003-11-07 Kenichi Handa <handa@m17n.org> | 138 | 2003-11-07 Kenichi Handa <handa@m17n.org> |
| 118 | 139 | ||
| 119 | * coding.c (coding_allocate_composition_data): Reset | 140 | * coding.c (coding_allocate_composition_data): |
| 120 | coding->composing to COMPOSITION_NO. | 141 | Reset coding->composing to COMPOSITION_NO. |
| 121 | (coding_restore_composition): Detect invalid composition data. | 142 | (coding_restore_composition): Detect invalid composition data. |
| 122 | Give Fstring and Fvector a Lispy integer, not C int. | 143 | Give Fstring and Fvector a Lispy integer, not C int. |
| 123 | 144 | ||
| 145 | 2003-11-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 146 | |||
| 147 | * floatfns.c (Flogb): Don't use VALMASK. | ||
| 148 | |||
| 149 | * m/amdx86-64.h (VALBITS, XINT, XUINT): Remove. | ||
| 150 | * m/ia64.h (VALBITS, XINT, XUINT): Remove. | ||
| 151 | |||
| 152 | * lisp.h (XINT): Move the cast to clarify what is going on. | ||
| 153 | (GCTYPEMASK, XSETTYPE): Remove. | ||
| 154 | (XGCTYPE): Make it an alias of XTYPE. | ||
| 155 | |||
| 124 | 2003-11-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 156 | 2003-11-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 125 | 157 | ||
| 126 | * xterm.c (x_term_init): Fix formatting. | 158 | * xterm.c (x_term_init): Fix formatting. |
| @@ -135,7 +167,7 @@ | |||
| 135 | (tearoff_remove): Just decrease xg_detached_menus. | 167 | (tearoff_remove): Just decrease xg_detached_menus. |
| 136 | (tearoff_activate): Increase xg_detached_menus and call | 168 | (tearoff_activate): Increase xg_detached_menus and call |
| 137 | tearoff_remove when tearoff is removed. | 169 | tearoff_remove when tearoff is removed. |
| 138 | (xg_keep_popup): Removed function. | 170 | (xg_keep_popup): Remove function. |
| 139 | (create_menus): Give add_tearoff_p as argument to recursive | 171 | (create_menus): Give add_tearoff_p as argument to recursive |
| 140 | call to create_menus. | 172 | call to create_menus. |
| 141 | (xg_create_widget): Use variables instead of multiple | 173 | (xg_create_widget): Use variables instead of multiple |
| @@ -156,7 +188,7 @@ | |||
| 156 | 188 | ||
| 157 | * macterm.c (XTread_socket): Handle menubar selection and grow | 189 | * macterm.c (XTread_socket): Handle menubar selection and grow |
| 158 | window only for mouseDown events. | 190 | window only for mouseDown events. |
| 159 | 191 | ||
| 160 | 2003-10-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 192 | 2003-10-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 161 | 193 | ||
| 162 | * xterm.c (x_term_init): For GTK part, increase x_initialized | 194 | * xterm.c (x_term_init): For GTK part, increase x_initialized |
| @@ -164,8 +196,7 @@ | |||
| 164 | 196 | ||
| 165 | 2003-10-31 Andrew Choi <akochoi@shaw.ca> | 197 | 2003-10-31 Andrew Choi <akochoi@shaw.ca> |
| 166 | 198 | ||
| 167 | * unexmacosx.c (unrelocate): New function (contributed by Nozomu | 199 | * unexmacosx.c (unrelocate): New function (contributed by Nozomu Ando). |
| 168 | Ando). | ||
| 169 | (copy_dysymtab): Call it. | 200 | (copy_dysymtab): Call it. |
| 170 | 201 | ||
| 171 | 2003-10-31 Luc Teirlinck <teirllm@auburn.edu> | 202 | 2003-10-31 Luc Teirlinck <teirllm@auburn.edu> |
| @@ -181,6 +212,7 @@ | |||
| 181 | * window.c (Fset_window_fringes): Clarify docstring. | 212 | * window.c (Fset_window_fringes): Clarify docstring. |
| 182 | 213 | ||
| 183 | 2003-10-14 Kim F. Storm <storm@cua.dk> | 214 | 2003-10-14 Kim F. Storm <storm@cua.dk> |
| 215 | |||
| 184 | * window.c (Fset_window_margins): Simplify arg checking. | 216 | * window.c (Fset_window_margins): Simplify arg checking. |
| 185 | 217 | ||
| 186 | 2003-10-13 Richard M. Stallman <rms@gnu.org> | 218 | 2003-10-13 Richard M. Stallman <rms@gnu.org> |
| @@ -201,8 +233,7 @@ | |||
| 201 | 233 | ||
| 202 | 2003-10-12 Andrew Choi <akochoi@shaw.ca> | 234 | 2003-10-12 Andrew Choi <akochoi@shaw.ca> |
| 203 | 235 | ||
| 204 | * macterm.c (XTread_socket): Call DragWindow only for mouseDown | 236 | * macterm.c (XTread_socket): Call DragWindow only for mouseDown events. |
| 205 | events. | ||
| 206 | 237 | ||
| 207 | * s/darwin.h (GC_MARK_STACK): Define. | 238 | * s/darwin.h (GC_MARK_STACK): Define. |
| 208 | 239 | ||
| @@ -218,8 +249,7 @@ | |||
| 218 | 249 | ||
| 219 | 2003-10-08 Kenichi Handa <handa@m17n.org> | 250 | 2003-10-08 Kenichi Handa <handa@m17n.org> |
| 220 | 251 | ||
| 221 | * coding.c (Fcoding_system_p): Return t for auto-loading coding | 252 | * coding.c (Fcoding_system_p): Return t for auto-loading coding system. |
| 222 | system. | ||
| 223 | 253 | ||
| 224 | 2003-10-07 Kenichi Handa <handa@m17n.org> | 254 | 2003-10-07 Kenichi Handa <handa@m17n.org> |
| 225 | 255 | ||
| @@ -247,7 +277,7 @@ | |||
| 247 | 277 | ||
| 248 | * xterm.h (struct x_output): New members: move_offset_top/left. | 278 | * xterm.h (struct x_output): New members: move_offset_top/left. |
| 249 | 279 | ||
| 250 | * frame.c (x_set_frame_parameters): x_fullscreen_move removed, | 280 | * frame.c (x_set_frame_parameters): Remove x_fullscreen_move, |
| 251 | call x_set_offset directly. | 281 | call x_set_offset directly. |
| 252 | 282 | ||
| 253 | * frame.h (enum): FULLSCREEN_MOVE_WAIT removed. | 283 | * frame.h (enum): FULLSCREEN_MOVE_WAIT removed. |
| @@ -257,8 +287,8 @@ | |||
| 257 | * xterm.c (x_delete_display): Free font names and font_encoder | 287 | * xterm.c (x_delete_display): Free font names and font_encoder |
| 258 | in dpyinfo->font_table. | 288 | in dpyinfo->font_table. |
| 259 | 289 | ||
| 260 | * xfns.c (Fx_close_connection): Only call XFreeFont here. xfree | 290 | * xfns.c (Fx_close_connection): Only call XFreeFont here. |
| 261 | of font names moved to x_delete_display. | 291 | Move xfree of font names to x_delete_display. |
| 262 | 292 | ||
| 263 | * xterm.h (struct x_display_info): New member, wm_type. | 293 | * xterm.h (struct x_display_info): New member, wm_type. |
| 264 | (struct x_output): New members, expected_top/left and | 294 | (struct x_output): New members, expected_top/left and |
| @@ -266,11 +296,11 @@ | |||
| 266 | 296 | ||
| 267 | * xterm.c (handle_one_xevent): Reset wm_type when ReparentNotify | 297 | * xterm.c (handle_one_xevent): Reset wm_type when ReparentNotify |
| 268 | is received. | 298 | is received. |
| 269 | (handle_one_xevent): x_check_expected_move renamed from | 299 | (handle_one_xevent): Rename x_check_expected_move from |
| 270 | x_check_fullscreen_move | 300 | x_check_fullscreen_move. |
| 271 | (x_set_offset): Only add WM decoration sizes to modified_top/left | 301 | (x_set_offset): Only add WM decoration sizes to modified_top/left |
| 272 | for X_WMTYPE_A. Set check_expected_move when WM type is unknown. | 302 | for X_WMTYPE_A. Set check_expected_move when WM type is unknown. |
| 273 | (x_check_expected_move): Renamed from x_check_fullscreen_move. | 303 | (x_check_expected_move): Rename from x_check_fullscreen_move. |
| 274 | Removed fullscreen specific code. Use check_expected_move, | 304 | Removed fullscreen specific code. Use check_expected_move, |
| 275 | expected_left/top instead. Also, set wm_type. | 305 | expected_left/top instead. Also, set wm_type. |
| 276 | (x_term_init): Initialize wm_type to unknown. | 306 | (x_term_init): Initialize wm_type to unknown. |
| @@ -298,8 +328,8 @@ | |||
| 298 | 328 | ||
| 299 | 2003-10-02 Jason Rumney <jasonr@gnu.org> | 329 | 2003-10-02 Jason Rumney <jasonr@gnu.org> |
| 300 | 330 | ||
| 301 | * makefile.w32-in (emacs.o, coding.o, bytecode.o): Sync | 331 | * makefile.w32-in (emacs.o, coding.o, bytecode.o): |
| 302 | dependancies with Makefile.in. | 332 | Sync dependencies with Makefile.in. |
| 303 | (alloca.o): Remove. | 333 | (alloca.o): Remove. |
| 304 | 334 | ||
| 305 | * w32fns.c (w32_load_system_font): Clear all members of FONTP before | 335 | * w32fns.c (w32_load_system_font): Clear all members of FONTP before |
| @@ -312,7 +342,7 @@ | |||
| 312 | * term.c (set_tty_color_mode): Calculate current_mode_spec | 342 | * term.c (set_tty_color_mode): Calculate current_mode_spec |
| 313 | regardless of value of VAL. | 343 | regardless of value of VAL. |
| 314 | 344 | ||
| 315 | * intervals.c (graft_intervals_into_buffer): | 345 | * intervals.c (graft_intervals_into_buffer): |
| 316 | Set BUF_INTERVALS (buffer)->up_obj when appropriate. | 346 | Set BUF_INTERVALS (buffer)->up_obj when appropriate. |
| 317 | Handle over_used when splitting UNDER. | 347 | Handle over_used when splitting UNDER. |
| 318 | 348 | ||
| @@ -383,8 +413,7 @@ | |||
| 383 | 413 | ||
| 384 | 2003-09-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 414 | 2003-09-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 385 | 415 | ||
| 386 | * xterm.c (x_set_offset): Take window manager decorations | 416 | * xterm.c (x_set_offset): Take window manager decorations into account. |
| 387 | into account. | ||
| 388 | 417 | ||
| 389 | 2003-09-19 Richard M. Stallman <rms@gnu.org> | 418 | 2003-09-19 Richard M. Stallman <rms@gnu.org> |
| 390 | 419 | ||
| @@ -4274,7 +4274,7 @@ hashfn_eq (h, key) | |||
| 4274 | Lisp_Object key; | 4274 | Lisp_Object key; |
| 4275 | { | 4275 | { |
| 4276 | unsigned hash = XUINT (key) ^ XGCTYPE (key); | 4276 | unsigned hash = XUINT (key) ^ XGCTYPE (key); |
| 4277 | xassert ((hash & ~VALMASK) == 0); | 4277 | xassert ((hash & ~INTMASK) == 0); |
| 4278 | return hash; | 4278 | return hash; |
| 4279 | } | 4279 | } |
| 4280 | 4280 | ||
| @@ -4293,7 +4293,7 @@ hashfn_eql (h, key) | |||
| 4293 | hash = sxhash (key, 0); | 4293 | hash = sxhash (key, 0); |
| 4294 | else | 4294 | else |
| 4295 | hash = XUINT (key) ^ XGCTYPE (key); | 4295 | hash = XUINT (key) ^ XGCTYPE (key); |
| 4296 | xassert ((hash & ~VALMASK) == 0); | 4296 | xassert ((hash & ~INTMASK) == 0); |
| 4297 | return hash; | 4297 | return hash; |
| 4298 | } | 4298 | } |
| 4299 | 4299 | ||
| @@ -4308,7 +4308,7 @@ hashfn_equal (h, key) | |||
| 4308 | Lisp_Object key; | 4308 | Lisp_Object key; |
| 4309 | { | 4309 | { |
| 4310 | unsigned hash = sxhash (key, 0); | 4310 | unsigned hash = sxhash (key, 0); |
| 4311 | xassert ((hash & ~VALMASK) == 0); | 4311 | xassert ((hash & ~INTMASK) == 0); |
| 4312 | return hash; | 4312 | return hash; |
| 4313 | } | 4313 | } |
| 4314 | 4314 | ||
| @@ -4495,7 +4495,7 @@ maybe_resize_hash_table (h) | |||
| 4495 | index_size = next_almost_prime ((int) | 4495 | index_size = next_almost_prime ((int) |
| 4496 | (new_size | 4496 | (new_size |
| 4497 | / XFLOATINT (h->rehash_threshold))); | 4497 | / XFLOATINT (h->rehash_threshold))); |
| 4498 | if (max (index_size, 2 * new_size) & ~VALMASK) | 4498 | if (max (index_size, 2 * new_size) > MOST_POSITIVE_FIXNUM) |
| 4499 | error ("Hash table too large to resize"); | 4499 | error ("Hash table too large to resize"); |
| 4500 | 4500 | ||
| 4501 | h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil); | 4501 | h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil); |
| @@ -4585,7 +4585,7 @@ hash_put (h, key, value, hash) | |||
| 4585 | { | 4585 | { |
| 4586 | int start_of_bucket, i; | 4586 | int start_of_bucket, i; |
| 4587 | 4587 | ||
| 4588 | xassert ((hash & ~VALMASK) == 0); | 4588 | xassert ((hash & ~INTMASK) == 0); |
| 4589 | 4589 | ||
| 4590 | /* Increment count after resizing because resizing may fail. */ | 4590 | /* Increment count after resizing because resizing may fail. */ |
| 4591 | maybe_resize_hash_table (h); | 4591 | maybe_resize_hash_table (h); |
| @@ -4870,7 +4870,7 @@ sxhash_string (ptr, len) | |||
| 4870 | hash = ((hash << 3) + (hash >> 28) + c); | 4870 | hash = ((hash << 3) + (hash >> 28) + c); |
| 4871 | } | 4871 | } |
| 4872 | 4872 | ||
| 4873 | return hash & VALMASK; | 4873 | return hash & INTMASK; |
| 4874 | } | 4874 | } |
| 4875 | 4875 | ||
| 4876 | 4876 | ||
| @@ -4938,7 +4938,7 @@ sxhash_bool_vector (vec) | |||
| 4938 | 4938 | ||
| 4939 | 4939 | ||
| 4940 | /* Return a hash code for OBJ. DEPTH is the current depth in the Lisp | 4940 | /* Return a hash code for OBJ. DEPTH is the current depth in the Lisp |
| 4941 | structure. Value is an unsigned integer clipped to VALMASK. */ | 4941 | structure. Value is an unsigned integer clipped to INTMASK. */ |
| 4942 | 4942 | ||
| 4943 | unsigned | 4943 | unsigned |
| 4944 | sxhash (obj, depth) | 4944 | sxhash (obj, depth) |
| @@ -5002,7 +5002,7 @@ sxhash (obj, depth) | |||
| 5002 | abort (); | 5002 | abort (); |
| 5003 | } | 5003 | } |
| 5004 | 5004 | ||
| 5005 | return hash & VALMASK; | 5005 | return hash & INTMASK; |
| 5006 | } | 5006 | } |
| 5007 | 5007 | ||
| 5008 | 5008 | ||