2013/6/18 Mikael
<mikael.rcv@gmail.com>
So something is invalid about doing what I did in the printf above, which should correspond to
___SCMOBJ newref = (reference_location == IN_OBJECT) ? ((int*) container_body) : ___FAL;
Em. The ___SCMOBJ *is* the new location, isn't it, so this should have worked -
What did I miss, how is this done correctly?
Aah right - container_body needs to be given the proper header tag in order to be a ___SCMOBJ. So to get it:
When reference_location == IN_OBJECT , to container_body, I need to add an object type mask based on ___HD_WORDS(head) and ___HD_SUBTYPE(head) where head = container_body[-1] .
This would be done by applying on container_body, depending on its type:
* If fixnum: << ___TB + ___tFIXNUM
* If special object (#f etc.): << ___TB + ___tSPECIAL
* If pair: << ___TB + ___tPAIR
* If other type: How, there's some macros like __BODY , would any of those be of use?
Also would there be some macro for the fixnum/special/pair cases?