RESOLVED FIXED 164627
[DOMJIT] Document#body should have DOMJIT patchpoint
https://bugs.webkit.org/show_bug.cgi?id=164627
Summary [DOMJIT] Document#body should have DOMJIT patchpoint
Yusuke Suzuki
Reported 2016-11-10 17:31:38 PST
It should be easy! It requires some traversal things in ASM. But, it is what we did in CSSJIT!
Attachments
Patch (14.79 KB, patch)
2016-11-10 18:15 PST, Yusuke Suzuki
no flags
Patch (19.18 KB, patch)
2016-11-10 19:54 PST, Yusuke Suzuki
no flags
Patch (22.23 KB, patch)
2016-11-10 21:23 PST, Yusuke Suzuki
darin: review+
Patch for landing (24.41 KB, patch)
2016-11-10 21:49 PST, Yusuke Suzuki
no flags
Yusuke Suzuki
Comment 1 2016-11-10 17:52:14 PST
Ugh, autocorrection makes patchpoint => watchpoint.
Yusuke Suzuki
Comment 2 2016-11-10 18:15:30 PST
Created attachment 294455 [details] Patch WIP
WebKit Commit Bot
Comment 3 2016-11-10 18:19:11 PST
Attachment 294455 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 4 2016-11-10 19:54:29 PST
Created attachment 294463 [details] Patch WIP
Yusuke Suzuki
Comment 5 2016-11-10 21:23:43 PST
Darin Adler
Comment 6 2016-11-10 21:31:11 PST
Comment on attachment 294471 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=294471&action=review > Source/WebCore/dom/Document.idl:104 > + [DOMJIT, CEReactions, ImplementedAs=bodyOrFrameset, SetterMayThrowException] attribute HTMLElement? body; I have been trying to keep these extended attributes in alphabetical order. This means I would have put DOMJIT after CEReactions. Not sure if you have been doing this when adding DOMJIT to other attributes. It’s a bit annoying that DOMJIT implicitly means the getter, not the setter. > Source/WebCore/domjit/DOMJITHelpers.h:31 > +#include "Node.h" > #include "ScriptWrappable.h" Now that we are including Node.h we don’t need to include ScriptWrappable.h any more. > Source/WebCore/domjit/JSDocumentDOMJIT.cpp:114 > + RELEASE_ASSERT(!CAST_OFFSET(Node*, ContainerNode*)); > + RELEASE_ASSERT(!CAST_OFFSET(Node*, Element*)); > + RELEASE_ASSERT(!CAST_OFFSET(Node*, HTMLElement*)); I know I asked this on a previous patch: These can’t be compile-time assertions instead of runtime assertions?
Yusuke Suzuki
Comment 7 2016-11-10 21:40:26 PST
Comment on attachment 294471 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=294471&action=review >> Source/WebCore/dom/Document.idl:104 >> + [DOMJIT, CEReactions, ImplementedAs=bodyOrFrameset, SetterMayThrowException] attribute HTMLElement? body; > > I have been trying to keep these extended attributes in alphabetical order. This means I would have put DOMJIT after CEReactions. Not sure if you have been doing this when adding DOMJIT to other attributes. > > It’s a bit annoying that DOMJIT implicitly means the getter, not the setter. "It’s a bit annoying that DOMJIT implicitly means the getter, not the setter." Yeah, right. We should rename it to something like, `DOMJIT=Getter` thing. I'll upload the patch for that. >> Source/WebCore/domjit/DOMJITHelpers.h:31 >> #include "ScriptWrappable.h" > > Now that we are including Node.h we don’t need to include ScriptWrappable.h any more. Dropped. >> Source/WebCore/domjit/JSDocumentDOMJIT.cpp:114 >> + RELEASE_ASSERT(!CAST_OFFSET(Node*, HTMLElement*)); > > I know I asked this on a previous patch: These can’t be compile-time assertions instead of runtime assertions? Yeah, unfortunately. Since CAST_OFFSET uses reinterpret_cast, it cannot be evaluated at compile time. (And OBJECT_OFFSETOF is the same. That's why we cannot make XXX::offsetOfXXX() constexpr...) That's sad.
Yusuke Suzuki
Comment 8 2016-11-10 21:49:38 PST
Created attachment 294472 [details] Patch for landing
Yusuke Suzuki
Comment 9 2016-11-10 22:11:28 PST
Note You need to log in before you can comment on or make changes to this bug.