8000 gh-105775: Convert LOAD_CLOSURE to a pseudo-op by polynomialherder · Pull Request #106059 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-105775: Convert LOAD_CLOSURE to a pseudo-op #106059

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 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
Prev Previous commit
Next Next commit
gh-106044: Fix whitespace
  • Loading branch information
polynomialherder committed Jun 24, 2023
commit 6921930077d2829f3c252469c6a663285d3874bb
4 changes: 1 addition & 3 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ dummy_func(
// BEGIN BYTECODES //
inst(NOP, (--)) {
}

inst(RESUME, (--)) {
assert(tstate->cframe == &cframe);
assert(frame == cframe.current_frame);
Expand Down Expand Up @@ -192,13 +191,12 @@ dummy_func(
assert(value != NULL);
Py_INCREF(value);
}

inst(LOAD_FAST_AND_CLEAR, (-- value)) {
value = GETLOCAL(oparg);
// do not use SETLOCAL here, it decrefs the old value
GETLOCAL(oparg) = NULL;
}

inst(LOAD_FAST_LOAD_FAST, ( -- value1, value2)) {
uint32_t oparg1 = oparg >> 4;
uint32_t oparg2 = oparg & 15;
Expand Down
1 change: 0 additions & 1 deletion Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,6 @@ stack_effect(int opcode, int oparg, int jump)
* of __(a)enter__ and push 2 values before jumping to the handler
* if an exception be raised. */
return jump ? 1 : 0;

case STORE_FAST_MAYBE_NULL:
return -1;
case LOAD_CLOSURE:
Expand Down
0