File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -505,6 +505,7 @@ After the last `DEOPT_IF` has passed, a hit should be recorded with
505505` STAT_INC(BASE_INSTRUCTION, hit) ` .
506506After an optimization has been deferred in the adaptive instruction,
507507that should be recorded with ` STAT_INC(BASE_INSTRUCTION, deferred) ` .
508+
508509## How to add a new bytecode specialization
509510
510511Assuming you found an instruction that serves as a good specialization candidate.
@@ -555,7 +556,7 @@ at the very least, a 16-bit counter is needed.
555556
5565573 . Write the specializing function itself in [ Python/specialize.c ] ( ../Python/specialize.c ) .
557558 Refer to any other function in that file for the format.
558- 4 . Remember to update operation stats by calling add_stat_dict in
559+ 4 . Remember to update operation stats by calling ` add_stat_dict ` in
559560 [ Python/specialize.c ] ( ../Python/specialize.c ) .
5605615 . Add the cache layout in [ Lib/opcode.py] ( ../Lib/opcode.py ) so that Python's
561562 dis module will know how to represent it properly.
You can’t perform that action at this time.
0 commit comments