[webkit-dev] Difference between jit/JITArithmetic32_64 and jit/JITArithmetic

Filip Pizlo fpizlo at apple.com
Fri Feb 17 10:47:16 PST 2012

The JIT class is quite large, and so its implementation is broken up into multiple files.  The manner in which it is broken up is somewhat arbitrary, with the main goal being to not have any outrageously large .cpp files.  Here's the intuition I use for finding what I want:

JIT.cpp: the harness that runs the JIT and a few utility functions that are not related to any particular bytecode opcode.
JITArithmetic.cpp: implementation of arithmetic instructions.
JITCall.cpp: implementation of calling convention, including call instructions.
JITPropertyAccess.cpp: implementation of heap access instructions.
JITOpcodes.cpp: implementation of miscellaneous instructions that don't fit into the above.

But there is also a second split: the JIT can either be generating code that uses the 32_64 value representation, or the 64-bit value representation.  These two representations require two completely different code generators and most of the code in the JIT is specialized on one or the other.  Hence any file that is marked 32_64 (like JITArithmetic32_64) contains implementations for the 32_64 value representation, whereas files that do not have "32_64" in them are implementing either the 64-bit value representation, or code that is agnostic towards value representation.


On Feb 17, 2012, at 7:02 AM, wingoog moon wrote:

> HI All.
> Can't understand difference between jit/JITArithmetic32_64 and jit/JITArithmetic.
> Both of them are implementing JIT class. So when program calls functions from JITArithmetic and when JITArithmetic32_64.
> I also noticed that that there is JITOpcodes class, which is also implementing JIT class. Why we need this class.
> P.s 
> Sorry for bad English
> thanks for answers.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

More information about the webkit-dev mailing list