| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0fcf2b7 commit 600f4db
37 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -230,6 +230,8 @@ struct _typeobject { | |||
| 230 | 230 | destructor tp_finalize; | |
| 231 | 231 | vectorcallfunc tp_vectorcall; | |
| 232 | 232 | ||
| 233 | + /* Below here all fields are internal to the VM */ | ||
| 234 | + | ||
| 233 | 235 | /* bitset of which type-watchers care about this type */ | |
| 234 | 236 | unsigned char tp_watched; | |
| 235 | 237 | ||
@@ -239,6 +241,7 @@ struct _typeobject { | |||
| 239 | 241 | * Otherwise, limited to MAX_VERSIONS_PER_CLASS (defined elsewhere). | |
| 240 | 242 | */ | |
| 241 | 243 | uint16_t tp_versions_used; | |
| 244 | + _Py_iteritemfunc _tp_iteritem; /* Virtual iterator next function */ | ||
| 242 | 245 | }; | |
| 243 | 246 | ||
| 244 | 247 | #define _Py_ATTR_CACHE_UNUSED (30000) // (see tp_versions_used) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,6 +141,12 @@ typedef struct { | |||
| 141 | 141 | ||
| 142 | 142 | #define INLINE_CACHE_ENTRIES_FOR_ITER CACHE_ENTRIES(_PyForIterCache) | |
| 143 | 143 | ||
| 144 | + typedef struct { | ||
| 145 | + _Py_BackoffCounter counter; | ||
| 146 | + } _PyGetIterCache; | ||
| 147 | + | ||
| 148 | + #define INLINE_CACHE_ENTRIES_GET_ITER CACHE_ENTRIES(_PyGetIterCache) | ||
| 149 | + | ||
| 144 | 150 | typedef struct { | |
| 145 | 151 | _Py_BackoffCounter counter; | |
| 146 | 152 | } _PySendCache; | |
@@ -324,6 +330,7 @@ PyAPI_FUNC(void) _Py_Specialize_ContainsOp(_PyStackRef value, _Py_CODEUNIT *inst | |||
| 324 | 330 | PyAPI_FUNC(void) _Py_GatherStats_GetIter(_PyStackRef iterable); | |
| 325 | 331 | PyAPI_FUNC(void) _Py_Specialize_CallFunctionEx(_PyStackRef func_st, _Py_CODEUNIT *instr); | |
| 326 | 332 | PyAPI_FUNC(void) _Py_Specialize_Resume(_Py_CODEUNIT *instr, PyThreadState *tstate, _PyInterpreterFrame *frame); | |
| 333 | + PyAPI_FUNC(void) _Py_Specialize_GetIter(_PyStackRef iterable, _Py_CODEUNIT *instr); | ||
| 327 | 334 | ||
| 328 | 335 | // Utility functions for reading/writing 32/64-bit values in the inline caches. | |
| 329 | 336 | // Great care should be taken to ensure that these functions remain correct and | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -295,6 +295,7 @@ Known values: | |||
| 295 | 295 | Python 3.15a8 3662 (Add counter to RESUME) | |
| 296 | 296 | Python 3.15a8 3663 (Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER) | |
| 297 | 297 | Python 3.15a8 3664 (Fix __qualname__ for __annotate__ functions) | |
| 298 | + Python 3.15a8 3665 (Add FOR_ITER_VIRTUAL and GET_ITER specializations) | ||
| 298 | 299 | ||
| 299 | 300 | ||
| 300 | 301 | Python 3.16 will start with 3700 | |
@@ -308,7 +309,7 @@ PC/launcher.c must also be updated. | |||
| 308 | 309 | ||
| 309 | 310 | */ | |
| 310 | 311 | ||
| 311 | - #define PYC_MAGIC_NUMBER 3664 | ||
| 312 | + #define PYC_MAGIC_NUMBER 3665 | ||
| 312 | 313 | /* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes | |
| 313 | 314 | (little-endian) and then appending b'\r\n'. */ | |
| 314 | 315 | #define PYC_MAGIC_NUMBER_TOKEN \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -82,9 +82,10 @@ extern "C" { | |||
| 82 | 82 | #define RESUME_AFTER_YIELD 1 | |
| 83 | 83 | #define RESUME_AFTER_YIELD_FROM 2 | |
| 84 | 84 | #define RESUME_AFTER_AWAIT 3 | |
| 85 | + #define RESUME_AT_GEN_EXPR_START 4 | ||
| 85 | 86 | ||
| 86 | - #define RESUME_OPARG_LOCATION_MASK 0x3 | ||
| 87 | - #define RESUME_OPARG_DEPTH1_MASK 0x4 | ||
| 87 | + #define RESUME_OPARG_LOCATION_MASK 0x7 | ||
| 88 | + #define RESUME_OPARG_DEPTH1_MASK 0x8 | ||
| 88 | 89 | ||
| 89 | 90 | #define GET_ITER_YIELD_FROM 1 | |
| 90 | 91 | #define GET_ITER_YIELD_FROM_NO_CHECK 2 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments