[issue43495] Missing frame block push in compiler_async_comprehension_generator()

2021-03-14 Thread Thomas Anderson


New submission from Thomas Anderson :

The runtime pushes a frame block in SETUP_FINALLY, so the compiler needs to 
account for that, otherwise the runtime block stack may overflow.

--
components: Interpreter Core
messages: 388696
nosy: tomkpz
priority: normal
severity: normal
status: open
title: Missing frame block push in compiler_async_comprehension_generator()
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue43495>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42917] Block stack size for frame objects should be dynamically sizable

2021-03-14 Thread Thomas Anderson


Thomas Anderson  added the comment:

IIRC, some transpilers for functional languages create deeply nested code.  In 
particular for things like haskell's do notation.

Anyway, when I wrote the PR, it was initially to reduce the frame size.  Then 
once I had dynamic block stack sizing working, I realized there was no longer a 
need to keep the limit of 20 blocks.  It was just compile.c that had the 
artificial limit, so I removed it.  I can add the limit back in the PR, but I'm 
not sure what benefit that would give.

--

___
Python tracker 
<https://bugs.python.org/issue42917>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42917] Block stack size for frame objects should be dynamically sizable

2021-01-12 Thread Thomas Anderson


New submission from Thomas Anderson :

Currently the block stack size is hardcoded to 20.  Similar to how the value 
stack is dynamically sizable, we should make the block stack dynamically 
sizable.  This will reduce space on average (since the typical number of blocks 
for a function is well below 20) and allow code generators to generate code 
with more deep nesting.  Note: the motivation is not necessarily to reduce 
memory usage, but to make L1 cache misses less likely for stack objects.

--
components: Interpreter Core
messages: 384991
nosy: tomkpz
priority: normal
severity: normal
status: open
title: Block stack size for frame objects should be dynamically sizable
type: enhancement
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42917>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42917] Block stack size for frame objects should be dynamically sizable

2021-01-15 Thread Thomas Anderson


Thomas Anderson  added the comment:

> Reducing the size of the frame object seems like a worthwhile goal, but 
> what's the point in increasing the maximum block stack?

No point for humans, but it may be useful for code generators.

--

___
Python tracker 
<https://bugs.python.org/issue42917>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com