• 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
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...