Mercurial > hg > xemacs-beta
comparison src/gc.c @ 5046:d4f666cda5e6
some random fixups
-------------------- ChangeLog entries follow: --------------------
man/ChangeLog addition:
2010-02-20 Ben Wing <ben@xemacs.org>
* internals/internals.texi (Intro to Window and Frame Geometry):
Shrink diagram to fit when offset by five spaces as a result of
quoting.
src/ChangeLog addition:
2010-02-20 Ben Wing <ben@xemacs.org>
* syswindows.h:
Add table about GNU Emacs -> XEmacs Windows constants from
the internals manual.
* frame.c:
Shrink size of diagram consistent with internals manual.
* alloc.c:
* compiler.h:
* console.c:
* events.c:
* gc.c (gc_stat_start_new_gc):
* gc.c (gc_stat_resume_gc):
* gc.c (kkcc_marking):
* gc.c (gc_1):
* gc.c (gc):
* objects-tty.c:
* redisplay-msw.c:
* redisplay-msw.c (mswindows_clear_region):
* syntax.c:
* syntax.c (ST_COMMENT_STYLE):
* sysdep.c:
Fix various compiler warnings.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 20 Feb 2010 03:24:08 -0600 |
parents | 2ade80e8c640 |
children | 24372c7e0e8f |
comparison
equal
deleted
inserted
replaced
5045:c3cc3fa503a2 | 5046:d4f666cda5e6 |
---|---|
182 gc_state.stat[GC_STAT_IN_LAST_GC] = \ | 182 gc_state.stat[GC_STAT_IN_LAST_GC] = \ |
183 gc_state.stat[GC_STAT_IN_THIS_GC]; \ | 183 gc_state.stat[GC_STAT_IN_THIS_GC]; \ |
184 gc_state.stat[GC_STAT_IN_THIS_GC] = 0; \ | 184 gc_state.stat[GC_STAT_IN_THIS_GC] = 0; \ |
185 GC_STAT_RESUME (stat) | 185 GC_STAT_RESUME (stat) |
186 | 186 |
187 void | 187 static void |
188 gc_stat_start_new_gc (void) | 188 gc_stat_start_new_gc (void) |
189 { | 189 { |
190 gc_state.n_gc[GC_STAT_TOTAL]++; | 190 gc_state.n_gc[GC_STAT_TOTAL]++; |
191 gc_state.n_cycles[GC_STAT_TOTAL]++; | 191 gc_state.n_cycles[GC_STAT_TOTAL]++; |
192 gc_state.n_cycles[GC_STAT_IN_LAST_GC] = gc_state.n_cycles[GC_STAT_IN_THIS_GC]; | 192 gc_state.n_cycles[GC_STAT_IN_LAST_GC] = gc_state.n_cycles[GC_STAT_IN_THIS_GC]; |
199 GC_STAT_RESTART (enqueued2); | 199 GC_STAT_RESTART (enqueued2); |
200 GC_STAT_RESTART (dequeued2); | 200 GC_STAT_RESTART (dequeued2); |
201 GC_STAT_RESTART (freed); | 201 GC_STAT_RESTART (freed); |
202 } | 202 } |
203 | 203 |
204 void | 204 static void |
205 gc_stat_resume_gc (void) | 205 gc_stat_resume_gc (void) |
206 { | 206 { |
207 gc_state.n_cycles[GC_STAT_TOTAL]++; | 207 gc_state.n_cycles[GC_STAT_TOTAL]++; |
208 gc_state.n_cycles[GC_STAT_IN_THIS_GC]++; | 208 gc_state.n_cycles[GC_STAT_IN_THIS_GC]++; |
209 GC_STAT_RESUME (enqueued); | 209 GC_STAT_RESUME (enqueued); |
1020 /* This function implements the KKCC mark algorithm. | 1020 /* This function implements the KKCC mark algorithm. |
1021 Instead of calling mark_object, all the alive Lisp_Objects are pushed | 1021 Instead of calling mark_object, all the alive Lisp_Objects are pushed |
1022 on the kkcc_gc_stack. This function processes all elements on the stack | 1022 on the kkcc_gc_stack. This function processes all elements on the stack |
1023 according to their descriptions. */ | 1023 according to their descriptions. */ |
1024 static void | 1024 static void |
1025 kkcc_marking ( | 1025 kkcc_marking (USED_IF_NEW_GC (cnt)) |
1026 #ifdef NEW_GC | |
1027 int cnt | |
1028 #else /* not NEW_GC */ | |
1029 int UNUSED(cnt) | |
1030 #endif /* not NEW_GC */ | |
1031 ) | |
1032 { | 1026 { |
1033 kkcc_gc_stack_entry *stack_entry = 0; | 1027 kkcc_gc_stack_entry *stack_entry = 0; |
1034 void *data = 0; | 1028 void *data = 0; |
1035 const struct memory_description *desc = 0; | 1029 const struct memory_description *desc = 0; |
1036 int pos; | 1030 int pos; |
1037 #ifdef NEW_GC | 1031 #ifdef NEW_GC |
1038 int count = cnt; | 1032 int obj_count = cnt; |
1039 #endif /* NEW_GC */ | 1033 #endif /* NEW_GC */ |
1040 #ifdef DEBUG_XEMACS | 1034 #ifdef DEBUG_XEMACS |
1041 int level = 0; | 1035 int level = 0; |
1042 #endif | 1036 #endif |
1043 | 1037 |
1180 } | 1174 } |
1181 } | 1175 } |
1182 | 1176 |
1183 #ifdef NEW_GC | 1177 #ifdef NEW_GC |
1184 if (cnt) | 1178 if (cnt) |
1185 if (!--count) | 1179 if (!--obj_count) |
1186 break; | 1180 break; |
1187 #endif /* NEW_GC */ | 1181 #endif /* NEW_GC */ |
1188 } | 1182 } |
1189 } | 1183 } |
1190 #endif /* USE_KKCC */ | 1184 #endif /* USE_KKCC */ |
1892 } | 1886 } |
1893 return 1; | 1887 return 1; |
1894 } | 1888 } |
1895 | 1889 |
1896 | 1890 |
1897 void | 1891 static void |
1898 gc_1 (int incremental) | 1892 gc_1 (int incremental) |
1899 { | 1893 { |
1900 switch (GC_PHASE) | 1894 switch (GC_PHASE) |
1901 { | 1895 { |
1902 case NONE: | 1896 case NONE: |
1928 case FINISH_GC: | 1922 case FINISH_GC: |
1929 break; | 1923 break; |
1930 } | 1924 } |
1931 } | 1925 } |
1932 | 1926 |
1933 void gc (int incremental) | 1927 static void |
1928 gc (int incremental) | |
1934 { | 1929 { |
1935 if (gc_currently_forbidden | 1930 if (gc_currently_forbidden |
1936 || in_display | 1931 || in_display |
1937 || preparing_for_armageddon) | 1932 || preparing_for_armageddon) |
1938 return; | 1933 return; |