Fix frame state ctx merging
commit320e891a8774c9f8e8cae3e1b234ec38ab4a2798
authorJan Oravec <jan@fb.com>
Fri, 5 Nov 2021 21:55:32 +0000 (5 14:55 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 5 Nov 2021 21:57:02 +0000 (5 14:57 -0700)
tree74af89f2ce18eff66b8a5cbc08c5787d586cd2a1
parent7e41f87f9246f099d6e6711cebcb2922f9921d97
Fix frame state ctx merging

Summary:
If two frames with different ctx are merged, we did not clear ctx.

This situation was not possible before D29354257, because we always eagerly
loaded the context before any opportunity to execute control flow. After
D29354257, we may perform control flow due to guards before the context of
a closure is updated.

Since we may lose ctx, add tracking of context type, which may help us
determine the exact type when inlining.

Reviewed By: ricklavoie

Differential Revision: D32208751

fbshipit-source-id: ba967d00d7a55001588db3981e838d701ef1edff
hphp/runtime/vm/jit/frame-state.cpp
hphp/runtime/vm/jit/frame-state.h
hphp/runtime/vm/jit/irgen-internal.h