• Ross McIlroy's avatar
    [Interpreter] Remove new.target from fixed frame slot. · c820b89b
    Ross McIlroy authored
    Removes the new.target slot from the interpreter's fixed frame. Instead
    adds a field to BytecodeArray to get the bytecode's incoming
    new.target or generator object register. The InterpreterEntryTrampoline
    then sets this register with the incoming new.target (or generator object)
    when the function is called. This register can be directly the new.target
    or generator object variable if they are LOCAL location, otherwise it is a
    temporary register which is then moved to the variable's location during the
    function prologue.
    
    This fixes a hack in the deoptimizer where we would set the new.target fixed
    slot to undefined in order to avoid extending it's lifetime through the
    optimized code - now it's just a standard register and can be optimized away
    as normal.
    
    Bug=v8:6644
    
    Change-Id: Ieb8cc34cccefd9fb6634a90cbc77c6002a54f2ae
    Reviewed-on: https://chromium-review.googlesource.com/608966
    Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
    Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47320}
    c820b89b
ClassAndSuperClass.golden 4.29 KB