summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-06-22 15:32:02 (GMT)
committerGitHub <noreply@github.com>2022-06-22 15:32:02 (GMT)
commit3ece6e6feb44b334cd759ead970e877bbd126892 (patch)
tree96846029de1a3123d7fd01f67df0e5597171955a /Tools/scripts
parent8c2af4907133d4a235cce73231fab723653d6429 (diff)
downloadcpython-3ece6e6feb44b334cd759ead970e877bbd126892.zip
cpython-3ece6e6feb44b334cd759ead970e877bbd126892.tar.gz
cpython-3ece6e6feb44b334cd759ead970e877bbd126892.tar.bz2
[3.11] GH-93516: Backport GH-93769: Speedup line number checks when tracing (GH-94127)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
Diffstat (limited to 'Tools/scripts')
-rw-r--r--Tools/scripts/deepfreeze.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/scripts/deepfreeze.py b/Tools/scripts/deepfreeze.py
index 5ee6c2f..50d0b34 100644
--- a/Tools/scripts/deepfreeze.py
+++ b/Tools/scripts/deepfreeze.py
@@ -262,6 +262,7 @@ class Printer:
self.write(f".co_exceptiontable = {co_exceptiontable},")
self.field(code, "co_flags")
self.write(".co_warmup = QUICKENING_INITIAL_WARMUP_VALUE,")
+ self.write("._co_linearray_entry_size = 0,")
self.field(code, "co_argcount")
self.field(code, "co_posonlyargcount")
self.field(code, "co_kwonlyargcount")
@@ -278,6 +279,7 @@ class Printer:
self.write(f".co_name = {co_name},")
self.write(f".co_qualname = {co_qualname},")
self.write(f".co_linetable = {co_linetable},")
+ self.write("._co_linearray = NULL,")
self.write(f".co_code_adaptive = {co_code_adaptive},")
name_as_code = f"(PyCodeObject *)&{name}"
self.deallocs.append(f"_PyStaticCode_Dealloc({name_as_code});")