home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!decwrl!mips!darwin.sura.net!jvnc.net!yale.edu!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.lang.lisp
- Subject: Re: dynamic-extent control transfers
- Date: 22 Jul 1992 21:22:28 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 29
- Distribution: comp
- Message-ID: <14kjikINNdj5@early-bird.think.com>
- References: <JBA.92Jul22143439@kix.ai.mit.edu>
- NNTP-Posting-Host: telecaster.think.com
-
- In article <JBA.92Jul22143439@kix.ai.mit.edu> jba@ai.mit.edu (Jonathan Amsterdam) writes:
- >2. Associate a unique tag with each block and invalidate the tag on return
- > from the block.
- >
- >(2) is cheap but requires consing, which seems counter
- >to the whole point of giving control transfers dynamic extent.
-
- I think I'd go with (2). I don't think the whole point of making exit
- points dynamic extent was to save on consing, at least not to this extent.
- It's to save the need to cons a representation of the entire control state.
-
- > (The unique
- >tag could start out being a fixnum, eliminating consing for the first
- >couple of billion occurrences, but eventually you'd have to either cons
- >bignums or wrap around, risking tag duplication.)
-
- The tag only has to be unique for a particular exit point. So they won't
- have to increment as often as if there was a single, global ID generator.
-
- If you're worried about using generic arithmetic for this, you could simply
- have a two-fixnum tag field, and roll your own double-precision integer
- arithmetic routine using fixnum arithmetic. Given typical fixnum sizes,
- this should be enough to re-enter a block every microsecond for several to
- several thousand years.
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-