KJS::Value::isValid()
Harri Porten
porten@trolltech.com
Sat, 25 Jan 2003 02:53:03 +0100 (CET)
On Fri, 24 Jan 2003, Maciej Stachowiak wrote:
> > It would be great if you could also add this function in JavaScriptCore
> > and go through the code and replace all occurences of isNull() with
> > !isValid() and vice versa. I admit that's a bit tedious. Be careful :)
>
> I'll work on incorporating this change.
Thanks. Normally I would have provided a patch but in this case that code
is probably too different.
> Are there other particularly important changes we should pick up from 3.1?
There were several small fixes but until I got the diff smaller it's hard
to reliably detect then. Out of my head I don't recall any serious issues,
though. One way to find out would be to run the tests in khtmltests/js as
almost every fix got a corresponding test there (note: a handfull of
tests fails with kjs HEAD, too).
I had started to extend the Nodes classes to
a) optimize constant handling (folding+specialized functions)
b) have direct conversion functions like Node::toBoolean() that avoid
creation of temporary Value objects.
But this is still in an experimental phase and won't lead to a ground
breaking speed-up until fully done.
I'll continue merging code and feeding you with patches when it promises
to ease a complete synchronization.
There's one search&replace style change you could apply to simplify
merging: make all Node::evaluate() functions const like this:
- Value evaluate(ExecState *exec);
+ virtual Value evaluate(ExecState *exec) const;
At least Node::throwError() will have to become a const function, too.
Harri.