File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -396,3 +396,43 @@ Available start symbols
396396 * :pep: `484 `
397397
398398 .. versionadded :: 3.8
399+
400+
401+ Stack Effects
402+ ^^^^^^^^^^^^^
403+
404+ .. seealso ::
405+ :py:func: `dis.stack_effect `
406+
407+
408+ .. c :macro :: PY_INVALID_STACK_EFFECT
409+
410+ Sentinel value representing an invalid stack effect.
411+
412+ This is currently equivalent to ``INT_MAX ``.
413+
414+ .. versionadded :: 3.8
415+
416+
417+ .. c :function :: int PyCompile_OpcodeStackEffect (int opcode, int oparg)
418+
419+ Compute the stack effect of *opcode* with argument *oparg*.
420+
421+ On success, this function returns the stack effect; on failure, this
422+ returns :c:macro: `PY_INVALID_STACK_EFFECT `.
423+
424+ .. versionadded :: 3.4
425+
426+
427+ .. c :function :: int PyCompile_OpcodeStackEffectWithJump (int opcode, int oparg, int jump)
428+
429+ Similar to :c:func:`PyCompile_OpcodeStackEffect`, but don't include the
430+ stack effect of jumping if *jump* is zero.
431+
432+ If *jump* is ``0``, this will not include the stack effect of jumping, but
433+ if *jump* is ``1`` or ``-1``, this will include it.
434+
435+ On success, this function returns the stack effect; on failure, this
436+ returns :c:macro: `PY_INVALID_STACK_EFFECT `.
437+
438+ .. versionadded :: 3.8
You can’t perform that action at this time.
0 commit comments