Kurt StephensNerd Up! | ||
TradeoffsSubmitted by Kurt on Sun, 2009-11-29 21:31.
Pointers to data structures are almost never actually used “as is”, they are almost always used with a offset into a structure starting at an address.
struct cons {
value type;
value car;
value cdr;
};
For 32-bit word-aligned pointer As others have pointed out, all tag schemes have trade-offs. A trade-off for using non-zero bits for pointers might mean extra tag removal when communicating pointers to low-level code, e.g. C libraries. Fixed-size tags would likely simplify code and allow additional values besides small integers to be immediate values. I would encode Symbols like every other allocated object. — Kurt »
Reply |
||
Recent comments
14 weeks 3 days ago
27 weeks 2 days ago
29 weeks 5 days ago
30 weeks 14 min ago
30 weeks 1 hour ago
30 weeks 3 hours ago
30 weeks 5 hours ago
32 weeks 2 days ago
32 weeks 2 days ago
34 weeks 6 days ago