Skip to content

Commit

Permalink
Fix spelling of INTRINSIC
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Gilbey committed Oct 12, 2023
1 parent e14a0a2 commit 1ba82d2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@ Intrinsic operations

.. class:: Intrinsic1Op

Enum for the argument of the ``CALL_INSTRINSIC_1`` instruction (3.12+).
Enum for the argument of the ``CALL_INTRINSIC_1`` instruction (3.12+).

``INSTRINSIC_1_INVALID``
``INSTRINSIC_PRINT``
``INSTRINSIC_IMPORT_STAR``
``INTRINSIC_1_INVALID``
``INTRINSIC_PRINT``
``INTRINSIC_IMPORT_STAR``
``INTRINSIC_STOPITERATION_ERROR``
``INTRINSIC_ASYNC_GEN_WRAP``
``INTRINSIC_UNARY_POSITIVE``
Expand All @@ -368,9 +368,9 @@ Intrinsic operations

.. class:: Intrinsic2Op

Enum for the argument of the ``CALL_INSTRINSIC_2`` instruction (3.12+).
Enum for the argument of the ``CALL_INTRINSIC_2`` instruction (3.12+).

``INSTRINSIC_2_INVALID``
``INTRINSIC_2_INVALID``
``INTRINSIC_PREP_RERAISE_STAR``
``INTRINSIC_TYPEVAR_WITH_BOUND``
``INTRINSIC_TYPEVAR_WITH_CONSTRAINTS``
Expand Down
2 changes: 1 addition & 1 deletion doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ New features:
a ``tuple[bool, bool, str]`` as argument
- ``POP_JUMP_IF_*`` instructions are undirected in Python 3.12
- ``YIELD_VALUE`` now takes an argument
- Support for ``CALL_INSTRINSIC_1/2`` led to the addition of 2 new enums to
- Support for ``CALL_INTRINSIC_1/2`` led to the addition of 2 new enums to
represent the argument

2023-05-24: Version 0.14.2
Expand Down
8 changes: 4 additions & 4 deletions src/bytecode/instr.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ class BinaryOp(enum.IntEnum):

@enum.unique
class Intrinsic1Op(enum.IntEnum):
INSTRINSIC_1_INVALID = 0
INSTRINSIC_PRINT = 1
INSTRINSIC_IMPORT_STAR = 2
INTRINSIC_1_INVALID = 0
INTRINSIC_PRINT = 1
INTRINSIC_IMPORT_STAR = 2
INTRINSIC_STOPITERATION_ERROR = 3
INTRINSIC_ASYNC_GEN_WRAP = 4
INTRINSIC_UNARY_POSITIVE = 5
Expand All @@ -120,7 +120,7 @@ class Intrinsic1Op(enum.IntEnum):

@enum.unique
class Intrinsic2Op(enum.IntEnum):
INSTRINSIC_2_INVALID = 0
INTRINSIC_2_INVALID = 0
INTRINSIC_PREP_RERAISE_STAR = 1
INTRINSIC_TYPEVAR_WITH_BOUND = 2
INTRINSIC_TYPEVAR_WITH_CONSTRAINTS = 3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_instr.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def test_invalid_arg(self):

for name in [opcode.opname[i] for i in INTRINSIC_1OP]:
self.assertRaises(TypeError, Instr, name, 1)
Instr(name, Intrinsic1Op.INSTRINSIC_PRINT)
Instr(name, Intrinsic1Op.INTRINSIC_PRINT)

for name in [opcode.opname[i] for i in INTRINSIC_2OP]:
self.assertRaises(TypeError, Instr, name, 1)
Expand Down

0 comments on commit 1ba82d2

Please sign in to comment.