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-98831: Simple input-output stack effects#99120

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
gvanrossum merged 22 commits intopython:mainfromgvanrossum:stack-effect
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
22 commits
Select commitHold shift + click to select a range
8868b82
Simple input-output stack effects
gvanrossumNov 5, 2022
069cfb4
Use PEEK instead of POP; STACK_GROW; etc.
gvanrossumNov 5, 2022
51db97b
Use POKE(i, v)
gvanrossumNov 5, 2022
700dd3a
Use ERROR_IF()
gvanrossumNov 5, 2022
4c990fd
Expand ERROR_IF(), to include SHRINK_STACK()
gvanrossumNov 5, 2022
2fa6062
Use a varargs inst() macro
gvanrossumNov 6, 2022
73fab62
Do a few more instructions
gvanrossumNov 6, 2022
f23b6fb
BINARY_OP_INPLACE_ADD_UNICODE
gvanrossumNov 6, 2022
fa507a2
Use STACK_SHRINK as needed
gvanrossumNov 6, 2022
1198502
BINARY_OP_ADD_FLOAT, BINARY_OP_ADD_INT
gvanrossumNov 6, 2022
ea277ce
Move PREDICTED() up (bad bug)
gvanrossumNov 6, 2022
fe2767c
BINARY_SUBSCR
gvanrossumNov 6, 2022
e737bcb
BINARY_SLICE
gvanrossumNov 6, 2022
19b989c
Bugfix (thanks to Irit)
gvanrossumNov 6, 2022
b8b4f15
Fix regex nit
gvanrossumNov 6, 2022
43e7796
Merge main (TODO: PyObject *value etc.)
gvanrossumNov 6, 2022
62c67b0
Fix code generated for super instructions
gvanrossumNov 6, 2022
5fbe7b0
STORE_SLICE
gvanrossumNov 6, 2022
fba1de2
Refactor parser to be more type-correct
gvanrossumNov 6, 2022
80741b3
STORE_SUBSCR
gvanrossumNov 7, 2022
415757f
Fewer jumps in ERROR_IF expansion
gvanrossumNov 7, 2022
48c2a20
Add dummy variables for stack effects
gvanrossumNov 7, 2022
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
Use STACK_SHRINK as needed
  • Loading branch information
@gvanrossum
gvanrossum committedNov 6, 2022
commitfa507a2dd58c58cd596732e3d127a237ffa93b98
18 changes: 9 additions & 9 deletionsPython/generated_cases.c.h
View file
Open in desktop

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

4 changes: 3 additions & 1 deletionTools/cases_generator/generate_cases.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -114,8 +114,10 @@ def write_cases(f: io.TextIOBase, instrs: list[InstDef]):
f.write(line)
noutputs = len(instr.outputs or ())
diff = noutputs - ninputs
if diff!= 0:
if diff> 0:
f.write(f"{indent} STACK_GROW({diff});\n")
elif diff < 0:
f.write(f"{indent} STACK_SHRINK({-diff});\n")
for i, output in enumerate(reversed(instr.outputs or ()), 1):
f.write(f"{indent} POKE({i}, {output});\n")
assert instr.block
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp