Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-45753: Interpreter internal tweaks#29575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from11 commits
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
a278314
Move eval-breaker to CFrame and refactor exit code a bit.
markshannonNov 12, 2021
ba1f6d8
Split exit paths into exceptional and non-exceptional.
markshannonNov 12, 2021
aba6ad0
Move exit tracing code to individual bytecodes.
markshannonNov 12, 2021
bc9ecb9
Wrap all trace entry and exit events in macros to make them clearer a…
markshannonNov 12, 2021
b7c3444
Move return sequence into RETURN_VALUE, YIELD_VALUE and YIELD_FROM. D…
markshannonNov 15, 2021
98a4b05
A bit more tidying up of exceptional paths.
markshannonNov 15, 2021
cffe72d
Tidy up quickening check.
markshannonNov 15, 2021
a28e7d6
Revert change to eval_breaker
markshannonNov 15, 2021
85cf469
Remove 'co' and 'retval' from set of interpreter registers.
markshannonNov 15, 2021
76ee6e9
Rename label
markshannonNov 15, 2021
d9811cb
Merge branch 'main' into interpreter-internal-tweaks
markshannonNov 16, 2021
8ac6a75
Make _PyFrame_Clear return void.
markshannonNov 18, 2021
2eb7fcb
Remove some redundant macros.
markshannonNov 18, 2021
8c527fc
Fix refleak
markshannonNov 18, 2021
22cb8a4
Restore mistakenly deleted return.
markshannonNov 18, 2021
ae277da
Add macro for initializing interpreter's local variables from frame.
markshannonNov 19, 2021
88610c7
Merge branch 'main' into interpreter-internal-tweaks
markshannonNov 29, 2021
bec7c00
Add some asserts and clarifying comments.
markshannonDec 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletionsInclude/internal/pycore_code.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -136,24 +136,25 @@ _GetSpecializedCacheEntryForInstruction(const _Py_CODEUNIT *first_instr, int nex
#define QUICKENING_INITIAL_WARMUP_VALUE (-QUICKENING_WARMUP_DELAY)
#define QUICKENING_WARMUP_COLDEST 1

static inline void
PyCodeObject_IncrementWarmup(PyCodeObject * co)
{
co->co_warmup++;
}
int _Py_Quicken(PyCodeObject *code);

/* Used by the interpreter to determine when a code object should be quickened */
/* Returns 1 if quickening occurs.
* -1 if an error occurs
* 0 otherwise */
static inline int
PyCodeObject_IsWarmedUp(PyCodeObject * co)
_Py_IncrementCountAndMaybeQuicken(PyCodeObject *code)
{
return (co->co_warmup == 0);
if (code->co_warmup != 0) {
code->co_warmup++;
if (code->co_warmup == 0) {
return _Py_Quicken(code) ? -1 : 1;
}
}
return 0;
}

int _Py_Quicken(PyCodeObject *code);

extern Py_ssize_t _Py_QuickenedCount;


/* "Locals plus" for a code object is the set of locals + cell vars +
* free vars. This relates to variable names as well as offsets into
* the "fast locals" storage array of execution frames. The compiler
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp