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
9 weeks 2 days ago
19 weeks 3 days ago
38 weeks 1 day ago
1 year 2 weeks ago
1 year 35 weeks ago
1 year 48 weeks ago
1 year 50 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago
1 year 51 weeks ago