Bug 164006 - [DOMJIT][CSSJIT] Share code with DOMJIT
Summary: [DOMJIT][CSSJIT] Share code with DOMJIT
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
Depends on: 164004
  Show dependency treegraph
Reported: 2016-10-25 23:47 PDT by Yusuke Suzuki
Modified: 2016-10-27 13:03 PDT (History)
4 users (show)

See Also:

Patch (8.18 KB, patch)
2016-10-27 12:29 PDT, Yusuke Suzuki
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2016-10-25 23:47:21 PDT
This should be nice!
Comment 1 Yusuke Suzuki 2016-10-25 23:48:45 PDT
For example, CSS JIT selector compiler has getDocument function. This is super useful for Node.ownerDocument implementation in DOMJIT.

In the mean time, in Node.ownerDocument side, we just reimplement it. But eventually, we should change CSSJIT's Assembler use to CCallHelpers and share the helper functions with DOMJIT.
Comment 2 Yusuke Suzuki 2016-10-26 02:43:48 PDT
CCallHelper is tightly coupled with JS JIT. So using MacroAssembler for CSSJIT is ok.
We will extract some methods into DOMJIT namespace to share it with CSSJIT.

I think putting to DOMJIT is ok since these helper methods are related to DOM.
Comment 3 Yusuke Suzuki 2016-10-27 12:29:05 PDT
Created attachment 293042 [details]
Comment 4 Mark Lam 2016-10-27 12:48:14 PDT
Comment on attachment 293042 [details]

Comment 5 Yusuke Suzuki 2016-10-27 13:03:31 PDT
Committed r207999: <http://trac.webkit.org/changeset/207999>