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

Commit12e85cf

Browse files
committed
Don't mess with END_FOR
1 parent68077f1 commit12e85cf

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

‎Python/bytecodes.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ dummy_func(
135135
res=NULL;
136136
}
137137

138-
inst(END_FOR, (second,first--)) {
139-
DECREF_INPUTS();
140-
}
138+
macro(END_FOR)=POP_TOP+POP_TOP;
141139

142140
inst(UNARY_NEGATIVE, (value--res)) {
143141
res=PyNumber_Negative(value);

‎Python/generated_cases.c.h‎

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎Python/opcode_metadata.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ _PyOpcode_num_popped(int opcode, int oparg, bool jump) {
3838
casePUSH_NULL:
3939
return0;
4040
caseEND_FOR:
41-
return2;
41+
return1+1;
4242
caseUNARY_NEGATIVE:
4343
return1;
4444
caseUNARY_NOT:
@@ -390,7 +390,7 @@ _PyOpcode_num_pushed(int opcode, int oparg, bool jump) {
390390
casePUSH_NULL:
391391
return1;
392392
caseEND_FOR:
393-
return0;
393+
return0+0;
394394
caseUNARY_NEGATIVE:
395395
return1;
396396
caseUNARY_NOT:
@@ -735,7 +735,7 @@ const struct opcode_metadata _PyOpcode_opcode_metadata[256] = {
735735
[LOAD_CONST__LOAD_FAST]= {DIR_NONE,DIR_NONE,DIR_NONE, true,INSTR_FMT_IBIB },
736736
[POP_TOP]= {DIR_NONE,DIR_NONE,DIR_NONE, true,INSTR_FMT_IX },
737737
[PUSH_NULL]= {DIR_NONE,DIR_NONE,DIR_NONE, true,INSTR_FMT_IX },
738-
[END_FOR]= {DIR_NONE,DIR_NONE,DIR_NONE, true,INSTR_FMT_IX },
738+
[END_FOR]= {DIR_NONE,DIR_NONE,DIR_NONE, true,INSTR_FMT_IB },
739739
[UNARY_NEGATIVE]= {DIR_NONE,DIR_NONE,DIR_NONE, true,INSTR_FMT_IX },
740740
[UNARY_NOT]= {DIR_NONE,DIR_NONE,DIR_NONE, true,INSTR_FMT_IX },
741741
[UNARY_INVERT]= {DIR_NONE,DIR_NONE,DIR_NONE, true,INSTR_FMT_IX },

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp