Jacob Bower
8de59c1bb9
gh-102021 : Allow multiple input files for interpreter loop generator ( #102022 )
...
The input files no longer use `-i`.
2023-03-03 20:59:21 -08:00
Guido van Rossum
b5ff382433
GH-102305: Expand some macros in generated_cases.c.h ( #102309 )
...
* Emit straight stack_pointer[-i] instead of PEEK(i), POKE(i, ...)
* Expand JUMPBY() and NEXTOPARG(), and fix a perf bug
2023-02-28 08:49:35 -08:00
Erlend E. Aasland
c3a178398c
gh-102151: Correctly fetch CONFIG_ARGS in Tools/freeze/test/freeze.py ( #102152 )
2023-02-23 15:09:51 +01:00
Steve Dower
a99eb5cd99
gh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (GH-101912)
...
* gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h
* Make cases_generator correct on Windows
2023-02-20 14:56:48 +00:00
Erlend E. Aasland
c00faf7943
gh-101819: Adapt _io types to heap types, batch 1 (GH-101949)
...
Adapt StringIO, TextIOWrapper, FileIO, Buffered*, and BytesIO types.
Automerge-Triggered-By: GH:erlend-aasland
2023-02-20 05:46:20 -08:00
Erlend E. Aasland
c1ce0d178f
gh-99138: Isolate _zoneinfo ( #99218 )
...
* Convert zone info type to heap type and add it to module state
* Add global variables to module state
2023-02-15 22:58:48 +01:00
Steve Dower
0c6fe81dce
gh-101849: Add upgrade codes for old versions of launcher that ended up with later version numbers (GH-101877)
2023-02-13 20:33:48 +00:00
Gregory P. Smith
dfc2e065a2
gh-89792: Limit test_tools freeze test build parallelism based on the number of cores ( #101841 )
...
unhardcode freeze test build parallelism. base it on the number of cpus, don't use more than max(2, os.cpu_count()/3).
2023-02-11 22:07:52 -08:00
Gregory P. Smith
1d194235e4
gh-89792: Prevent test_tools from copying 1000M of "source" in freeze test ( #101837 )
...
Prevent test_tools from copying 1000M of "source"
It doesn't need a git repo, just the checkout. We skip .git metadata, Doc/build, Doc/venv, and `__pycache__` subdirs, that developers often have in their clients to reduce the size of the source tree copy ten-fold.
This should significantly reduce IO and presumably time on buildbots during this long test.
2023-02-11 20:54:28 -08:00
Erlend E. Aasland
826bf0e695
gh-101277: Finalise isolating itertools (GH-101305)
...
Add repeat, islice, chain, tee, teedataobject, and batched types to module state.
Automerge-Triggered-By: GH:erlend-aasland
2023-02-10 03:58:14 -08:00
Gregory P. Smith
b41c47cd06
gh-101726: Update the OpenSSL version to 1.1.1t (GH-101727)
...
Fixes CVE-2023-0286 (High) and a couple of Medium security issues.
https://www.openssl.org/news/secadv/20230207.txt
2023-02-09 17:40:51 +00:00
Guido van Rossum
65b7b6bd23
gh-98831: Use opcode metadata for stack_effect() ( #101704 )
...
* Write output and metadata in a single run
This halves the time to run the cases generator
(most of the time goes into parsing the input).
* Declare or define opcode metadata based on NEED_OPCODE_TABLES
* Use generated metadata for stack_effect()
* compile.o depends on opcode_metadata.h
* Return -1 from _PyOpcode_num_popped/pushed for unknown opcode
2023-02-08 16:23:19 -08:00
Guido van Rossum
616aec1ff1
gh-98831: Modernize CALL and family ( #101508 )
...
Includes a slight improvement to `DECREF_INPUTS()`.
2023-02-08 11:40:10 -08:00
Guido van Rossum
a9f01448a9
gh-98831: Modernize CALL_FUNCTION_EX ( #101627 )
...
New generator feature: Move CHECK_EVAL_BREAKER() call to just before DISPATCH().
2023-02-07 20:03:22 -08:00
Guido van Rossum
b2b85b5db9
gh-98831: Modernize FORMAT_VALUE ( #101628 )
...
Generator update: support balanced parentheses and brackets in conditions and size expressions.
2023-02-07 17:35:55 -08:00
Guido van Rossum
aacbdb0c65
gh-98831: Finish the UNPACK_SEQUENCE family ( #101666 )
...
New generator feature: Generate useful glue for output arrays, so you can just write values to the output array (no bounds checking). Rewrote UNPACK_SEQUENCE_TWO_TUPLE to use this, and also UNPACK_SEQUENCE_{TUPLE,LIST}.
2023-02-07 15:44:37 -08:00
Guido van Rossum
694e346a01
gh-98831: Move DSL documentation here from ideas repo ( #101629 )
2023-02-06 21:03:58 -08:00
Eric Snow
c67b00534a
gh-101524: Split Up the _xxsubinterpreters Module (gh-101526)
...
This is step 1 in potentially dropping all the "channel"-related code. Channels have already been removed from PEP 554.
https://github.com/python/cpython/issues/101524
2023-02-03 18:14:43 -07:00
Irit Katriel
b91b42d236
gh-98831: rewrite PUSH_EXC_INFO and conditional jumps in the instruction definition DSL ( #101481 )
2023-02-01 19:38:06 +00:00
Erlend E. Aasland
2753cf2ed6
gh-101409: Improve generated clinic code for self type checks ( #101411 )
2023-01-31 21:42:03 +01:00
Guido van Rossum
04ab767d28
gh-98831: Clean up and add cache size static_assert to macro ( #101442 )
2023-01-30 17:27:51 -08:00
Guido van Rossum
7a3752338a
GH-101369: Allow macros as family members ( #101399 )
...
Also check for instructions straddling families (this includes macro parts).
2023-01-30 11:23:57 -08:00
Mark Shannon
c1b1f51cd1
GH-101291: Refactor the `PyLongObject` struct into object header and PyLongValue struct. (GH-101292)
2023-01-30 10:03:04 +00:00
Guido van Rossum
f5a3d91b6c
gh-98831: Support conditional effects; use for LOAD_ATTR ( #101333 )
2023-01-29 17:28:39 -08:00
Steve Dower
8d18d1ffd5
gh-99834: Update bundled copy of Tcl/Tk to 8.6.13.0 on Windows (GH-101307)
2023-01-26 20:47:24 +00:00
Guido van Rossum
9f2c479eaf
gh-98831: Fix two bugs in case generator ( #101349 )
...
Fix two bugs in case generator
- UndefinedLocalError when generating metadata for an 'op'
- Accidental newline inserted in test_generator.py
2023-01-26 09:15:05 -08:00
Irit Katriel
b400219df5
gh-98831: rewrite RAISE_VARARGS in the instruction definition DSL ( #101306 )
2023-01-25 22:29:56 +00:00
Irit Katriel
19f90d6b97
gh-98831: add variable stack effect support to cases generator ( #101309 )
2023-01-25 20:41:03 +00:00
Guido van Rossum
1417712812
Add advice how to freeze fewer modules ( #101298 )
...
(And fix a bug that only occurs when you follow the advice.)
2023-01-25 09:28:14 -08:00
Guido van Rossum
395871e511
GH-98831: Elaborate some cases_generator tests ( #101299 )
...
* Make macro test more elaborate
* Add test for 'register inst()'
2023-01-25 08:55:46 -08:00
Irit Katriel
1a9d8c750b
gh-98831: rewrite pattern matching opcodes in the instruction definition DSL ( #101287 )
2023-01-24 22:39:13 +00:00
Erlend E. Aasland
00d092caa8
GH-91375: Purge `asyncio` static variables from globals-to-fix list ( #101288 )
2023-01-24 20:37:27 +05:30
Erlend E. Aasland
13566a37c2
GH-92123: Move _elementtree heap types to module state ( #101187 )
2023-01-21 12:01:15 +01:00
Irit Katriel
8a2d4f4e8e
gh-98831: register instructions have 0 pushes and pops ( #101163 )
2023-01-19 21:02:56 +00:00
Irit Katriel
e9ccfe4a63
gh-100712: make it possible to disable specialization (for debugging) ( #100713 )
2023-01-19 18:14:55 +00:00
Kushal Das
75c8133efe
gh-100340: Allows -Wno-int-conversion for wasm ( #100341 )
...
Fixes #100340 allows -Wno-int-conversion for wasm
2023-01-18 19:43:49 +01:00
Zac Hatfield-Dodds
48ec678287
Fix typo and old link in wasm readme ( #101096 )
2023-01-17 16:06:38 -08:00
Guido van Rossum
80e3e3423c
GH-98831: Implement array support in cases generator ( #100912 )
...
You can now write things like this:
```
inst(BUILD_STRING, (pieces[oparg] -- str)) { ... }
inst(LIST_APPEND, (list, unused[oparg-1], v -- list, unused[oparg-1])) { ... }
```
Note that array output effects are only partially supported (they must be named `unused` or correspond to an input effect).
2023-01-17 15:59:19 -08:00
Pablo Galindo Salgado
1de4395f62
gh-101046: Fix a potential memory leak in the parser when raising MemoryError ( #101051 )
2023-01-16 18:45:37 +00:00
Mark Shannon
7b14c2ef19
GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)
2023-01-16 12:35:21 +00:00
Guido van Rossum
5134ef4878
GH-98831: Identify instructions that don't use oparg ( #100957 )
...
For these the instr_format field uses IX instead of IB.
Register instructions use IX, IB, IBBX, IBBB, etc.
Also: Include the closing '}' in Block.tokens, for completeness
2023-01-13 17:06:45 -08:00
Mark Shannon
c00eb1eae6
Don't double count misses. (GH-100984)
2023-01-13 15:57:39 +00:00
Eric Snow
b511d3512b
GH-100997: Implement Multi-Phase Init for the _testinternalcapi Module (gh-100998)
...
_testinternalcapi is an internal module used for testing.
https://github.com/python/cpython/issues/100997
2023-01-12 13:42:03 -07:00
Guido van Rossum
3f3c78e32f
GH-98831: Refactor instr format code and change to enum ( #100895 )
2023-01-09 15:53:01 -08:00
Guido van Rossum
9ffbc58f5c
GH-98831: Add some tests for generate_cases.py ( #100763 )
...
- This doesn't cover everything (far from it) but it's a start.
- This uses pytest, which isn't ideal, but was quickest to get started.
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-01-06 08:04:20 -08:00
Guido van Rossum
14b7f00fdf
GH-98831: Update generate_cases.py: register inst, opcode_metadata.h ( #100735 )
...
(These aren't used yet, but may be coming soon,
and it's easier to keep this tool the same between branches.)
Added a sanity check for all this to compile.c.
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
2023-01-05 13:01:07 -08:00
Mark Shannon
15aecf8dd7
GH-100719: Remove the `co_nplaincellvars` field from code objects. (GH-100721)
2023-01-04 15:41:39 +00:00
Irit Katriel
c31e356a10
gh-100720: refactor calculation of number of frame slots for a code object into the new function _PyFrame_NumSlotsForCodeObject ( #100722 )
2023-01-04 13:37:06 +00:00
Eli Schwartz
8586949833
gh-89419: gdb: fix bug causing `AttributeError` in py-locals when no frame is available ( #100611 )
2023-01-03 20:26:57 +05:30
Zachary Ware
2df82db485
gh-100540: Remove obsolete Modules/_ctypes/darwin/ dlfcn shim (GH-100541)
...
As far as I can tell, this hasn't been actually used since Mac OS X 10.2.
2022-12-29 16:13:28 -06:00