Re: SPARC tagged data

henry@zoo.toronto.edu (Henry Spencer)
Thu, 9 May 1991 17:58:26 GMT

          From comp.compilers

Related articles
SPARC tagged data horst@techfak.uni-bielefeld.de (1991-04-29)
Re: SPARC tagged data eb%watergate@lucid.com (Eric Benson) (1991-04-30)
Re: SPARC tagged data moss@cs.umass.edu (1991-04-30)
Re: SPARC tagged data weitek!weaver@Sun.COM (1991-04-30)
Re: SPARC tagged data kers@otter.hpl.hp.com (1991-05-07)
Re: SPARC tagged data pardo@june.cs.washington.edu (1991-05-08)
Re: SPARC tagged data henry@zoo.toronto.edu (1991-05-09)
Re: SPARC tagged data pardo@june.cs.washington.edu (1991-05-10)
| List of all articles for this month |

Newsgroups: comp.compilers
From: henry@zoo.toronto.edu (Henry Spencer)
Keywords: architecture
Organization: U of Toronto Zoology
References: <9104291542.AA11213@flora.techfak.uni-bielefeld.de> <MOSS.91Apr30083234@ibis.cs.umass.edu> <KERS.91May7093547@cdollin.hpl.hp.com>
Date: Thu, 9 May 1991 17:58:26 GMT

In article <KERS.91May7093547@cdollin.hpl.hp.com> kers@otter.hpl.hp.com (Chris Dollin) writes:
>Doesn't this choice make inter-language working unnecessarily hard? It means
>that structures containing pointers cannot be safely passed to (say) C ...


It may be impossible to pass structures to C anyway, because of other design
decisions made differently. Even calls between C and FORTRAN, which are
*much* closer in basic philosophy than C and Lisp-derived languages, have
many boobytraps and take careful attention on both ends.


Given that both ends know what is going on, actually, there is no disastrous
problem. The C code simply has to correct the values of incoming pointers
(in an inevitably machine-specific way -- all these conventions are quite
machine-specific!) before using them. This is, at worst, a fairly routine
problem of inter-language calls. It can be much worse.


>the fixnum tag should have been something other than 0.


Except that then you need a special adder which knows about it, because you
don't want the tag to change during (say) fixnum addition, and 0 is the only
one with that property. The low-bits-zero scheme potentially involves no
extra data-path hardware, because the same old adder will work and the
check-for-non-zero-bits hardware is already there for pointers.


>Isn't it nice when hardware does *almost* what you want?


Most Lispish-language users consider higher execution speed more important
than more convenient interlanguage calls. The hardware *is* doing what they
want.
--
Henry Spencer @ U of Toronto Zoology
  henry@zoo.toronto.edu utzoo!henry
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.