• Jakob Gruber's avatar
    [deoptimizer] More consistent semantics of height for all frame types · 9fe6b543
    Jakob Gruber authored
    Information required for deoptimization is passed from codegen to the
    deoptimizer through so-called translations. Translations contain,
    among many other things, a 'height' field. It is used during deopts to
    calculate the unoptimized frame height (but note that it does not
    correspond exactly to the frame height itself - further calculations
    on the deopt side are needed to get to the real frame height).
    
    The height field has roughly the following data flow:
    
    1. During codegen, we serialize whatever
    FrameStateDescriptor::GetHeight() returns.
    2. During deopts, serialized translations are converted into
    TranslatedFrame objects in TranslatedState::CreateNextTranslatedFrame.
    3. These are later used to arrive at the real frame height in multiple
    spots, e.g. in DoComputeInterpretedFrame and friends.
    
    Prior to this CL, we were adding and subtracting 1 in basically random
    spots. For example, for interpreted and construct stub frames we added
    1 in step 1 and subtracted 1 in step 3. For continuation frames, we
    added 1 in step 2 and subtracted it in step 3. Argument adaptor frames
    were left untouched.
    
    This CL removes all these +-1's. The height field now contains
    locals_count() for interpreted frames, and parameters_count() for
    everything else. I also tried to make the meaning of adds/subs clearer
    through use of named constants like kTheReceiver.
    
    Bug: v8:9534
    Change-Id: I6fd26886ff5aa63930f413d879d5480578d9dc7e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751724Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
    Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
    Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Auto-Submit: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#63238}
    9fe6b543
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
ast Loading commit data...
base Loading commit data...
builtins Loading commit data...
codegen Loading commit data...
common Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
d8 Loading commit data...
date Loading commit data...
debug Loading commit data...
deoptimizer Loading commit data...
diagnostics Loading commit data...
execution Loading commit data...
extensions Loading commit data...
flags Loading commit data...
handles Loading commit data...
heap Loading commit data...
ic Loading commit data...
init Loading commit data...
inspector Loading commit data...
interpreter Loading commit data...
json Loading commit data...
libplatform Loading commit data...
libsampler Loading commit data...
logging Loading commit data...
numbers Loading commit data...
objects Loading commit data...
parsing Loading commit data...
profiler Loading commit data...
protobuf Loading commit data...
regexp Loading commit data...
roots Loading commit data...
runtime Loading commit data...
sanitizer Loading commit data...
snapshot Loading commit data...
strings Loading commit data...
tasks Loading commit data...
third_party Loading commit data...
torque Loading commit data...
tracing Loading commit data...
trap-handler Loading commit data...
utils Loading commit data...
wasm Loading commit data...
zone Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...