Mercurial > hg > xemacs-beta
comparison src/bytecode.c @ 3263:d674024a8674
[xemacs-hg @ 2006-02-27 16:29:00 by crestani]
- Introduce a fancy asynchronous finalization strategy on C level.
- Merge the code conditioned on MC_ALLOC into the code conditioned on
NEW_GC.
- Remove the possibility to free objects manually outside garbage
collections when the new collector is enabled.
author | crestani |
---|---|
date | Mon, 27 Feb 2006 16:29:29 +0000 |
parents | 141c2920ea48 |
children | 8f1ee2d15784 |
comparison
equal
deleted
inserted
replaced
3262:79d41cfd8e6b | 3263:d674024a8674 |
---|---|
2245 { XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, annotated) }, | 2245 { XD_LISP_OBJECT, offsetof (Lisp_Compiled_Function, annotated) }, |
2246 #endif | 2246 #endif |
2247 { XD_END } | 2247 { XD_END } |
2248 }; | 2248 }; |
2249 | 2249 |
2250 #if defined(MC_ALLOC) && !defined(NEW_GC) | |
2251 static void | |
2252 finalize_compiled_function (void *header, int for_disksave) | |
2253 { | |
2254 if (!for_disksave) | |
2255 { | |
2256 struct Lisp_Compiled_Function *cf = | |
2257 (struct Lisp_Compiled_Function *) header; | |
2258 if (cf->args_in_array) | |
2259 xfree (cf->args, Lisp_Object *); | |
2260 } | |
2261 } | |
2262 | |
2263 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("compiled-function", compiled_function, | |
2264 1, /*dumpable_flag*/ | |
2265 mark_compiled_function, | |
2266 print_compiled_function, | |
2267 finalize_compiled_function, | |
2268 compiled_function_equal, | |
2269 compiled_function_hash, | |
2270 compiled_function_description, | |
2271 Lisp_Compiled_Function); | |
2272 #else /* !MC_ALLOC || NEW_GC */ | |
2273 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("compiled-function", compiled_function, | 2250 DEFINE_BASIC_LRECORD_IMPLEMENTATION ("compiled-function", compiled_function, |
2274 1, /*dumpable_flag*/ | 2251 1, /*dumpable_flag*/ |
2275 mark_compiled_function, | 2252 mark_compiled_function, |
2276 print_compiled_function, 0, | 2253 print_compiled_function, 0, |
2277 compiled_function_equal, | 2254 compiled_function_equal, |
2278 compiled_function_hash, | 2255 compiled_function_hash, |
2279 compiled_function_description, | 2256 compiled_function_description, |
2280 Lisp_Compiled_Function); | 2257 Lisp_Compiled_Function); |
2281 #endif /* !MC_ALLOC || NEW_GC */ | |
2282 | 2258 |
2283 | 2259 |
2284 DEFUN ("compiled-function-p", Fcompiled_function_p, 1, 1, 0, /* | 2260 DEFUN ("compiled-function-p", Fcompiled_function_p, 1, 1, 0, /* |
2285 Return t if OBJECT is a byte-compiled function object. | 2261 Return t if OBJECT is a byte-compiled function object. |
2286 */ | 2262 */ |