comparison src/bytecode.c @ 5432:46491edfd94a

Merge with trunk.
author Mats Lidell <matsl@xemacs.org>
date Sun, 07 Nov 2010 00:22:33 +0100
parents 308d34e9f07d 9f738305f80f
children 8d29f1c4bb98
comparison
equal deleted inserted replaced
5431:5cddeeeb25bb 5432:46491edfd94a
247 obj = wrong_type_argument (Qnumber_char_or_marker_p, obj); 247 obj = wrong_type_argument (Qnumber_char_or_marker_p, obj);
248 goto retry; 248 goto retry;
249 } 249 }
250 250
251 static Lisp_Object 251 static Lisp_Object
252 bytecode_nreverse (Lisp_Object list) 252 bytecode_nreverse (Lisp_Object sequence)
253 { 253 {
254 REGISTER Lisp_Object prev = Qnil; 254 if (LISTP (sequence))
255 REGISTER Lisp_Object tail = list;
256
257 while (!NILP (tail))
258 { 255 {
259 REGISTER Lisp_Object next; 256 REGISTER Lisp_Object prev = Qnil;
260 CHECK_CONS (tail); 257 REGISTER Lisp_Object tail = sequence;
261 next = XCDR (tail); 258
262 XCDR (tail) = prev; 259 while (!NILP (tail))
263 prev = tail; 260 {
264 tail = next; 261 REGISTER Lisp_Object next;
262 CHECK_CONS (tail);
263 next = XCDR (tail);
264 XCDR (tail) = prev;
265 prev = tail;
266 tail = next;
267 }
268 return prev;
265 } 269 }
266 return prev; 270 else
271 {
272 return Fnreverse (sequence);
273 }
267 } 274 }
268 275
269 276
270 /* We have our own two-argument versions of various arithmetic ops. 277 /* We have our own two-argument versions of various arithmetic ops.
271 Only two-argument arithmetic operations have their own byte codes. */ 278 Only two-argument arithmetic operations have their own byte codes. */