• Marius Wachtler's avatar
    Don't generate patchpoints for calls to fixed functions which don't need patching · 67360572
    Marius Wachtler authored
    Previously we generated patchpoints for every call because the callee could do a frame introspection
    and we could not retrieve the frame info without the additional patchpoint informations.
    
    This change moves all required information inside the FrameInfo.
    Because the FrameInfo does not have a fixed offset (different num of stack args and OSR functions reuse the frame info from the interpreter),
    we generate at function entry a stack variable which points to the frame_info and than we emit a stackmap intrinsic
    in order to know which basepointer relative address it has.
    The current statement inside the FrameInfo gets only updated on direct calls - patchpoints still attach it directly instead of updating the memory.
    Because always updating the variable is a small slowdown.
    
    This allows us todo inlining of trivial call sites at the llvm IR level.
    67360572
ast_interpreter.cpp 68.8 KB