Use IRSPRelOffset instead of FPRelOffset in AStack's internals
commitd29aec11419ac4fd8005210d4a561ab19d18c74b
authorJan Oravec <jan@fb.com>
Mon, 8 Mar 2021 20:16:40 +0000 (8 12:16 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 8 Mar 2021 20:19:22 +0000 (8 12:19 -0800)
tree365d01858e85efa7568eb7163af724bd99efe4bd
parent51302919f6d68254f2c02d512c7e9ae9a4c1e6a5
Use IRSPRelOffset instead of FPRelOffset in AStack's internals

Summary:
FPRelOffset was a weird choice for tracking stack positions, as there may be
multiple frames in the translation and they may not even live on the stack. The
meaning of FPRelOffset in this case was heavily overloaded -- it was an offset
relative to the stack base of the top frame.

Use IRSPRelOffset instead, which is already given by most of the users. The
only exceptions are places where the value already came from AStack's high/low
bounds, and a few places in frame-state.cpp, which were broken for inlined
code, as they incorrectly used FPRelOffsets relative to the current frame.

This diff fixes them.

Reviewed By: ricklavoie, oulgen

Differential Revision: D26878633

fbshipit-source-id: 68042a81e04bf60fdabdef7f550b48df387d4fde
hphp/runtime/vm/jit/alias-class.cpp
hphp/runtime/vm/jit/alias-class.h
hphp/runtime/vm/jit/frame-state.cpp
hphp/runtime/vm/jit/stack-offsets.h