aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* (mark_object): Don't reprocess marked strings.Stefan Monnier2009-11-131-49/+45
| | | | | Check vector's markbit earlier. Adjust calls to mark_vectorlike. (mark_vectorlike, mark_char_table): Assume the object is unmarked.
* * frame.c (make_initial_frame):Dan Nicolaescu2009-11-111-2/+2
| | | | | | * buffer.c (init_buffer_once): Use make_pure_c_string instead of build_string. * alloc.c (syms_of_alloc): Build Vmemory_signal_data in pure memory.
* Let integers use up 2 tags to give them one extra bit and double their range.Stefan Monnier2009-11-061-4/+3
| | | | | | | | | | | | | | | | | | | | | | * lisp.h (USE_2_TAGS_FOR_INTS): New macro. (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P): New macros. (enum Lisp_Type): Use them. Give explicit values. (Lisp_Type_Limit): Remove. (XINT, XUINT, make_number) [!USE_LISP_UNION_TYPE]: (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK): Pay attention to USE_2_TAGS_FOR_INTS. (INTEGERP): Use LISP_INT_TAG_P. * fns.c (internal_equal): Simplify the default case. (sxhash): Use case_Lisp_Int. * data.c (wrong_type_argument): Don't check against Lisp_Type_Limit any more. (Ftype_of): Use case_Lisp_Int. (store_symval_forwarding): Take into account the fact that Ints can now have more than one tag. * buffer.c (syms_of_buffer): Use LISP_INT_TAG. buffer_slot_type_mismatch): * xfaces.c (face_attr_equal_p): * print.c (print_object): * alloc.c (mark_maybe_object, mark_object, survives_gc_p): Use case_Lisp_Int.
* (make_pure_c_string): Fix last change to avoid compiler warning.Eli Zaretskii2009-11-061-1/+1
|
* * xterm.c (syms_of_xterm):Dan Nicolaescu2009-11-061-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xselect.c (syms_of_xselect): * xmenu.c (syms_of_xmenu): * xfns.c (syms_of_xfns): * xfaces.c (syms_of_xfaces): * xdisp.c (syms_of_xdisp): * window.c (syms_of_window): * w32fns.c (syms_of_w32fns): * undo.c (syms_of_undo): * textprop.c (syms_of_textprop): * terminal.c (syms_of_terminal): * syntax.c (syms_of_syntax): * sound.c (syms_of_sound): * search.c (syms_of_search): * print.c (syms_of_print): * minibuf.c (syms_of_minibuf): * macros.c (syms_of_macros): * keymap.c (syms_of_keymap, initial_define_key) (initial_define_lispy_key): * keyboard.c (syms_of_keyboard): * insdel.c (syms_of_insdel): * image.c (syms_of_image): * fringe.c (syms_of_fringe): * frame.c (syms_of_frame): * fontset.c (syms_of_fontset): * fns.c (syms_of_fns): * fns.c (syms_of_fns): * fileio.c (syms_of_fileio): * fileio.c (syms_of_fileio): * eval.c (syms_of_eval): * doc.c (syms_of_doc): * dispnew.c (syms_of_display): * dired.c (syms_of_dired): * dbusbind.c (syms_of_dbusbind): * data.c (syms_of_data): * composite.c (syms_of_composite): * coding.c (syms_of_coding): * cmds.c (syms_of_cmds): * charset.c (define_charset_internal, syms_of_character): * ccl.c (syms_of_ccl): * category.c (syms_of_category, init_category_once): * casetab.c (syms_of_casetab): * casefiddle.c (syms_of_casefiddle): * callint.c (syms_of_callint): * bytecode.c (syms_of_bytecode): * buffer.c (keys_of_buffer, syms_of_buffer): * alloc.c (syms_of_alloc): * process.c (syms_of_process, init_process): * lread.c (syms_of_lread, init_obarray): * font.c (build_style_table): * emacs.c (syms_of_emacs, main): Replace calls to intern with intern_c_string, calls to make_pure_string with make_pure_c_string. Use pure_cons instead of Fcons. * process.c (socket_options): Make it const. (set_socket_option, init_process): Use a const pointer. * lread.c (intern_c_string): New function. (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool) (defvar_int): Uset it. Make the name const char*. * font.c (struct table_entry): Remove unused member. Make NAMES constant. (weight_table, slant_table, width_table): Make constant. * emacs.c (struct standard_args): Make name and longname constant.
* * alloc.c (make_pure_c_string): New function.Dan Nicolaescu2009-11-061-0/+18
| | | | * eval.c (Fautoload): Purecopy all arguments.
* * alloc.c: Do not define struct catchtag.Dan Nicolaescu2009-10-191-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c: Move struct catchtag definition ... * lisp.h: ... here. * image.c: Move png.h #include earlier to avoid warnings. * xterm.c: * xsmfns.c: * xselect.c: * xrdb.c: * xmenu.c: * xftfont.c: * xfont.c: * xfns.c: * xfaces.c: * xdisp.c: * window.c: * widget.c: * w32xfns.c: * w32uniscribe.c: * w32term.c: * w32select.c: * w32reg.c: * w32proc.c: * w32menu.c: * w32inevt.c: * w32heap.c: * w32font.c: * w32fns.c: * w32console.c: * w32.c: * w16select.c: * vm-limit.c: * unexsol.c: * unexec.c: * unexcw.c: * unexaix.c: * undo.c: * tparam.c: * textprop.c: * terminfo.c: * terminal.c: * termcap.c: * term.c: * syntax.c: * sound.c: * sheap.c: * search.c: * scroll.c: * region-cache.c: * regex.c: * ralloc.c: * process.c: * print.c: * msdos.c: * minibuf.c: * menu.c: * marker.c: * macros.c: * keymap.c: * keyboard.c: * intervals.c: * insdel.c: * indent.c: * gtkutil.c: * ftxfont.c: * ftfont.c: * fringe.c: * frame.c: * fontset.c: * font.c: * fns.c: * floatfns.c: * filelock.c: * fileio.c: * emacs.c: * editfns.c: * dosfns.c: * doprnt.c: * doc.c: * dispnew.c: * dired.c: * dbusbind.c: * data.c: * composite.c: * coding.c: * cmds.c: * cm.c: * chartab.c: * charset.c: * character.c: * ccl.c: * category.c: * casetab.c: * casefiddle.c: * callproc.c: * callint.c: * bytecode.c: * buffer.c: * atimer.c: Include setjmp.h. (Bug#4643) * xlwmenu.c: * lwlib.c: * lwlib-utils.c: * lwlib-Xm.c: * lwlib-Xlw.c: * lwlib-Xaw.c: Include setjmp.h.
* (mark_char_table): New function.Kenichi Handa2009-08-251-0/+33
| | | | (mark_object): Use mark_char_table for a char-table.
* * lisp.h (XFLOAT_DATA): Produce an rvalue by adding 0 to the value.Ken Raeburn2009-08-171-2/+2
| | | | | | | (XFLOAT_INIT): New macro for storing a float value. * alloc.c (make_float, make_pure_float): Use XFLOAT_INIT. * fns.c (sxhash): Copy out the value of a float in order to examine its bytes. * dbusbind.c (xd_append_arg): Likewise.
* (mark_stack): Properly conditionalize previous change.Dan Nicolaescu2009-01-301-1/+2
|
* (mark_stack): Use "flushw" instead of "ta 3" assembly call forChong Yidong2009-01-231-0/+4
| | | | Sparc64.
* Add 2009 to copyright years.Glenn Morris2009-01-081-1/+1
|
* (NSTATICS): Bump to 0x640.Eli Zaretskii2008-08-021-1/+1
|
* * lisp.h:Dan Nicolaescu2008-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * w32heap.c: * emacs.c: * alloc.c: Replace all references of NO_UNION_TYPE with USE_LISP_UNION_TYPE. * m/xtensa.h (NO_UNION_TYPE): * m/vax.h (NO_UNION_TYPE): * m/template.h (NO_UNION_TYPE): * m/sparc.h (NO_UNION_TYPE): * m/mips.h (NO_UNION_TYPE): * m/macppc.h (NO_UNION_TYPE): * m/m68k.h (NO_UNION_TYPE): * m/iris4d.h (NO_UNION_TYPE): * m/intel386.h (NO_UNION_TYPE): * m/ibms390x.h (NO_UNION_TYPE): * m/ibms390.h (NO_UNION_TYPE): * m/ibmrs6000.h (NO_UNION_TYPE): * m/ia64.h (NO_UNION_TYPE): * m/hp800.h (NO_UNION_TYPE): * m/arm.h (NO_UNION_TYPE): * m/amdx86-64.h (NO_UNION_TYPE): * m/alpha.h (NO_UNION_TYPE): Remove definition, all platform were defining it the same.
* Use __sparc__ rather than sparc. (Bug#507.)Glenn Morris2008-07-081-1/+1
|
* Make "xfree (NULL)" a no-op; remove useless if-before-xfree.Jim Meyering2008-06-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (xfree): Return right away for a NULL arg. * src/lread.c (nosuffix): Remove now-useless if-before-xfree tests. * src/gtkutil.c (xg_gtk_scroll_destroy): Likewise. * src/mac.c (create_apple_event_from_event_ref): Likewise. (create_apple_event_from_drag_ref, cfstring_create_normalized): Likewise. * src/doprnt.c (doprnt1): Likewise. * src/frame.c (frame): Likewise. * src/keyboard.c (wipe_kboard): Likewise. * src/macterm.c (x_free_frame_resources, xlfdpat_destroy, XFreePixmap): (init_font_name_table, mac_unload_font, x_delete_display): Likewise. * src/term.c (tty_default_color_capabilities, maybe_fatal) (delete_tty): Likewise. * src/w16select.c (string): Likewise. * src/w32.c (w32_get_resource, SET_ENV_BUF_SIZE): Likewise. * src/w32bdf.c (w32_free_bdf_font): Likewise. * src/w32fns.c (w32_unload_font): Likewise. * src/w32font.c (w32font_close): Likewise. * src/window.c (size_window): Likewise. * src/xselect.c (receive_incremental_selection): Likewise. * src/xterm.c (x_free_frame_resources, x_delete_display): Likewise. * src/mactoolbox.c (create_apple_event_from_drag_ref): Likewise. * src/w32.c (stat): Likewise.
* (init_alloc_once): Call init_weak_hash_tables.Chong Yidong2008-05-151-0/+1
|
* Switch to recommended form of GPLv3 permissions notice.Glenn Morris2008-05-141-6/+4
|
* Merge from emacs--rel--22Miles Bader2008-04-231-0/+6
|\ | | | | | | Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1121
| * [!SYSTEM_MALLOC && !SYNC_INPUT] (uninterrupt_malloc)YAMAMOTO Mitsuharu2008-04-121-0/+6
| | | | | | | | [HAVE_GTK_AND_PTHREAD && !DOUG_LEA_MALLOC]: Don't use recursive mutex.
* | Consolidate the image_cache to the terminal struct.Stefan Monnier2008-02-221-36/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * termhooks.h (P_): Remove redundant def. (struct terminal): New field `image_cache'. * frame.h (FRAME_IMAGE_CACHE): New macro. Use it everywhere in place of FRAME_X_IMAGE_CACHE. * xterm.h (struct x_display_info): Remove image_cache field. (FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead. * w32term.h (struct w32_display_info): Remove image_cache field. (FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead. * macterm.h (struct mac_display_info): Remove image_cache field. (FRAME_X_IMAGE_CACHE): Remove. Use FRAME_IMAGE_CACHE instead. * xterm.c (x_term_init): * w32term.c (w32_term_init): * macterm.c (mac_term_init): Set the image_cache in the terminal. * dispextern.h (clear_image_cache, forall_images_in_image_cache): Remove declarations. (clear_image_caches, mark_image_cache): New declarations. * xfaces.c (clear_face_cache): * xdisp.c (redisplay_internal): Use clear_image_caches. * image.c (clear_image_cache): Don't check that a frame is on a window-system before checking if it shares the same cache. (clear_image_caches): New function. (Fclear_image_cache): Use it. (mark_image): Move from allo.c. (mark_image_cache): Move from alloc.c and forall_images_in_image_cache. * alloc.c (mark_image, mark_image_cache): Move to image.c. (mark_object): Don't call mark_image_cache for frames. (mark_terminals): Call mark_image_cache.
* | (mark_buffer): Comment fix to clarify the status of Lisp fields.Stefan Monnier2008-02-111-0/+2
| |
* | Merge from emacs--devo--0Miles Bader2008-01-301-5/+1
|\ \ | | | | | | | | | Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
| * | * movemail.c:Dan Nicolaescu2008-01-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * make-docfile.c: Remove reference to symbols defined by systems not supported anymore: MAC_OS8, XENIX and STRIDE. * (src/m/mips.h): * (src/m/intel386.h): * callproc.c: * config.in: * ecrt0.c: * emacs.c: * fileio.c: * frame.c: * getpagesize.h: * keyboard.c: * lread.c: * process.c: * puresize.h: * sysdep.c: * systty.h: * syswait.h: * unexec.c: * xdisp.c: * alloc.c: Remove code containing references to symbols defined by unsupported systems.
* | | Merge from emacs--devo--0Miles Bader2008-01-091-1/+2
|\ \ \ | |/ / | | | | | | Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-312
| * | Merge from emacs--rel--22Miles Bader2008-01-081-1/+2
| |\ \ | | |/ | | | | | | Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
| | * Add 2008 to copyright years.Glenn Morris2008-01-081-1/+2
| | |
| | * (reset_malloc_hooks): Set the hooks to the previousAndreas Schwab2007-09-161-3/+3
| | | | | | | | | | | | values instead of zapping them.
| | * (pure): Round PURESIZE up.Andreas Schwab2007-08-191-1/+1
| | |
* | | Merge from emacs--devo--0Miles Bader2007-12-061-21/+1
|\ \ \ | |/ / | | | | | | Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-294
| * | * alloc.c (allocate_other_vector):Stefan Monnier2007-11-161-16/+0
| | | | | | | | | | | | * lisp.h (allocate_other_vector): Remove.
| * | * alloc.c (ALLOCATE_PSEUDOVECTOR): Move to lisp.h.Stefan Monnier2007-11-161-5/+1
| | | | | | | | | | | | | | | | | | | | | (allocate_pseudovector): Make non-static. * lisp.h (enum pvec_type): New tag PVEC_OTHER. (allocate_pseudovector): Declare. (ALLOCATE_PSEUDOVECTOR): Move from alloc.c
* | | (NSTATICS): Revert spurious change made in last merge.Jason Rumney2007-10-291-1/+1
| | |
* | | Merge from emacs--devo--0Miles Bader2007-10-271-37/+38
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches applied: * emacs--devo--0 (patch 902-908) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 131-137) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 261-262) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-278
| * | (spare_memory, stack_copy, stack_copy_size, ignore_warnings, Vdead,Juanma Barranquero2007-10-261-36/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | dont_register_blocks, staticvec, staticidx, interval_block, n_interval_blocks, init_strings, check_string_bytes, check_sblock, init_float, free_float, n_cons_blocks, init_cons, all_vectors, n_vectors, symbol_block, symbol_block_index, symbol_free_list, n_symbol_blocks, init_symbol, marker_block, marker_free_list, n_marker_blocks, init_marker, valid_pointer_p, make_pure_float, last_marked, mark_object_loop_halt): Make static.
* | | Merge from emacs--devo--0Miles Bader2007-10-191-12/+13
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches applied: * emacs--devo--0 (patch 890-898) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 122-128) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 257-258) - Merge from emacs--rel--22 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
| * | (free_misc): Use XMISCTYPE.Stefan Monnier2007-10-171-5/+5
| | | | | | | | | | | | (live_misc_p, gc_sweep): Use Lisp_Misc_Any.
| * | (Fpurecopy): Set the pvec tag on pseudo vectors.Stefan Monnier2007-10-161-1/+4
| | |
| * | * lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.Stefan Monnier2007-10-161-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (XMISCANY): New macro. (XMISCTYPE): Use it. (struct Lisp_Misc_Any): New type. (union Lisp_Misc): Use it. (struct Lisp_Buffer_Local_Value): Add `local_if_set' bit. * data.c (Fboundp, store_symval_forwarding, swap_in_global_binding) (find_symbol_value, set_internal, default_value, Fset_default) (Fmake_variable_buffer_local, Fmake_local_variable) (Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p) (Flocal_variable_if_set_p, Fvariable_binding_locus): The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set. * alloc.c (allocate_buffer): Set the size and tag. (allocate_misc, mark_maybe_object, mark_object, survives_gc_p): Use XMISCANY. (die): Follow the GNU convention for error messages. * print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set. * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the tag any more. (set_buffer_internal_1): * frame.c (store_frame_param): * eval.c (specbind): * xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
* | | Fix up multi-tty mergeMiles Bader2007-10-121-46/+4
| | | | | | | | | | | | | | | Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-261 Creator: Stefan Monnier <monnier@iro.umontreal.ca>
* | | Merge from emacs--devo--0Miles Bader2007-10-111-266/+264
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches applied: * emacs--devo--0 (patch 866-879) - Merge multi-tty branch - Update from CVS - Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
| * | (mark_terminals): Typo.Stefan Monnier2007-10-021-1/+1
| | |
| * | * window.h (struct window):Stefan Monnier2007-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * window.c (struct save_window_data, struct saved_window): * termhooks.h (struct terminal): * process.h (struct Lisp_Process): * frame.h (struct frame): * buffer.h (struct buffer): * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table) (struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table): The size field of (pseudo)vectors is now unsigned. (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly.
| * | * lisp.h (struct Lisp_Hash_Table): Move non-traced elements at the end.Stefan Monnier2007-10-021-38/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Turn `count' into an integer. * fns.c (make_hash_table, hash_put, hash_remove, hash_clear) (sweep_weak_table, sweep_weak_hash_tables, Fhash_table_count): * print.c (print_object) <HASH_TABLE_P>: `count' is an int. * alloc.c (allocate_hash_table): Use ALLOCATE_PSEUDOVECTOR. (mark_object) <HASH_TABLE_P>: Use mark_vectorlike.
| * | (mark_object): Fix typo.Stefan Monnier2007-10-021-7/+8
| | |
| * | (allocate_pseudovector): New fun.Stefan Monnier2007-10-021-131/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (ALLOCATE_PSEUDOVECTOR): New macro. (allocate_window, allocate_terminal, allocate_frame) (allocate_process): Use it. (mark_vectorlike): New function. (mark_object) <FRAMEP, WINDOWP, BOOL_VECTOR_P, VECTORP>: Use it. (mark_terminals): Use it. (Fmake_bool_vector, Fmake_char_table, make_sub_char_table) (Fmake_byte_code): Use XSETPVECTYPE.
| * | (enum mem_type): Replace all vector subtypes -> MEM_TYPE_VECTORLIKE.Stefan Monnier2007-09-291-36/+18
| | | | | | | | | | | | | | | | | | | | | (allocate_vectorlike): Remove type argument. Adjust callers. (live_vector_p, mark_maybe_pointer, valid_lisp_object_p): Only handle the one remaining MEM_TYPE_VECTORLIKE. (mark_terminal): Remove left-over declaration.
| * | (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): New macrosStefan Monnier2007-09-291-73/+44
| | | | | | | | | | | | | | | | | | | | | to avoid unnecessary BLOCK_INPUTs when SYNC_INPUT is used. (xmalloc, xrealloc, xfree, lisp_malloc, lisp_free, lisp_align_malloc) (lisp_align_free, make_interval, allocate_vectorlike, allocate_string_data) (make_float, Fcons, allocate_string, Fmake_symbol, allocate_misc): Use them.
| * | (allocate_terminal): Set the vector size to only count the Lisp fields.Stefan Monnier2007-09-271-17/+13
| | | | | | | | | | | | | | | | | | | | | Initialize those to nil. (mark_object): Don't treat terminals specially. (mark_terminal): Remove. (mark_terminals): Use mark_object instead.
| * | (gc_sweep): Check cons cell mark bits word by wordRichard M. Stallman2007-09-231-14/+42
| | | | | | | | | | | | and optimize the case where they are all 1.