[webkit-dev] Non JS Function call.
Oliver Hunt
oliver at apple.com
Tue Jul 24 14:05:01 PDT 2012
op_call_NotJSFunction is only referenced during the final linking phase.
Actual compilation requires two distinct operations: 1) planting the call instruction and 2) linking the call target after the code has been relocated. Here is the (64-bit) version of the call + link logic:
...
preserveReturnAddressAfterCall(regT3);
emitPutToCallFrameHeader(regT3, RegisterFile::ReturnPC);
emitPutImmediateToCallFrameHeader(0, RegisterFile::CodeBlock);
storePtr(callFrameRegister, &m_globalData->topCallFrame);
restoreArgumentReference();
Call callCallNotJSFunction = call(); <-- here is the call
emitGetFromCallFrameHeaderPtr(RegisterFile::CallerFrame, callFrameRegister);
restoreReturnAddressBeforeReturn(regT3);
ret();
...
patchBuffer.link(callCallNotJSFunction, FunctionPtr(cti_op_call_NotJSFunction)); <-- here is us linking the call
--Oliver
On Jul 24, 2012, at 1:45 PM, vahe vardanyan wrote:
> Grep gives nothing, there is only one mention of op_call_NotJSFunction in privateCompileCTIMachineTrampolines(JITOpcodes.cpp), but I don't see any call instruction there.
>
> Still can't understand how calls orgonized in SXF.
>
> On 24 July 2012 20:07, Filip Pizlo <fpizlo at apple.com> wrote:
>
> On Jul 24, 2012, at 5:51 AM, vahe vardanyan <vahagner at gmail.com> wrote:
>
> > Hi all.
> >
> > As I understand in SFX all non JS functions calls go trough JITStubs:op_call_NotJSFunction function.
> >
> > But in which point, where, the op_call_NotJSFunction function is called?
>
> It's called from code generated by the JIT. I would start by running a command called "grep" on the code in the "jit" directory to search for mentions of NotJSFunction.
>
> >
> > Can anyone please explain how function calls are implemented in SFX(simple jit).
> >
> > Thanks for attention
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo/webkit-dev
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev
More information about the webkit-dev
mailing list