chromatic wrote:
On Monday 12 March 2007 10:52, Nuno Carvalho via RT wrote:
I've run the tests and didn't find any test failling because of this
change. With this change we can have "P99999999999..999", if a limit to
the number of digits (or size) in the register name is defined i can
change the lexer to accept only names inside the limit.
More testing is welcome.
What does this do to the register allocator and to memory usage? If I use
integer registers 10,000 and 100,000, will Parrot allocate a sparse data
structure?
The assumption is that if you're naming actual registers rather than
asking Parrot to allocate them for you, you are generating sensible
code. :-)
What does this give over using unlimited remappable symbolic registers?
In the .Net translator it was a lot easier to reference registers
numerically when generating PIR; I guess there will be other cases where
that is the case too. Using ".local"s would have made it harder (I
assume that's what you meant by symbolic). And yes, admittedly I was
using numeric remappable registers ($Inn and so on), rather than Inn
directly, but the win for doing so was small (and it was probably a
non-win in terms of PIR->PBC time).
On the patch itself, I think at least limit it to something that can
always fit in a 32-bit integer.
Jonathan