Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!samsung!olivea!decwrl!world!iecc!compilers-sender From: henry@zoo.toronto.edu (Henry Spencer) Newsgroups: comp.compilers Subject: Re: SPARC tagged data Keywords: architecture Message-ID: <91-05-073@iecc.cambridge.ma.us> Date: 9 May 91 17:58:26 GMT References: <9104291542.AA11213@flora.techfak.uni-bielefeld.de> Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: henry@zoo.toronto.edu (Henry Spencer) Organization: U of Toronto Zoology Lines: 34 Approved: compilers@iecc.cambridge.ma.us In article 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 -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.