Also, assertion failures on debug builds. Patch forthcoming.
Even worse than that - there is a case that causes a crash in release build, too. This seems way more broken than I thought, still investigating...
Created attachment 13520 [details] test case (will crash)
Created attachment 13523 [details] kill Expression::optimize() The expression optimization seems pretty much completely broken to me at the moment. Everything from optimize() to isConstant() has major problems (though it could be that I'm misunderstanding the design, of course). I suggest just removing it. I have checked that fast/xpath tests take exactly the same time as they did.
Created attachment 13528 [details] kill Expression::optimize() Oops, forgot to include ChangeLogs.
Comment on attachment 13528 [details] kill Expression::optimize() r=me If we want to do an optimization like this in the future we should make some performance test cases and make sure they actually get faster.
Landed in r20051.