Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6ca0d42
Move bytecode into the code object
brandtbucher Mar 10, 2022
a77a124
Clean things up a bit
brandtbucher Mar 10, 2022
975b8d1
Bump the magic number
brandtbucher Mar 10, 2022
40ddf39
co_bytecode -> _co_code
brandtbucher Mar 10, 2022
bfcba6d
Generate specialization table
brandtbucher Mar 10, 2022
0376822
Clean things up a bit
brandtbucher Mar 10, 2022
3e77b8d
Pack code objects more efficiently
brandtbucher Mar 10, 2022
0a598a7
Fix typo
brandtbucher Mar 10, 2022
2fda3b8
More cleanup
brandtbucher Mar 11, 2022
42810dd
Try a different approach
brandtbucher Mar 11, 2022
7df4934
Clean up the diff
brandtbucher Mar 11, 2022
5fa0ca2
Support equality comparisons again
brandtbucher Mar 11, 2022
1fc2282
Never un-quicken!
brandtbucher Mar 11, 2022
b40e300
More renaming and cleanup
brandtbucher Mar 11, 2022
af27670
Revert marshal format changes
brandtbucher Mar 11, 2022
629bf8b
More cleanup
brandtbucher Mar 11, 2022
59cda59
Clean up the diff
brandtbucher Mar 11, 2022
73c33c1
Catch up with main
brandtbucher Mar 12, 2022
ecfb193
Miscellaneous cleanup
brandtbucher Mar 14, 2022
824b2da
Remove outdated comment
brandtbucher Mar 14, 2022
8164f41
Properly skip over EXTENDED_ARG instructions
brandtbucher Mar 14, 2022
932a3f2
Make sure that f_lasti is always valid
brandtbucher Mar 14, 2022
c0c5498
Add some comments
brandtbucher Mar 14, 2022
f62a395
Catch up with main
brandtbucher Mar 14, 2022
e7464a3
Check opargs during size calculations
brandtbucher Mar 14, 2022
4f51fdd
Add another TODO
brandtbucher Mar 14, 2022
75bd375
Clean up formatting
brandtbucher Mar 15, 2022
d6d5128
Fix compiler warning
brandtbucher Mar 15, 2022
82145c1
Simplify calculation of instr_prev
brandtbucher Mar 15, 2022
ca176ac
_Py_Quicken -> _PyCode_Quicken
brandtbucher Mar 15, 2022
1e06bb5
Revert expensive f_lasti changes
brandtbucher Mar 15, 2022
e70819f
Naming is hard
brandtbucher Mar 16, 2022
001eb53
Catch up with main
brandtbucher Mar 16, 2022
6b96204
make patchcheck
brandtbucher Mar 16, 2022
3087025
blurb add
brandtbucher Mar 16, 2022
6f3bc38
Reuse the PyCodeObject definition for deepfreeze
brandtbucher Mar 16, 2022
c8054b9
Clean up TODO
brandtbucher Mar 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up the diff
  • Loading branch information
brandtbucher committed Mar 11, 2022
commit 7df49342d5ad5ce921c3f8d17f8f2330823b9cbf
3 changes: 1 addition & 2 deletions Include/cpython/code.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ struct PyCodeObject {
* - co_stacksize
* - co_flags
* - co_firstlineno
* - co_code
* - co_consts
* - co_names
* - co_localsplusnames
Expand All @@ -55,7 +54,7 @@ struct PyCodeObject {
PyObject *co_names; /* list of strings (names used) */
PyObject *co_exceptiontable; /* Byte string encoding exception handling table */
int co_flags; /* CO_..., see below */
int co_warmup; // XXX
int co_warmup; /* Warmup counter for quickening */

// The rest are not so impactful on performance.
int co_argcount; /* #arguments, except *args */
Expand Down
3 changes: 2 additions & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,8 @@ eval_frame_handle_pending(PyThreadState *tstate)
#define SKIP_CALL() \
JUMPBY(INLINE_CACHE_ENTRIES_PRECALL + 1 + INLINE_CACHE_ENTRIES_CALL)

#define TRACING_NEXTOPARG() do { \
/* Get opcode and oparg from original instructions, not quickened form. */
#define TRACING_NEXTOPARG() do { \
_Py_CODEUNIT word = _Py_Unquickened(frame->f_code)[INSTR_OFFSET()]; \
opcode = _Py_OPCODE(word); \
oparg = _Py_OPARG(word); \
Expand Down
1 change: 0 additions & 1 deletion Python/makeopcodetargets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
(for compilers supporting computed gotos or "labels-as-values", such as gcc).
"""

from itertools import chain
import os
import sys

Expand Down