[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Feb 2 21:06:31 1998 
Subject:Re: Garbage Colection and O-O 
From: Robin Popplestone  
Volume-ID:980202.01 

Jonathan Cunning says:

> For some reason, I thought Poplog was like this:
                                       TAG
>         |------30 bit address --------|10|
>         |------30 bit integer --------|00|
>         |------30 bit float  ---------|01|

>Which has the advantage that you can add two integers using a single
>machine instruction. Nor do you need to de-tag the address: you just
>use an addressing mode with an appropriate offset. Since
>most of the time you are accessing fields within a record by such
>a mode anyway, it costs nothing, (e.g. to access the "back" of a
>pair, the offset is 2 instead of 4). There may be a small cost
>associated with accessing the key field (at nominal offset 0), which
>now needs an offset of -2, relative to the tagged address. But this
>cost will be a small fraction of the cost of de-tagging.

In the absence of a definitive contribution from the POPLOG implementors,
and being too lazy to write the minimal C code that would answer the
question, [I haven't worked on a POP implementation since pre-POPLOG times]
I'll give my reasons for why my recollection is right. Some time ago I
combined a line-finding program written in C with a larger system written
in POP-11. This involved POP-11 handing to C a large vector which was
chopped up by C into a lot of POP-11 records and handed back. This risky
operation didn't freak out the garbage collector, so I must have got it
right...?

Possibly there was a shift from the original POPLOG tagging convention
forced by the needs of the foreign language interface, because if you use
no tags for addresses then many POPLOG structures containing pointers can
be used as is by C (provided no garbage-collection occurs while control
is vested in C). On the other hand, if pointers are tagged within
data-structures, they are meaningless to C.

Robin.