[jsc-dev] Not adding DFG 32bit specialized code as much as possible!

Yusuke SUZUKI utatane.tea at gmail.com
Thu Apr 12 05:21:20 PDT 2018


Hi, WebKittens, in particular, JSC folks,

Recently I largely removed duplicate 32bit DFG code by unifying the
implementation of 32bit and 64bit. Initially, we have separate code for
32bit and 64bit. But as our DFG infrastructure grows, we have fancy DFG
features that enables writing unified implementation for 32bit and 64bit.
For example, JSValueRegs families offer the way to handle JSValue registers
transparently.

Unifying the code significantly reduces the size of
DFGSpeculativeJIT32_64.cpp. It reduces maintenance burden. In addition, it
finds bugs, for example, 32bit code sometimes lacks the changes done in
64bit code (e.g. mutatorFence). This unification finds and fixes such a bug.

So I suggest not adding code to DFGSpeculativeJIT32_64.cpp as much as
possible. We can implement large part of DFG code in 32/64 unified code
with our infrastructure. If your 32bit code is slightly different from
64bit code, I believe adding ifdef in DFGSpeculativeJIT.cpp is rather fine.
It highlights what our infrastructure is missing to implement it in unified
code. And later, such ifdefs will be removed.

Best regards,
Yusuke Suzuki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/jsc-dev/attachments/20180412/e8b743d2/attachment.html>


More information about the jsc-dev mailing list