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

GH-104584: Assorted fixes for the optimizer API.#105683

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
markshannon merged 10 commits intopython:mainfromfaster-cpython:fix-optimizer-api
Jun 19, 2023
Merged
Changes from1 commit
Commits
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
PrevPrevious commit
NextNext commit
Clear ENTER_EXECUTOR when deopting code objects.
  • Loading branch information
@markshannon
markshannon committedJun 9, 2023
commit18a4b7ef9b2e8f5a7fabcc4f50ff8f1c5a434011
20 changes: 6 additions & 14 deletionsObjects/codeobject.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1481,25 +1481,17 @@ deopt_code(PyCodeObject *code, _Py_CODEUNIT *instructions)
Py_ssize_t len = Py_SIZE(code);
for (int i = 0; i < len; i++) {
int opcode = _Py_GetBaseOpcode(code, i);
int caches = _PyOpcode_Caches[opcode];
instructions[i].op.code = opcode;
for (int j = 1; j <= caches; j++) {
instructions[i+j].cache = 0;
}
i += caches;
}
if (code->co_executors == NULL) {
return;
}
for (int i = 0; i < len; i++) {
int opcode = instructions[i].op.code;
if (opcode == ENTER_EXECUTOR) {
_PyExecutorObject *exec = code->co_executors->executors[instructions[i].op.arg];
opcode =instructions[i].op.code =exec->vm_data.opcode;
opcode = exec->vm_data.opcode;
instructions[i].op.arg = exec->vm_data.oparg;
assert(instructions[i+1].cache < (1 << OPTIMIZER_BITS_IN_COUNTER));
}
assert(opcode != ENTER_EXECUTOR);
int caches = _PyOpcode_Caches[opcode];
instructions[i].op.code = opcode;
for (int j = 1; j <= caches; j++) {
instructions[i+j].cache = 0;
}
i += caches;
}
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp