Fix updateMarker() in prologues by using SrcKey instead of Offset
commit938e2a05f970035292fdbb0971bda3a0c9159d60
authorJan Oravec <jan@fb.com>
Fri, 23 Oct 2020 18:02:13 +0000 (23 11:02 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 23 Oct 2020 18:04:47 +0000 (23 11:04 -0700)
tree064f67f427ec458be1a368345881b42848706af7
parentf5d12ff859d78fcbf7eb2eaf8be0197bd0c93e24
Fix updateMarker() in prologues by using SrcKey instead of Offset

Summary:
The prologue tag is dropped from the current marker's SrcKey when updateMarker()
is used. This is because makeMarker() accepts an Offset and uses it to build
the new SrcKey.

Fix this by accepting a SrcKey instead of an Offset. Update some APIs that
create a marker (such as makeExit()) to do the same. These APIs were usually
passed bcOff(env) or nextBcOff(env), which were simply replaced by
curSrcKey(env) or nextSrcKey(env), preventing a SrcKey -> Offset -> SrcKey
roundtrip.

Reviewed By: paulbiss

Differential Revision: D24470012

fbshipit-source-id: 1720ecd58fda64b5ef92d89906494702ddd11e2d
14 files changed:
hphp/runtime/vm/jit/irgen-arith.cpp
hphp/runtime/vm/jit/irgen-bespoke.cpp
hphp/runtime/vm/jit/irgen-builtin.cpp
hphp/runtime/vm/jit/irgen-call.cpp
hphp/runtime/vm/jit/irgen-control.cpp
hphp/runtime/vm/jit/irgen-exit.cpp
hphp/runtime/vm/jit/irgen-exit.h
hphp/runtime/vm/jit/irgen-guards.cpp
hphp/runtime/vm/jit/irgen-inlining.cpp
hphp/runtime/vm/jit/irgen-internal.h
hphp/runtime/vm/jit/irgen-iter-spec.cpp
hphp/runtime/vm/jit/irgen-minstr.cpp
hphp/runtime/vm/jit/irgen-minstr.h
hphp/runtime/vm/jit/irgen-resumable.cpp