bpo-32455: Add jump parameter to dis.stack_effect(). (GH-6610)

Add C API function PyCompile_OpcodeStackEffectWithJump().
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 9564937..fe9979d 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -248,12 +248,21 @@
    return a list of these offsets.
 
 
-.. function:: stack_effect(opcode, [oparg])
+.. function:: stack_effect(opcode, oparg=None, *, jump=None)
 
    Compute the stack effect of *opcode* with argument *oparg*.
 
+   If the code has a jump target and *jump* is ``True``, :func:`~stack_effect`
+   will return the stack effect of jumping.  If *jump* is ``False``,
+   it will return the stack effect of not jumping. And if *jump* is
+   ``None`` (default), it will return the maximal stack effect of both cases.
+
    .. versionadded:: 3.4
 
+   .. versionchanged:: 3.8
+      Added *jump* parameter.
+
+
 .. _bytecodes:
 
 Python Bytecode Instructions