On Mon, Dec 24, 2001 at 03:19:39PM -0300, Daniel Grunblatt wrote:
> I think we should leave all that for an optimizer.

I agree with that

Sorry, my point wasn't clear:

I believe the current JIT description syntax precludes making a good optimiser.
By making all ops pass by reference, with no information to the JIT about
whether parameters are input, output, modified or not, we are making a system
where a future optimising JIT can't quickly know what it can do.

The current system is similar to perl5, where all subroutines are pass by
reference. Pass by reference has this disadvantage that the caller can't
know which parameters the subroutine expects to be able to modify.

We don't need to throw out the current 
"Place the address of the C<INTVAL> register specified in the I<n>th argument."

but the sooner we give people the ability to write jit descriptions something
like:

Parrot_set_i_i(in,out): \x8b \x0d &IR2 \x89 \x0d &IR1

rather than just

Parrot_set_i_i: \x8b \x0d &IR2 \x89 \x0d &IR1

the less we need to *redo* in future to give an optimising JIT more
information to work with. The current JIT can ignore the extra information.
But the extra information is there ready - we don't need to go over every
opcode again when we come to write an optimising JIT.

[or am I missing something - is it possible to write a tool to analyse the
op descriptions and infer this information about what modifies what?]

Nicholas Clark

Reply via email to