Hi all,
After a much shorter cycle this time around, TXR 192 is out. Binaries at Bintray, as usual.
Basically, the theme is: marching forward with the compiler.
- I readjusted the VM environment structure to reduce the maximum display depth and widen the maximum frame sizes. Compiled code can use up to 64 frames, that can be up to 1024 words deep. Under naive compiling (the current state), every nesting of let consumes a level. 64 is a lot; the deepest I have observed across the TXR library is 17 or so. Because of this change, files compiled with 191 won't load (version number bump).
- Compiled files now declare their endian-ness. The VM machine language (not really "byte" code since it is made up of 32 bit words) is in local endian and written out that way. Now TXR will do the byte order swapping when it loads a compiled .tlo file made on an opposite endian machine. I tested this between PPC64 and x86, both directions.
- The unwind-protect form is miscompiled by TXR 191; that is fixed. (So you wouldn't want to run .tlo files from 191 anyway).
- I did some other things, like improve the apply function. Here is TXR 191 (or older):
1> (pprof (apply '+ 1 2 3 4 5 '(6 7)))
malloc bytes: 0
gc heap bytes: 176
total: 176
milliseconds: 0
28
Interpreted or compiled: it doesn't matter. Here is the same thing in 192:
1> (pprof (apply '+ 1 2 3 4 5 '(6 7)))
malloc bytes: 0
gc heap bytes: 0
total: 0
milliseconds: 0
28
zero bytes consed now, also interpreted or compiled. apply was doing some silly things, not taking full advantage of the stack based "struct args *"; it should have been fixed long ago. You start to notice things like this more when you have a compiler.
Cheers ...