mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
GH-93897: Store frame size in code object and de-opt if insufficient space on thread frame stack. (GH-93908)
This commit is contained in:
parent
774ef28814
commit
45e62a2bc1
8 changed files with 50 additions and 67 deletions
|
@ -118,6 +118,7 @@ class Printer:
|
|||
self.write('#include "Python.h"')
|
||||
self.write('#include "internal/pycore_gc.h"')
|
||||
self.write('#include "internal/pycore_code.h"')
|
||||
self.write('#include "internal/pycore_frame.h"')
|
||||
self.write('#include "internal/pycore_long.h"')
|
||||
self.write("")
|
||||
|
||||
|
@ -256,6 +257,7 @@ class Printer:
|
|||
self.field(code, "co_argcount")
|
||||
self.field(code, "co_posonlyargcount")
|
||||
self.field(code, "co_kwonlyargcount")
|
||||
self.write(f".co_framesize = {code.co_stacksize + len(localsplusnames)} + FRAME_SPECIALS_SIZE,")
|
||||
self.field(code, "co_stacksize")
|
||||
self.field(code, "co_firstlineno")
|
||||
self.write(f".co_nlocalsplus = {len(localsplusnames)},")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue