Mercurial > hg > xemacs-beta
comparison src/alloc.c @ 1104:8b464283e891
[xemacs-hg @ 2002-11-12 18:58:13 by james]
Unconditionally compile the LISP_FLOAT_TYPE code. Remove all
!LISP_FLOAT_TYPE code and the LISP_FLOAT_TYPE identifier itself.
author | james |
---|---|
date | Tue, 12 Nov 2002 18:58:41 +0000 |
parents | 25e260cb7994 |
children | 37bdd24225ef |
comparison
equal
deleted
inserted
replaced
1103:80d9ab2e9855 | 1104:8b464283e891 |
---|---|
1093 | 1093 |
1094 /************************************************************************/ | 1094 /************************************************************************/ |
1095 /* Float allocation */ | 1095 /* Float allocation */ |
1096 /************************************************************************/ | 1096 /************************************************************************/ |
1097 | 1097 |
1098 #ifdef LISP_FLOAT_TYPE | |
1099 | |
1100 DECLARE_FIXED_TYPE_ALLOC (float, Lisp_Float); | 1098 DECLARE_FIXED_TYPE_ALLOC (float, Lisp_Float); |
1101 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_float 1000 | 1099 #define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_float 1000 |
1102 | 1100 |
1103 Lisp_Object | 1101 Lisp_Object |
1104 make_float (double float_value) | 1102 make_float (double float_value) |
1113 | 1111 |
1114 set_lheader_implementation (&f->lheader, &lrecord_float); | 1112 set_lheader_implementation (&f->lheader, &lrecord_float); |
1115 float_data (f) = float_value; | 1113 float_data (f) = float_value; |
1116 return wrap_float (f); | 1114 return wrap_float (f); |
1117 } | 1115 } |
1118 | |
1119 #endif /* LISP_FLOAT_TYPE */ | |
1120 | 1116 |
1121 | 1117 |
1122 /************************************************************************/ | 1118 /************************************************************************/ |
1123 /* Vector allocation */ | 1119 /* Vector allocation */ |
1124 /************************************************************************/ | 1120 /************************************************************************/ |
3647 if (ptr->args_in_array) xfree (ptr->args) | 3643 if (ptr->args_in_array) xfree (ptr->args) |
3648 | 3644 |
3649 SWEEP_FIXED_TYPE_BLOCK (compiled_function, Lisp_Compiled_Function); | 3645 SWEEP_FIXED_TYPE_BLOCK (compiled_function, Lisp_Compiled_Function); |
3650 } | 3646 } |
3651 | 3647 |
3652 | |
3653 #ifdef LISP_FLOAT_TYPE | |
3654 static void | 3648 static void |
3655 sweep_floats (void) | 3649 sweep_floats (void) |
3656 { | 3650 { |
3657 #define UNMARK_float(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader)) | 3651 #define UNMARK_float(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader)) |
3658 #define ADDITIONAL_FREE_float(ptr) | 3652 #define ADDITIONAL_FREE_float(ptr) |
3659 | 3653 |
3660 SWEEP_FIXED_TYPE_BLOCK (float, Lisp_Float); | 3654 SWEEP_FIXED_TYPE_BLOCK (float, Lisp_Float); |
3661 } | 3655 } |
3662 #endif /* LISP_FLOAT_TYPE */ | |
3663 | 3656 |
3664 static void | 3657 static void |
3665 sweep_symbols (void) | 3658 sweep_symbols (void) |
3666 { | 3659 { |
3667 #define UNMARK_symbol(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader)) | 3660 #define UNMARK_symbol(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader)) |
4064 &gc_count_bit_vector_storage); | 4057 &gc_count_bit_vector_storage); |
4065 | 4058 |
4066 /* Free all unmarked compiled-function objects */ | 4059 /* Free all unmarked compiled-function objects */ |
4067 sweep_compiled_functions (); | 4060 sweep_compiled_functions (); |
4068 | 4061 |
4069 #ifdef LISP_FLOAT_TYPE | |
4070 /* Put all unmarked floats on free list */ | 4062 /* Put all unmarked floats on free list */ |
4071 sweep_floats (); | 4063 sweep_floats (); |
4072 #endif | |
4073 | 4064 |
4074 /* Put all unmarked symbols on free list */ | 4065 /* Put all unmarked symbols on free list */ |
4075 sweep_symbols (); | 4066 sweep_symbols (); |
4076 | 4067 |
4077 /* Put all unmarked extents on free list */ | 4068 /* Put all unmarked extents on free list */ |
4579 pl = gc_plist_hack ("events-free", gc_count_num_event_freelist, pl); | 4570 pl = gc_plist_hack ("events-free", gc_count_num_event_freelist, pl); |
4580 pl = gc_plist_hack ("events-used", gc_count_num_event_in_use, pl); | 4571 pl = gc_plist_hack ("events-used", gc_count_num_event_in_use, pl); |
4581 HACK_O_MATIC (marker, "marker-storage", pl); | 4572 HACK_O_MATIC (marker, "marker-storage", pl); |
4582 pl = gc_plist_hack ("markers-free", gc_count_num_marker_freelist, pl); | 4573 pl = gc_plist_hack ("markers-free", gc_count_num_marker_freelist, pl); |
4583 pl = gc_plist_hack ("markers-used", gc_count_num_marker_in_use, pl); | 4574 pl = gc_plist_hack ("markers-used", gc_count_num_marker_in_use, pl); |
4584 #ifdef LISP_FLOAT_TYPE | |
4585 HACK_O_MATIC (float, "float-storage", pl); | 4575 HACK_O_MATIC (float, "float-storage", pl); |
4586 pl = gc_plist_hack ("floats-free", gc_count_num_float_freelist, pl); | 4576 pl = gc_plist_hack ("floats-free", gc_count_num_float_freelist, pl); |
4587 pl = gc_plist_hack ("floats-used", gc_count_num_float_in_use, pl); | 4577 pl = gc_plist_hack ("floats-used", gc_count_num_float_in_use, pl); |
4588 #endif /* LISP_FLOAT_TYPE */ | |
4589 HACK_O_MATIC (string, "string-header-storage", pl); | 4578 HACK_O_MATIC (string, "string-header-storage", pl); |
4590 pl = gc_plist_hack ("long-strings-total-length", | 4579 pl = gc_plist_hack ("long-strings-total-length", |
4591 gc_count_string_total_size | 4580 gc_count_string_total_size |
4592 - gc_count_short_string_total_size, pl); | 4581 - gc_count_short_string_total_size, pl); |
4593 HACK_O_MATIC (string_chars, "short-string-storage", pl); | 4582 HACK_O_MATIC (string_chars, "short-string-storage", pl); |
4872 init_string_alloc (); | 4861 init_string_alloc (); |
4873 init_string_chars_alloc (); | 4862 init_string_chars_alloc (); |
4874 init_cons_alloc (); | 4863 init_cons_alloc (); |
4875 init_symbol_alloc (); | 4864 init_symbol_alloc (); |
4876 init_compiled_function_alloc (); | 4865 init_compiled_function_alloc (); |
4877 #ifdef LISP_FLOAT_TYPE | |
4878 init_float_alloc (); | 4866 init_float_alloc (); |
4879 #endif /* LISP_FLOAT_TYPE */ | |
4880 init_marker_alloc (); | 4867 init_marker_alloc (); |
4881 init_extent_alloc (); | 4868 init_extent_alloc (); |
4882 init_event_alloc (); | 4869 init_event_alloc (); |
4883 #ifdef USE_KKCC | 4870 #ifdef USE_KKCC |
4884 init_key_data_alloc (); | 4871 init_key_data_alloc (); |