[webkit-dev] SFX instructions emission slow cases
fpizlo at apple.com
Wed Apr 18 01:48:50 PDT 2012
But the common case is typically going to be an integer addition or a double addition.
Therefore, the baseline JIT (which you seem to be looking at) has a fast path for the common cases and a slow path for the uncommon ones. The slow path almost always results in a C function call, which then does all of the magic necessary to satisfy JS semantics.
Similar things happen for almost all other JS instructions: there is a simple path for the cases we have found to be common and a slow-path C function call for the rare cases.
The slow paths are emitted as a separate piece of out-of-line code because that optimizes instruction cache locality for the main path, and helps a bit with branch prediction.
On Apr 18, 2012, at 1:39 AM, wingoog moon wrote:
> As I understand there are two passes to translate SFX bytecode to the native code(functions privateCompileMainPass() and privateCompileSlowCases()).
> So whats the purpose of privateCompileSlowCases(). Why we need slow cases for each bytecodeInstruction? Is it needed when arguments of instruction not integer or something else?
> Thanks for attention!
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev