@@ -313,7 +313,7 @@ def kind_to_text(kind: int, opcode: str):
313313 def is_specializable (self , opcode : str ) -> bool :
314314 return "specializable" in self ._get_stats_for_opcode (opcode )
315315
316- def get_specialized_total_counts (self ) -> tuple [int , int , int ]:
316+ def get_specialized_total_counts (self ) -> tuple [int , int , int , int ]:
317317 basic = 0
318318 specialized_hits = 0
319319 specialized_misses = 0
@@ -442,7 +442,7 @@ def get_gc_stats(self) -> list[dict[str, int]]:
442442 gc_stats [gen_n ][name ] = value
443443 return gc_stats
444444
445- def get_optimization_stats (self ) -> dict [str , tuple [int , int | None ]]:
445+ def get_optimization_stats (self ) -> dict [Doc , tuple [int , int | None ]]:
446446 if "Optimization attempts" not in self ._data :
447447 return {}
448448
@@ -515,7 +515,7 @@ def get_optimization_stats(self) -> dict[str, tuple[int, int | None]]:
515515 ),
516516 }
517517
518- def get_optimizer_stats (self ) -> dict [str , tuple [int , int | None ]]:
518+ def get_optimizer_stats (self ) -> dict [Doc , tuple [int , int | None ]]:
519519 attempts = self ._data ["Optimization optimizer attempts" ]
520520 successes = self ._data ["Optimization optimizer successes" ]
521521 no_memory = self ._data ["Optimization optimizer failure no memory" ]
@@ -1264,7 +1264,7 @@ def iter_optimization_tables(base_stats: Stats, head_stats: Stats | None = None)
12641264
12651265
12661266def rare_event_section () -> Section :
1267- def calc_rare_event_table (stats : Stats ) -> Table :
1267+ def calc_rare_event_table (stats : Stats ) -> Rows :
12681268 DOCS = {
12691269 "set class" : "Setting an object's class, `obj.__class__ = ...`" ,
12701270 "set bases" : "Setting the bases of a class, `cls.__bases__ = ...`" ,
@@ -1395,7 +1395,7 @@ def to_markdown(x):
13951395 print ("Stats gathered on:" , date .today (), file = out )
13961396
13971397
1398- def output_stats (inputs : list [Path ], json_output = str | None ):
1398+ def output_stats (inputs : list [Path ], json_output : str | None ):
13991399 match len (inputs ):
14001400 case 1 :
14011401 data = load_raw_data (Path (inputs [0 ]))
0 commit comments