comparison src/bytecode.c @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents 8eaf7971accc
children a2f645c6b9f8
comparison
equal deleted inserted replaced
184:bcd2674570bf 185:3d6bfa290dbd
292 CHECK_STRING (bytestr); 292 CHECK_STRING (bytestr);
293 if (!VECTORP (vector)) 293 if (!VECTORP (vector))
294 vector = wrong_type_argument (Qvectorp, vector); 294 vector = wrong_type_argument (Qvectorp, vector);
295 CHECK_NATNUM (maxdepth); 295 CHECK_NATNUM (maxdepth);
296 296
297 stackp = (Lisp_Object *) alloca (XINT (maxdepth) * sizeof (Lisp_Object)); 297 stackp = alloca_array (Lisp_Object, XINT (maxdepth));
298 memset (stackp, 0, XINT (maxdepth) * sizeof (Lisp_Object)); 298 memset (stackp, 0, XINT (maxdepth) * sizeof (Lisp_Object));
299 GCPRO3 (bytestr, vector, *stackp); 299 GCPRO3 (bytestr, vector, *stackp);
300 gcpro3.nvars = XINT (maxdepth); 300 gcpro3.nvars = XINT (maxdepth);
301 301
302 --stackp; 302 --stackp;
303 stack = stackp; 303 stack = stackp;
304 stacke = stackp + XINT (maxdepth); 304 stacke = stackp + XINT (maxdepth);
305 305
306 /* Initialize the pc-register and convert the string into a fixed-width 306 /* Initialize the pc-register and convert the string into a fixed-width
307 format for easier processing. */ 307 format for easier processing. */
308 massaged_code = 308 massaged_code = alloca_array (Emchar,
309 (Emchar *) alloca (sizeof (Emchar) * 309 1 + string_char_length (XSTRING (bytestr)));
310 (1 + string_char_length (XSTRING (bytestr))));
311 massaged_code_len = 310 massaged_code_len =
312 convert_bufbyte_string_into_emchar_string (XSTRING_DATA (bytestr), 311 convert_bufbyte_string_into_emchar_string (XSTRING_DATA (bytestr),
313 XSTRING_LENGTH (bytestr), 312 XSTRING_LENGTH (bytestr),
314 massaged_code); 313 massaged_code);
315 massaged_code[massaged_code_len] = 0; 314 massaged_code[massaged_code_len] = 0;
1053 1052
1054 case Belt: 1053 case Belt:
1055 #if 0 1054 #if 0
1056 /* probably this code is OK, but nth_entry is commented 1055 /* probably this code is OK, but nth_entry is commented
1057 out above --ben */ 1056 out above --ben */
1058 if (XTYPE (TOP) == Lisp_Cons) 1057 if (XTYPE (TOP) == Lisp_Type_Cons)
1059 { 1058 {
1060 /* Exchange args and then do nth. */ 1059 /* Exchange args and then do nth. */
1061 v2 = POP; 1060 v2 = POP;
1062 v1 = TOP; 1061 v1 = TOP;
1063 goto nth_entry; 1062 goto nth_entry;