Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 10:17 PM +0200 10/29/04, Leopold Toetsch wrote: > >That leads again to my warnocked proposal to just toss all variants > >of opcodes that have constants too. With all possible PMC constants > >in the constants table, we get another (estimated) times two opcode > >count increase. > > > >Please consider to reduce constant usage to 4 opcodes: > > I have, and no. (though we can toss all the two-constant I, S, and N > forms) We leave things as-is. When we run up to our 1.0 release we > can run some analysis on the different compilers to see what ops > aren't being used and pare out the list at that point
As a compromise, it strikes me that we're using 32-bit numbers to encode registers, but only using five bits of that 32. Could we not have constants indicated by numbers starting at 32 or something similar? We could probably do something very clever to abstract it, like load all the constants into a reserved, dynamically-sized set of registers starting at [INSP]32. A scheme like this would allow us to consolidate the constant and register variants of all the ops, while still allowing us to use constants whenever we wanted. I'm not sure if the cost--allocating more register banks and loading the constants into those registers--is worth it, but it might be worth thinking about at least. -- Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> Perl and Parrot hacker There is no cabal.