void endInlinedCommon(IRGS& env) { assertx(!curFunc(env)->isPseudoMain()); assertx(!resumed(env)); decRefLocalsInline(env); decRefThis(env); gen(env, InlineReturn, fp(env)); // Return to the caller function. Careful between here and the // updateMarker() below, where the caller state isn't entirely set up. env.inlineLevel--; env.bcStateStack.pop_back(); always_assert(env.bcStateStack.size() > 0); updateMarker(env); /* * After the end of inlining, we are restoring to a previously defined stack * that we know is entirely materialized (i.e. in memory), so stackDeficit * needs to be slammed to zero. * * The push of the return value in the caller of this function is not yet * materialized. */ assertx(env.irb->evalStack().empty()); env.irb->clearStackDeficit(); FTRACE(1, "]]] end inlining: {}\n", curFunc(env)->fullName()->data()); }
void endInlinedCommon(HTS& env) { assert(!env.fpiActiveStack.empty()); assert(!curFunc(env)->isPseudoMain()); assert(!resumed(env)); decRefLocalsInline(env); if (curFunc(env)->mayHaveThis()) { gen(env, DecRefThis, fp(env)); } /* * Pop the ActRec and restore the stack and frame pointers. It's * important that this does endInlining before pushing the return * value so stack offsets are properly tracked. */ gen(env, InlineReturn, fp(env)); // Return to the caller function. Careful between here and the // updateMarker() below, where the caller state isn't entirely set up. env.bcStateStack.pop_back(); env.fpiActiveStack.pop(); updateMarker(env); gen(env, ResetSP, StackOffset{env.irb->spOffset()}, fp(env)); /* * After the end of inlining, we are restoring to a previously defined stack * that we know is entirely materialized (i.e. in memory), so stackDeficit * needs to be slammed to zero. * * The push of the return value in the caller of this function is not yet * materialized. */ assert(env.irb->evalStack().empty()); env.irb->clearStackDeficit(); FTRACE(1, "]]] end inlining: {}\n", curFunc(env)->fullName()->data()); }