Skip to content
Prev Previous commit
Next Next commit
Doc: clarify CALL_INSTRINSIC_2 stack effect
  • Loading branch information
MatthieuDartiailh committed Sep 5, 2023
commit 761745675ab7744da353605455bffc5cd606e567
10 changes: 7 additions & 3 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1695,9 +1695,13 @@ iterations of the loop.

.. opcode:: CALL_INTRINSIC_2

Calls an intrinsic function with two arguments. Passes ``STACK[-2]``, ``STACK[-1]`` as the
arguments and sets ``STACK[-1]`` to the result. Used to implement functionality that is
necessary but not performance critical.
Calls an intrinsic function with two arguments. Used to implement functionality
that is necessary but not performance critical::

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
that is necessary but not performance critical::
that is not performance critical::

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see you copied this from the 1-arg opcode. But I think it's redundant in both cases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update it


arg2 = STACK.pop()
arg1 = STACK.pop()
result = intrinsic2(arg1, arg2)
STACK.push(result)

The operand determines which intrinsic function is called:

Expand Down