Thank you Alex and AlexG,
The definition of tail was the only thing I had to change in order to make
mPL work after expanding the cell to 4 words :) (ofcourse, I had to change
gen3m as well).
Using an index into an array to encode the function pointer seems like an
interesting idea. Although I th
One technique in C for mapping incompatible pointer or alignment sizes
(for when you can't, or don't want to, convert directly between
pointer and `intptr_t`) is to use an intermediate array, and instead
of storing native pointers, store indexes into this array.
For your case you could put all the
On Wed, Aug 26, 2020 at 11:16:48PM -0700, C K Kashyap wrote:
> About why I am trying it - it's primarily just a learning exercise for me.
> What I am trying is expanding the cell to 4 words instead of two and use
> the extra words as the meta data and not require tagged pointers. This way
I see.
Thanks Alex,
About why I am trying it - it's primarily just a learning exercise for me.
What I am trying is expanding the cell to 4 words instead of two and use
the extra words as the meta data and not require tagged pointers. This way
I could even build it with TCC that does not seem to align func
Hi Kashyap,
> I am still working on the idea of using non-tagged pointers in miniPicoLisp
> - in order to get rid of the requirement that function pointers be word
> aligned.
Why would you want to do that? The concept of encoding the tags in the lowest
bits of a pointer is the core idea of PicoLi
Hi Alex,
I am still working on the idea of using non-tagged pointers in miniPicoLisp
- in order to get rid of the requirement that function pointers be word
aligned. In the process I noticed that the definition of tail is as follows
-
#define tail(x) (((x)-1)->cdr)
Does this not result in