Following our discussion earlier today, it seems to me that the
general transformation below would be helpful:

[expr0 =] expr1 op expr2;

to:

t1 = expr1;
t2 = expr2;
[t0 = &expr0]   // using C terminology here, see below (plus not sure
on execution order, is this right?)
[*t0 =] t1 op t2;

where [] indicates optionality. Obviously I can't really do &expr0, so
that would break into cases, like:

array[expr]

becomes

t0=expr;
array[t0]

and so forth.

This is obviously doing more than the comma operator, but it seems it
would be useful to expand all operations for debugging. Note that if
you do only the comma operator, you still end up with stuff like:

expr1 op (expr2, expr3) op expr4

which would have to become

t1=expr1
t2=expr2
t3=expr3
t4=expr4
t1 op (t2, t3) op t4

which led me to think it was easier to just expand them all. Obviously
where exprn is just a variable, then the temp should be omitted.

Obviously this transformation would only be applied in debugging mode.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to 
http://groups.google.com/group/google-caja-discuss
To unsubscribe, email [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to