Skip to content

Commit

Permalink
Implement POP_TOP__STORE_FAST super instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed May 28, 2023
1 parent 477a02c commit a96ed91
Show file tree
Hide file tree
Showing 10 changed files with 506 additions and 471 deletions.
4 changes: 2 additions & 2 deletions Include/internal/pycore_opcode.h

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

3 changes: 2 additions & 1 deletion Include/internal/pycore_opcode_utils.h
Expand Up @@ -60,7 +60,8 @@ extern "C" {
(opcode) == LOAD_FAST__LOAD_CONST || \
(opcode) == LOAD_CONST__LOAD_FAST || \
(opcode) == STORE_FAST__LOAD_FAST || \
(opcode) == STORE_FAST__STORE_FAST)
(opcode) == STORE_FAST__STORE_FAST) || \
(opcode) == POP_TOP__STORE_FAST


#define LOG_BITS_PER_INT 5
Expand Down
1 change: 1 addition & 0 deletions Include/opcode.h

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

3 changes: 3 additions & 0 deletions Lib/opcode.py
Expand Up @@ -435,6 +435,9 @@ def pseudo_op(name, op, real_ops):
"SEND": [
"SEND_GEN",
],
"POP_TOP": [
"POP_TOP__STORE_FAST"
]
}
_specialized_instructions = [
opcode for family in _specializations.values() for opcode in family
Expand Down
1 change: 1 addition & 0 deletions Python/bytecodes.c
Expand Up @@ -214,6 +214,7 @@ dummy_func(
super(STORE_FAST__LOAD_FAST) = STORE_FAST + LOAD_FAST;
super(STORE_FAST__STORE_FAST) = STORE_FAST + STORE_FAST;
super(LOAD_CONST__LOAD_FAST) = LOAD_CONST + LOAD_FAST;
super(POP_TOP__STORE_FAST) = POP_TOP + STORE_FAST;

inst(POP_TOP, (value --)) {
DECREF_INPUTS();
Expand Down

0 comments on commit a96ed91

Please sign in to comment.