Skip to content

Commit fbfe1a0

Browse files
Merge branch 'main' of https://github.com/python/cpython into jit-attr
2 parents fea8eb4 + 52a7f1b commit fbfe1a0

27 files changed

+1121
-518
lines changed

Doc/whatsnew/3.15.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,11 @@ pprint
15511551
:func:`pprint.pformat`, :func:`pprint.pp`. If true, the output will be
15521552
formatted similar to pretty-printed :func:`json.dumps` when
15531553
*indent* is supplied.
1554-
(Contributed by Stefan Todoran and Semyon Moroz in :gh:`112632`.)
1554+
(Contributed by Stefan Todoran, Semyon Moroz and Hugo van Kemenade in
1555+
:gh:`112632`.)
1556+
1557+
* Add t-string support to :mod:`pprint`.
1558+
(Contributed by Loïc Simon and Hugo van Kemenade in :gh:`134551`.)
15551559

15561560

15571561
sre_*

Include/internal/pycore_opcode_metadata.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_optimizer.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,15 @@ typedef struct _PyJitTracerInitialState {
9191
_Py_CODEUNIT *jump_backward_instr;
9292
} _PyJitTracerInitialState;
9393

94+
#define MAX_RECORDED_VALUES 3
9495
typedef struct _PyJitTracerPreviousState {
9596
int instr_oparg;
9697
int instr_stacklevel;
9798
_Py_CODEUNIT *instr;
9899
PyCodeObject *instr_code; // Strong
99100
struct _PyInterpreterFrame *instr_frame;
100-
PyObject *recorded_value; // Strong, may be NULL
101+
PyObject *recorded_values[MAX_RECORDED_VALUES]; // Strong, may be NULL
102+
int recorded_count;
101103
} _PyJitTracerPreviousState;
102104

103105
typedef struct _PyJitTracerTranslatorState {
@@ -400,6 +402,7 @@ extern JitOptRef _Py_uop_sym_new_null(JitOptContext *ctx);
400402
extern bool _Py_uop_sym_has_type(JitOptRef sym);
401403
extern bool _Py_uop_sym_matches_type(JitOptRef sym, PyTypeObject *typ);
402404
extern bool _Py_uop_sym_matches_type_version(JitOptRef sym, unsigned int version);
405+
extern unsigned int _Py_uop_sym_get_type_version(JitOptRef sym);
403406
extern void _Py_uop_sym_set_null(JitOptContext *ctx, JitOptRef sym);
404407
extern void _Py_uop_sym_set_non_null(JitOptContext *ctx, JitOptRef sym);
405408
extern void _Py_uop_sym_set_type(JitOptContext *ctx, JitOptRef sym, PyTypeObject *typ);
@@ -481,7 +484,12 @@ void _PyJit_TracerFree(_PyThreadStateImpl *_tstate);
481484
#ifdef _Py_TIER2
482485
typedef void (*_Py_RecordFuncPtr)(_PyInterpreterFrame *frame, _PyStackRef *stackpointer, int oparg, PyObject **recorded_value);
483486
PyAPI_DATA(const _Py_RecordFuncPtr) _PyOpcode_RecordFunctions[];
484-
PyAPI_DATA(const uint8_t) _PyOpcode_RecordFunctionIndices[256];
487+
488+
typedef struct {
489+
uint8_t count;
490+
uint8_t indices[MAX_RECORDED_VALUES];
491+
} _PyOpcodeRecordEntry;
492+
PyAPI_DATA(const _PyOpcodeRecordEntry) _PyOpcode_RecordEntries[256];
485493
#endif
486494

487495
#ifdef __cplusplus

0 commit comments

Comments
 (0)