On Thu, Sep 29, 2016 at 10:53 AM, Dmitriy - <[email protected]> wrote:
> Hi,
>
> The v8 frame for callee (all for x64 platform) for full-codegen is:
>
> --------------
> return_addr
> saved frame ptr
> context
> JsFunction
> --------------
>
> You can see description in frames.h file - "StandardFrames are used for
> interpreted, full-codegen and optimized..."
>
> I try to implement ICs for my platform (not Intel) and I see following
> sequence of jumps:
> JSEntryStub-> ...->LoadICTrampolineStub -> LoadICStub::GenerateImpl ->
> LoadIC::GenerateMiss-> C function Runtime::kLoadIC_Miss ->...->
> test is "print(1)"
>
> How v8 code patch the IC stub? Or IC's stub just change state?
> I mean that how we call our function after generateMiss? We return in LoadIC
> stub?

If I understand your question right: V8 uses on-stack replacement (OSR
for short) to patch up the return address on the fly.

If the calling sequence looks like A -> B, then B updates the return
address* on the stack to return to newly generated stub C, not A.

* In reality the entire stack frame for A is replaced, not just the
return address.

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to