WebCore 146

Maciej Stachowiak mjs at apple.com
Thu Jul 8 10:07:20 CEST 2004


On Jul 7, 2004, at 8:33 AM, Harri Porten wrote:

> On Wed, 7 Jul 2004, Zack Rusin wrote:
>
>> Harri do you by think you'll be able to get a merge diff for it 
>> anytime
>> soon? I'm not sure whether I should be adding diffing of 
>> JavaScriptCore
>> to my weekend's todo as well.
>
>> From reading the ChangeLog my impression was that most of the 
>> activity was
> evolving around features not relevant for KDE (like the Objective C)
> bindings. Merging general improvements (like string and GC 
> optimizations)
> would be nice but I find it increasingly difficult to spot the relevant
> diffs among other changes.
>
> So I might study the diffs but I'm not optimistic about large patches
> emerging from that.

You can just ignore the "bindings" subdirectory where the 
irrelevant-to-KDE stuff is and stick to the kjs/ directory.

Here are individual patches I have lying around for the string stuff:

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 24fun-speed-fixes.patch.txt
Url: http://mail.kde.org/pipermail/khtml-devel/attachments/20040708/da54cfad/24fun-speed-fixes.patch-0001.txt
-------------- next part --------------

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: prepend-optimization.patch.txt
Url: http://mail.kde.org/pipermail/khtml-devel/attachments/20040708/da54cfad/prepend-optimization.patch-0001.txt
-------------- next part --------------

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: shared-substring.patch.txt
Url: http://mail.kde.org/pipermail/khtml-devel/attachments/20040708/da54cfad/shared-substring.patch-0001.txt
-------------- next part --------------


Note, these are buggy as-is, Darin did an important fix that has this 
ChangeLog entry:

        * kjs/ustring.cpp: (KJS::UString::append): Fix one case that was 
allocating a buffer
         that is 2x too big.


Here are patches for the conservative GC change, some affect both the 
JavaScriptCore and WebCore trees:

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gc-part1.patch.txt
Url: http://mail.kde.org/pipermail/khtml-devel/attachments/20040708/da54cfad/gc-part1.patch-0001.txt
-------------- next part --------------

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gc-part2.patch.txt
Url: http://mail.kde.org/pipermail/khtml-devel/attachments/20040708/da54cfad/gc-part2.patch-0001.txt
-------------- next part --------------

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gc-part3.patch.txt
Url: http://mail.kde.org/pipermail/khtml-devel/attachments/20040708/da54cfad/gc-part3.patch-0001.txt
-------------- next part --------------



We don't have this GC on by default in your tree yet, but I tested it 
and it seems to work and provide a significant boost on JS-intensive 
pages and benchmarks.


And here are two subtle but very important semantic changes to JS 
behavior.

1) Determine prototypes according to current lexical scope, rather than 
the interpreter that started execution, this is needed to match other 
browsers and causes nasty bugs on some pages:

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: obj-proto-change.patch.txt
Url: http://mail.kde.org/pipermail/khtml-devel/attachments/20040708/da54cfad/obj-proto-change.patch-0001.txt
-------------- next part --------------


2) Make sure DOM wrapper objects are shared between different 
interpreters with access to the same doc (though caching lifetime is 
still detrmined by the node's document:

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: share-dom-wrappers.patch.txt
Url: http://mail.kde.org/pipermail/khtml-devel/attachments/20040708/da54cfad/share-dom-wrappers.patch-0001.txt
-------------- next part --------------


These are the most important JS/DOM related changes I can think of.




More information about the Khtml-devel mailing list