comparison src/bytecode.h @ 3092:141c2920ea48

[xemacs-hg @ 2005-11-25 01:41:31 by crestani] Incremental Garbage Collector
author crestani
date Fri, 25 Nov 2005 01:42:08 +0000
parents a634e3b7acc8
children d674024a8674
comparison
equal deleted inserted replaced
3091:c22d8984148c 3092:141c2920ea48
28 Jon Reid: some changes for I18N3 (domain, etc), for 19.8. 28 Jon Reid: some changes for I18N3 (domain, etc), for 19.8.
29 */ 29 */
30 30
31 #ifndef INCLUDED_bytecode_h_ 31 #ifndef INCLUDED_bytecode_h_
32 #define INCLUDED_bytecode_h_ 32 #define INCLUDED_bytecode_h_
33
34 #ifdef NEW_GC
35 struct compiled_function_args
36 {
37 struct lrecord_header header;
38 long size;
39 Lisp_Object args[1];
40 };
41
42 typedef struct compiled_function_args Lisp_Compiled_Function_Args;
43
44 DECLARE_LRECORD (compiled_function_args, Lisp_Compiled_Function_Args);
45
46 #define XCOMPILED_FUNCTION_ARGS(x) \
47 XRECORD (x, compiled_function_args, Lisp_Compiled_Function_Args)
48 #define wrap_compiled_function_args(p) wrap_record (p, compiled_function_args)
49 #define COMPILED_FUNCTION_ARGS_P(x) RECORDP (x, compiled_function_args)
50 #define CHECK_COMPILED_FUNCTION_ARGS(x) \
51 CHECK_RECORD (x, compiled_function_args)
52 #define CONCHECK_COMPILED_FUNCTION_ARGS(x) \
53 CONCHECK_RECORD (x, compiled_function_args)
54
55 #define compiled_function_args_data(v) ((v)->args)
56 #define XCOMPILED_FUNCTION_ARGS_DATA(s) \
57 compiled_function_args_data (XCOMPILED_FUNCTION_ARGS (s))
58 #endif /* not NEW_GC */
33 59
34 /* Meanings of slots in a Lisp_Compiled_Function. 60 /* Meanings of slots in a Lisp_Compiled_Function.
35 Don't use these! For backward compatibility only. */ 61 Don't use these! For backward compatibility only. */
36 #define COMPILED_ARGLIST 0 62 #define COMPILED_ARGLIST 0
37 #define COMPILED_INSTRUCTIONS 1 63 #define COMPILED_INSTRUCTIONS 1
62 Lisp_Object instructions; 88 Lisp_Object instructions;
63 Lisp_Object constants; 89 Lisp_Object constants;
64 Lisp_Object arglist; 90 Lisp_Object arglist;
65 /* For speed, we unroll arglist into an array of argument symbols, so we 91 /* For speed, we unroll arglist into an array of argument symbols, so we
66 don't have to process arglist every time we make a function call. */ 92 don't have to process arglist every time we make a function call. */
93 #ifdef NEW_GC
94 Lisp_Object arguments;
95 #else /* not NEW_GC */
67 Lisp_Object *args; 96 Lisp_Object *args;
97 #endif /* not NEW_GC */
68 /* Minimum and maximum number of arguments. If MAX_ARGS == MANY, the 98 /* Minimum and maximum number of arguments. If MAX_ARGS == MANY, the
69 function was declared with &rest, and (args_in_array - 1) indicates 99 function was declared with &rest, and (args_in_array - 1) indicates
70 how many arguments there are before the &rest argument. (We could 100 how many arguments there are before the &rest argument. (We could
71 munge the max_non_rest_args into max_args by using a negative number, 101 munge the max_non_rest_args into max_args by using a negative number,
72 but that interferes with pdump marking. We don't want to use a flag 102 but that interferes with pdump marking. We don't want to use a flag