The use would be to write immediate integer values (8, 16, 32, 64 bits in 2s complement) when generating code in the backend. At some point we need to be able to generate the machine-representation of those values.
I'm not sure how exactly it's handled right now. Erick has an address/pointer class with a getBytes() method. Constants have a getImmValue() method which simply returns a JavaScript number at the moment (which doesn't work for 64 bit integer values). This will need to change, and ideally be unified into one mechanism.
- Maxime
On 2011-02-14, at 2:28 PM, chevalma@iro.umontreal.ca wrote:
Marc, if you have time, I think it might be quite useful for the back-end to have a function to convert a bignum/num to an array of byte values.
Please explain exactly what you want (there are many variations possible). Where in the source can I find a use for this?
Marc
Tachyon-list mailing list Tachyon-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/tachyon-list