comparison src/bytecode.c @ 4959:bd169a24a554

merge
author Ben Wing <ben@xemacs.org>
date Thu, 28 Jan 2010 04:27:30 -0600
parents db2db229ee82
children e813cf16c015
comparison
equal deleted inserted replaced
4893:99f2102552d7 4959:bd169a24a554
1744 return stack_ptr; 1744 return stack_ptr;
1745 } 1745 }
1746 1746
1747 1747
1748 DOESNT_RETURN 1748 DOESNT_RETURN
1749 invalid_byte_code (const CIbyte *reason, Lisp_Object frob) 1749 invalid_byte_code (const Ascbyte *reason, Lisp_Object frob)
1750 { 1750 {
1751 signal_error (Qinvalid_byte_code, reason, frob); 1751 signal_error (Qinvalid_byte_code, reason, frob);
1752 } 1752 }
1753 1753
1754 /* Check for valid opcodes. Change this when adding new opcodes. */ 1754 /* Check for valid opcodes. Change this when adding new opcodes. */
2216 int docp = f->flags.documentationp; 2216 int docp = f->flags.documentationp;
2217 int intp = f->flags.interactivep; 2217 int intp = f->flags.interactivep;
2218 struct gcpro gcpro1, gcpro2; 2218 struct gcpro gcpro1, gcpro2;
2219 GCPRO2 (obj, printcharfun); 2219 GCPRO2 (obj, printcharfun);
2220 2220
2221 write_c_string (printcharfun, print_readably ? "#[" : "#<compiled-function "); 2221 write_ascstring (printcharfun, print_readably ? "#[" : "#<compiled-function ");
2222 #ifdef COMPILED_FUNCTION_ANNOTATION_HACK 2222 #ifdef COMPILED_FUNCTION_ANNOTATION_HACK
2223 if (!print_readably) 2223 if (!print_readably)
2224 { 2224 {
2225 Lisp_Object ann = compiled_function_annotation (f); 2225 Lisp_Object ann = compiled_function_annotation (f);
2226 if (!NILP (ann)) 2226 if (!NILP (ann))
2229 #endif /* COMPILED_FUNCTION_ANNOTATION_HACK */ 2229 #endif /* COMPILED_FUNCTION_ANNOTATION_HACK */
2230 /* COMPILED_ARGLIST = 0 */ 2230 /* COMPILED_ARGLIST = 0 */
2231 print_internal (compiled_function_arglist (f), printcharfun, escapeflag); 2231 print_internal (compiled_function_arglist (f), printcharfun, escapeflag);
2232 2232
2233 /* COMPILED_INSTRUCTIONS = 1 */ 2233 /* COMPILED_INSTRUCTIONS = 1 */
2234 write_c_string (printcharfun, " "); 2234 write_ascstring (printcharfun, " ");
2235 { 2235 {
2236 struct gcpro ngcpro1; 2236 struct gcpro ngcpro1;
2237 Lisp_Object instructions = compiled_function_instructions (f); 2237 Lisp_Object instructions = compiled_function_instructions (f);
2238 NGCPRO1 (instructions); 2238 NGCPRO1 (instructions);
2239 if (STRINGP (instructions) && !print_readably) 2239 if (STRINGP (instructions) && !print_readably)
2246 print_internal (instructions, printcharfun, escapeflag); 2246 print_internal (instructions, printcharfun, escapeflag);
2247 NUNGCPRO; 2247 NUNGCPRO;
2248 } 2248 }
2249 2249
2250 /* COMPILED_CONSTANTS = 2 */ 2250 /* COMPILED_CONSTANTS = 2 */
2251 write_c_string (printcharfun, " "); 2251 write_ascstring (printcharfun, " ");
2252 print_internal (compiled_function_constants (f), printcharfun, escapeflag); 2252 print_internal (compiled_function_constants (f), printcharfun, escapeflag);
2253 2253
2254 /* COMPILED_STACK_DEPTH = 3 */ 2254 /* COMPILED_STACK_DEPTH = 3 */
2255 write_fmt_string (printcharfun, " %d", compiled_function_stack_depth (f)); 2255 write_fmt_string (printcharfun, " %d", compiled_function_stack_depth (f));
2256 2256
2257 /* COMPILED_DOC_STRING = 4 */ 2257 /* COMPILED_DOC_STRING = 4 */
2258 if (docp || intp) 2258 if (docp || intp)
2259 { 2259 {
2260 write_c_string (printcharfun, " "); 2260 write_ascstring (printcharfun, " ");
2261 print_internal (compiled_function_documentation (f), printcharfun, 2261 print_internal (compiled_function_documentation (f), printcharfun,
2262 escapeflag); 2262 escapeflag);
2263 } 2263 }
2264 2264
2265 /* COMPILED_INTERACTIVE = 5 */ 2265 /* COMPILED_INTERACTIVE = 5 */
2266 if (intp) 2266 if (intp)
2267 { 2267 {
2268 write_c_string (printcharfun, " "); 2268 write_ascstring (printcharfun, " ");
2269 print_internal (compiled_function_interactive (f), printcharfun, 2269 print_internal (compiled_function_interactive (f), printcharfun,
2270 escapeflag); 2270 escapeflag);
2271 } 2271 }
2272 2272
2273 UNGCPRO; 2273 UNGCPRO;
2274 write_c_string (printcharfun, print_readably ? "]" : ">"); 2274 write_ascstring (printcharfun, print_readably ? "]" : ">");
2275 } 2275 }
2276 2276
2277 2277
2278 static Lisp_Object 2278 static Lisp_Object
2279 mark_compiled_function (Lisp_Object obj) 2279 mark_compiled_function (Lisp_Object obj)