diff options
author | Mark Shannon <mark@hotpy.org> | 2022-06-20 11:59:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 11:59:25 (GMT) |
commit | 45e62a2bc1c0000e2e9b613fff6bebf2c26fcb93 (patch) | |
tree | 2fb6748705e118b6a3cd9264f6b946bcfa06e5e5 /Tools/scripts | |
parent | 774ef28814d0d9d57ec813cb31b0a7af6c476127 (diff) | |
download | cpython-45e62a2bc1c0000e2e9b613fff6bebf2c26fcb93.zip cpython-45e62a2bc1c0000e2e9b613fff6bebf2c26fcb93.tar.gz cpython-45e62a2bc1c0000e2e9b613fff6bebf2c26fcb93.tar.bz2 |
GH-93897: Store frame size in code object and de-opt if insufficient space on thread frame stack. (GH-93908)
Diffstat (limited to 'Tools/scripts')
-rw-r--r-- | Tools/scripts/deepfreeze.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/scripts/deepfreeze.py b/Tools/scripts/deepfreeze.py index 443fcf2..de8fde4 100644 --- a/Tools/scripts/deepfreeze.py +++ b/Tools/scripts/deepfreeze.py @@ -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)},") |