Bug 164006

Summary: [DOMJIT][CSSJIT] Share code with DOMJIT
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, ggaren, saam, sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 164004    
Bug Blocks:    
Attachments:
Description Flags
Patch mark.lam: review+

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]
Patch
Comment 4 Mark Lam 2016-10-27 12:48:14 PDT
Comment on attachment 293042 [details]
Patch

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