|
Lines 1-3
a/Source/WebCore/ChangeLog_sec1
|
|
|
1 |
2016-11-04 Yusuke Suzuki <utatane.tea@gmail.com> |
| 2 |
|
| 3 |
[DOMJIT] Add DOMJIT::Signature annotation to Document::getElementById |
| 4 |
https://bugs.webkit.org/show_bug.cgi?id=164356 |
| 5 |
|
| 6 |
Reviewed by Filip Pizlo. |
| 7 |
|
| 8 |
This patch implements DOMJIT::Signature annotation for getElementById. |
| 9 |
Since getElementById is also implemented in DocumentFragment, we implement |
| 10 |
the branchIfDocumentFragment/branchIfNotDocumentFragment for that. |
| 11 |
|
| 12 |
In dromaeo, we have a test like this. |
| 13 |
|
| 14 |
test( "getElementById", function(){ |
| 15 |
for ( var i = 0; i < num * 30; i++ ) { |
| 16 |
ret = document.getElementById("testA" + num).nodeType; |
| 17 |
ret = document.getElementById("testB" + num).nodeType; |
| 18 |
ret = document.getElementById("testC" + num).nodeType; |
| 19 |
ret = document.getElementById("testD" + num).nodeType; |
| 20 |
ret = document.getElementById("testE" + num).nodeType; |
| 21 |
ret = document.getElementById("testF" + num).nodeType; |
| 22 |
} |
| 23 |
}); |
| 24 |
|
| 25 |
In the above test, JSC already knows the following things. |
| 26 |
|
| 27 |
1. Since nodeType is now handled as CallDOMGetter, we know that it is pure. |
| 28 |
2. getElementById look up becomes PureGetById since document is impure object. But it is kept as PureGetById. So it does not write DOMState. |
| 29 |
3. `"testA" + num` will be converted to constant string. |
| 30 |
4. CallDOM for getElementById said it just reads(DOMState:DOM). And it saids that it returns the same value as long as DOMState is not clobbered. |
| 31 |
5. CheckCell leading CallDOM ensures the inlined getElementById node. (CallDOM node). |
| 32 |
|
| 33 |
The key thing is that no node clobbers DOMState during the loop. So CallDOM & CallDOMGetter can be hoisted. |
| 34 |
This improves dom-query significantly. Dromaeo dom-query getElementById becomes 40x faster (247796 v.s. 6197). |
| 35 |
Dromaeo dom-query getElementById (not in document) becomes 89x faster (630317.8 v.s. 7066.). |
| 36 |
|
| 37 |
Tests: js/dom/domjit-function-get-element-by-id-changed.html |
| 38 |
js/dom/domjit-function-get-element-by-id-licm.html |
| 39 |
js/dom/domjit-function-get-element-by-id.html |
| 40 |
|
| 41 |
* dom/NonElementParentNode.idl: |
| 42 |
* domjit/DOMJITCheckDOM.h: |
| 43 |
(WebCore::DOMJIT::TypeChecker<DocumentFragment>::branchIfFail): |
| 44 |
* domjit/DOMJITHelpers.h: |
| 45 |
(WebCore::DOMJIT::branchIfDocumentFragment): |
| 46 |
(WebCore::DOMJIT::branchIfNotDocumentFragment): |
| 47 |
|
| 1 |
2016-11-04 Joanmarie Diggs <jdiggs@igalia.com> |
48 |
2016-11-04 Joanmarie Diggs <jdiggs@igalia.com> |
| 2 |
|
49 |
|
| 3 |
AX: [ATK] Attempting to clear selection on ARIA listboxes results in crash |
50 |
AX: [ATK] Attempting to clear selection on ARIA listboxes results in crash |