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

Saam Barati sbarati at apple.com
Thu Apr 12 08:19:27 PDT 2018

> On Apr 12, 2018, at 5:21 AM, Yusuke SUZUKI <utatane.tea at gmail.com> wrote:
> 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.
mutatorFence isn’t needed on 32-bit since it doesn’t have the concurrent GC.

> 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.
This seems like a good approach to me.

- Saam
> Best regards,
> Yusuke Suzuki
> _______________________________________________
> jsc-dev mailing list
> jsc-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/jsc-dev

More information about the webkit-dev mailing list