gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: si::proper-list type propagation


From: Camm Maguire
Subject: [Gcl-devel] Re: si::proper-list type propagation
Date: 26 Feb 2006 11:30:34 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

Robert Boyer <address@hidden> writes:

> > Safety requires some sort of no-side-effects property to compiled functions
> 
> Fortran 66 tried to impose the notion that all functions had no side effects
> at all!  This permitted all sorts of compiler expression optimization, e.g.,
> commutativity and constant folding.  It is a mystery to me why Lisp has never
> had a (PROCLAIM '(NO-SIDE-EFFECTS foo)) declaration.  It clearly should, to
> get better compiled code, considering it is sooo... applicative, sometimes,
> anyway.

The compiler could detect and propagate this property.  Problems arise
with interpreted functions, and functions not called via their symbols
(where is the property to be stored?  Likely need a new C function
type).  Not to mention functions that are called in newly defun'ed
functions but are not yet defined, etc.

Are there any other side-effect producing primitives other than rplaca
rplacd and aset?

The primary benefit that would accrue would be list processing with
safety non-zero.  GCL has always blindly 'cdr'ed at safety 0.  Not
sure how valuable this would be in practice to real users.

Take care,

> 
> Concerning passing the return value via the register, I can remember that the
> first time I met rms, at MCC, in about 1986, he looked at some KCL output and
> said he could see how to make the then brand new GCC do a much better job for
> Lisp.  I suspect a better job, including better use of registers, is going to
> be needed if GCL is going to catch up with OCAML!  And the 64 bit X86 has so
> many extra registers, it is a natural thing to contemplate.
> 
> Bob
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]