Skip to content

Commit

Permalink
pythonGH-118093: Specialize CALL_KW (pythonGH-123006)
Browse files Browse the repository at this point in the history
  • Loading branch information
markshannon authored Aug 16, 2024
1 parent e2f2dc7 commit c13e7d9
Show file tree
Hide file tree
Showing 17 changed files with 1,083 additions and 273 deletions.
3 changes: 3 additions & 0 deletions Include/internal/pycore_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ typedef struct {
} _PyCallCache;

#define INLINE_CACHE_ENTRIES_CALL CACHE_ENTRIES(_PyCallCache)
#define INLINE_CACHE_ENTRIES_CALL_KW CACHE_ENTRIES(_PyCallCache)

typedef struct {
_Py_BackoffCounter counter;
Expand Down Expand Up @@ -335,6 +336,8 @@ extern void _Py_Specialize_StoreSubscr(_PyStackRef container, _PyStackRef sub,
_Py_CODEUNIT *instr);
extern void _Py_Specialize_Call(_PyStackRef callable, _Py_CODEUNIT *instr,
int nargs);
extern void _Py_Specialize_CallKw(_PyStackRef callable, _Py_CODEUNIT *instr,
int nargs);
extern void _Py_Specialize_BinaryOp(_PyStackRef lhs, _PyStackRef rhs, _Py_CODEUNIT *instr,
int oparg, _PyStackRef *locals);
extern void _Py_Specialize_CompareOp(_PyStackRef lhs, _PyStackRef rhs,
Expand Down
3 changes: 2 additions & 1 deletion Include/internal/pycore_magic_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ Known values:
Python 3.14a1 3603 (Remove BUILD_CONST_KEY_MAP)
Python 3.14a1 3604 (Do not duplicate test at end of while statements)
Python 3.14a1 3605 (Move ENTER_EXECUTOR to opcode 255)
Python 3.14a1 3606 (Specialize CALL_KW)
Python 3.15 will start with 3650
Expand All @@ -269,7 +270,7 @@ PC/launcher.c must also be updated.
*/

#define PYC_MAGIC_NUMBER 3605
#define PYC_MAGIC_NUMBER 3606
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
(little-endian) and then appending b'\r\n'. */
#define PYC_MAGIC_NUMBER_TOKEN \
Expand Down
32 changes: 27 additions & 5 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c13e7d9

Please sign in to comment.