summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source ↵Ijtaba Hussain2023-07-111-1/+1
| | | | | | | | | directory (#103213) Fetch CONFIG_ARGS from the original source directory, instead of from the copied source tree. When "make clean" is executed in the copied source tree, the build directory is cleared and the configure argument lookup fails. However, the original source directory still contains this information.
* gh-104050: Argument Clinic: Annotate the `Block` class (#106519)Alex Waygood2023-07-111-15/+17
|
* gh-106529: Support JUMP_BACKWARD in Tier 2 (uops) (#106543)Guido van Rossum2023-07-111-0/+1
| | | | | During superblock generation, a JUMP_BACKWARD instruction is translated to either a JUMP_TO_TOP micro-op (when the target of the jump is exactly the beginning of the superblock, closing the loop), or a SAVE_IP + EXIT_TRACE pair, when the jump goes elsewhere. The new JUMP_TO_TOP instruction includes a CHECK_EVAL_BREAKER() call, so a closed loop can still be interrupted.
* wasm: do not use inline comment in .editorconfig (#106610)Eisuke Kawashima2023-07-111-1/+2
| | | | It is no longer valid since 0.15.0 https://github.com/editorconfig/specification/blob/v0.15/index.rst#no-inline-comments
* gh-106360: remove redundant #ifdef (#106622)Irit Katriel2023-07-111-4/+2
|
* gh-106078: Move external C-API functions to decimal module global state ↵Charlie Zhao2023-07-111-6/+0
| | | | (#106616)
* gh-106529: Implement POP_JUMP_IF_XXX uops (#106551)Guido van Rossum2023-07-101-0/+5
| | | | | | | | | | | | | | | - Hand-written uops JUMP_IF_{TRUE,FALSE}. These peek at the top of the stack. The jump target (in superblock space) is absolute. - Hand-written translation for POP_JUMP_IF_{TRUE,FALSE}, assuming the jump is unlikely. Once we implement jump-likelihood profiling, we can implement the jump-unlikely case (in another PR). - Tests (including some test cleanup). - Improvements to len(ex) and ex[i] to expose the whole trace.
* gh-106078: Move static variables initialized once to decimal module global ↵Charlie Zhao2023-07-101-3/+0
| | | | state (#106475)
* gh-106078: Move static objects related to `CONTEXTVAR` to the decimal module ↵Charlie Zhao2023-07-081-1/+0
| | | | | | global state (#106395) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-104584: Allow unspecialized instructions in superblocks (#106497)Guido van Rossum2023-07-071-2/+24
| | | | | | | | | | | | | | | | This adds several of unspecialized opcodes to superblocks: TO_BOOL, BINARY_SUBSCR, STORE_SUBSCR, UNPACK_SEQUENCE, LOAD_GLOBAL, LOAD_ATTR, COMPARE_OP, BINARY_OP. While we may not want that eventually, for now this helps finding bugs. There is a rudimentary test checking for UNPACK_SEQUENCE. Once we're ready to undo this, that would be simple: just replace the call to variable_used_unspecialized with a call to variable_used (as shown in a comment). Or add individual opcdes to FORBIDDEN_NAMES_IN_UOPS.
* gh-104584: Move super-instruction special-casing to generator (#106500)Guido van Rossum2023-07-071-2/+59
| | | | | | Instead of special-casing specific instructions, we add a few more special values to the 'size' field of expansions, so in the future we can automatically handle additional super-instructions in the generator.
* gh-104683: clinic.py: refactor `Parameter` and `Function` as dataclasses ↵Alex Waygood2023-07-071-86/+57
| | | | (#106477)
* gh-104683: clinic.py: refactor four simple classes as dataclasses (#106476)Alex Waygood2023-07-061-31/+20
|
* gh-104683: clinic.py: Don't needlessly reimplement ↵Alex Waygood2023-07-061-18/+2
| | | | | `contextlib.redirect_stdout` (#106478) clinic.py: Don't needlessly reimplement `contextlib.redirect_stdout`
* gh-64595: Fix regression in file write logic in Argument Clinic (#106449)Erlend E. Aasland2023-07-051-23/+12
| | | | | | | Revert the two commits that introduced the regressions: - gh-104152 - gh-104507
* gh-104050: Partially annotate Argument Clinic CLanguage class (#106437)Erlend E. Aasland2023-07-041-6/+19
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104050: Annotate Argument Clinic parameter permutation helpers (#106431)Erlend E. Aasland2023-07-041-7/+24
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104050: Annotate toplevel functions in clinic.py (#106435)Erlend E. Aasland2023-07-041-16/+47
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-106360: Support very basic superblock introspection (#106422)Mark Shannon2023-07-042-7/+6
| | | * Add len() and indexing support to uop superblocks.
* gh-106368: Add tests for permutation helpers in Argument Clinic (#106407)Erlend E. Aasland2023-07-041-2/+2
| | | Added new test class PermutationTests()
* gh-104050: Annotate more Argument Clinic DSLParser state methods (#106376)Erlend E. Aasland2023-07-031-9/+19
| | | | | | | | Annotate the following methods: - state_parameter() - state_parameter_docstring_start() Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104683: Modernise Argument Clinic parameter state machine (#106362)Erlend E. Aasland2023-07-031-51/+78
| | | | | Use enums and pattern matching to make the code more readable. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-106078: Move `context template` to decimal module global state (#106346)Charlie Zhao2023-07-031-3/+0
|
* gh-106290: Fix edge cases around uops (#106319)Guido van Rossum2023-07-031-5/+9
| | | | | | | | | | - Tweak uops debugging output - Fix the bug from gh-106290 - Rename `SET_IP` to `SAVE_IP` (per https://github.com/faster-cpython/ideas/issues/558) - Add a `SAVE_IP` uop at the start of the trace (ditto) - Allow `unbound_local_error`; this gives us uops for `LOAD_FAST_CHECK`, `LOAD_CLOSURE`, and `DELETE_FAST` - Longer traces - Support `STORE_FAST_LOAD_FAST`, `STORE_FAST_STORE_FAST` - Add deps on pycore_uops.h to Makefile(.pre.in)
* gh-104050: Add more type hints to Argument Clinic DSLParser() (#106354)Erlend E. Aasland2023-07-031-8/+11
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-106359: Fix corner case bugs in Argument Clinic converter parser (#106361)Erlend E. Aasland2023-07-031-7/+9
| | | | | DSLParser.parse_converter() could return unusable kwdicts in some rare cases Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104146: Remove unused attr 'parameter_indent' from clinic.DLParser (#106358)Erlend E. Aasland2023-07-031-1/+0
|
* gh-104050: Annotate Argument Clinic DSLParser attributes (#106357)Erlend E. Aasland2023-07-031-1/+14
|
* gh-106320: Move _PyUnicodeWriter to the internal C API (#106342)Victor Stinner2023-07-031-3/+9
| | | | | | Move also _PyUnicode_FormatAdvancedWriter(). CJK codecs and multibytecodec.c now define the Py_BUILD_CORE_MODULE macro.
* gh-104050: Add more type hints to Argument Clinic DSLParser() (#106343)Erlend E. Aasland2023-07-021-11/+22
| | | | | | | | | | Annotate the following method signatures: - state_dsl_start() - state_parameter_docstring_start() - state_parameters_start() Inverting ignore_line() logic, add type hints (including type guard) to it, and rename to valid_line().
* gh-106078: Move DecimalException to _decimal state (#106301)Charlie Zhao2023-07-021-1/+0
|
* gh-106316: Remove pytime.h header file (#106317)Victor Stinner2023-07-012-2/+8
| | | | | | | | | | | | | | | | | Remove the "cpython/pytime.h" header file: it only contained private functions. Move functions to the internal pycore_time.h header file. Move tests from _testcapi to _testinternalcapi. Rename also test methods to have the same name than tested C functions. No longer export these functions: * _PyTime_Add() * _PyTime_As100Nanoseconds() * _PyTime_FromMicrosecondsClamp() * _PyTime_FromTimespec() * _PyTime_FromTimeval() * _PyTime_GetPerfCounterWithInfo() * _PyTime_MulDiv()
* gh-106149: move unconditional jump direction resolution from optimizer to ↵Irit Katriel2023-07-011-2/+2
| | | | assembler (#106291)
* build(deps-dev): bump mypy from 1.3.0 to 1.4.1 in /Tools/clinic (#106305)dependabot[bot]2023-07-011-1/+1
| | | | | | | | | | | | | | Bumps [mypy](https://github.com/python/mypy) from 1.3.0 to 1.4.1. - [Commits](https://github.com/python/mypy/compare/v1.3.0...v1.4.1) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* gh-106267: Add type cast to generated code (#106289)Kirill Podoprigora2023-06-301-1/+1
|
* GH-106250: Support insts using one cache entry and no oparg (GH-106252)Guido van Rossum2023-06-291-18/+18
|
* gh-106078: Convert `_decimal` types to heap types (#106079)Charlie Zhao2023-06-291-6/+1
| | | | | | | | | | | | | | - Establish global state struct - Convert static types to heap types and add them to global state: * PyDecContextManager_Type * PyDecContext_Type * PyDecSignalDictMixin_Type * PyDec_Type - Add to global state: * PyDecSignalDict_Type * DecimalTuple Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-104584: Emit macro expansions to opcode_metadata.h (#106163)Guido van Rossum2023-06-281-72/+113
| | | | | | | This produces longer traces (superblocks?). Also improved debug output (uop names are now printed instead of numeric opcodes). This would be simpler if the numeric opcode values were generated by generate_cases.py, but that's another project. Refactored some code in generate_cases.py so the essential algorithm for cache effects is only run once. (Deciding which effects are used and what the total cache size is, regardless of what's used.)
* gh-106200: Remove unused imports (#106201)Nikita Sobolev2023-06-281-1/+0
|
* Fix c-analyzer for GCC: ignore LANG env var (#106173)Victor Stinner2023-06-281-1/+7
| | | | The c-analyzer doesn't support GCC localized messages, so just unset the LANG environment variable.
* gh-104584: Add #line directives to executor_cases.c.h (#106126)Guido van Rossum2023-06-271-1/+1
|
* gh-104584: Baby steps towards generating and executing traces (#105924)Guido van Rossum2023-06-275-22/+180
| | | | | Added a new, experimental, tracing optimizer and interpreter (a.k.a. "tier 2"). This currently pessimizes, so don't use yet -- this is infrastructure so we can experiment with optimizing passes. To enable it, pass ``-Xuops`` or set ``PYTHONUOPS=1``. To get debug output, set ``PYTHONUOPSDEBUG=N`` where ``N`` is a debug level (0-4, where 0 is no debug output and 4 is excessively verbose). All of this code is likely to change dramatically before the 3.13 feature freeze. But this is a first step.
* gh-101538: Add experimental wasi-threads build (#101537)YAMAMOTO Takashi2023-06-221-1/+7
| | | | Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-105481: refactor instr flag related code into a new InstructionFlags ↵Irit Katriel2023-06-211-36/+78
| | | | class (#105950)
* make regen-stdlib-module-names rejects test modules (#105921)Victor Stinner2023-06-201-2/+17
| | | Make sure that sys.stdlib_module_names doesn't contain test modules.
* gh-105481: generate _specializations and _specialized_instructions from ↵Irit Katriel2023-06-192-26/+80
| | | | bytecodes.c (#105913)
* gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and ↵Irit Katriel2023-06-171-30/+0
| | | | replace by their new versions (#105865)
* gh-105481: add HAS_JUMP flag to opcode metadata (#105791)Irit Katriel2023-06-141-1/+2
|
* gh-104909: Implement conditional stack effects for macros (#105748)Guido van Rossum2023-06-142-13/+80
|
* gh-105481: Fix types and a bug for pseudos (#105788)Guido van Rossum2023-06-141-3/+4
|