[movitz-cvs] CVS update: movitz/compiler.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Sat Apr 17 15:33:45 UTC 2004
Update of /project/movitz/cvsroot/movitz
In directory common-lisp.net:/tmp/cvs-serv14930
Modified Files:
compiler.lisp
Log Message:
Added "fast" implementations of cddr and cdddr, in an effort to reduce
cal/ret run-time and code-size overhead in list processing.
Date: Sat Apr 17 11:33:45 2004
Author: ffjeld
Index: movitz/compiler.lisp
diff -u movitz/compiler.lisp:1.52 movitz/compiler.lisp:1.53
--- movitz/compiler.lisp:1.52 Sat Apr 17 10:10:51 2004
+++ movitz/compiler.lisp Sat Apr 17 11:33:45 2004
@@ -8,7 +8,7 @@
;;;; Created at: Wed Oct 25 12:30:49 2000
;;;; Distribution: See the accompanying file COPYING.
;;;;
-;;;; $Id: compiler.lisp,v 1.52 2004/04/17 14:10:51 ffjeld Exp $
+;;;; $Id: compiler.lisp,v 1.53 2004/04/17 15:33:45 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -2054,6 +2054,17 @@
(setq p `((:call (:edi ,(global-constant-offset newf))))
next-pc (nthcdr 2 pc))
(explain nil "Changed [~S ~S] to ~S" i i2 newf)))
+ ((and (global-funcall-p i '(fast-cdr))
+ (global-funcall-p i2 '(fast-cdr))
+ (global-funcall-p i3 '(fast-cdr)))
+ (setq p `((:call (:edi ,(global-constant-offset 'fast-cdddr))))
+ next-pc (nthcdr 3 pc))
+ (explain nil "Changed (cdr (cdr (cdr :eax))) to (cdddr :eax)."))
+ ((and (global-funcall-p i '(fast-cdr))
+ (global-funcall-p i2 '(fast-cdr)))
+ (setq p `((:call (:edi ,(global-constant-offset 'fast-cddr))))
+ next-pc (nthcdr 2 pc))
+ (explain nil "Changed (cdr (cdr :eax)) to (cddr :eax)."))
((and (load-stack-frame-p i) (eq :eax (twop-dst i))
(global-funcall-p i2 '(fast-car fast-cdr))
(preserves-stack-location-p i3 (load-stack-frame-p i))
More information about the Movitz-cvs
mailing list