Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | bpo-43683: Streamline YIELD_VALUE and SEND (GH-30723) | Mark Shannon | 2022-01-24 | 1 | -6/+19 | |
| | | | | | | | | * Split YIELD_VALUE into ASYNC_GEN_WRAP; YIELD_VALUE for async generators. * Split SEND into SEND; YIELD_VALUE. * Document new opcodes. | |||||
* | bpo-46409: Make generators in bytecode (GH-30633) | Mark Shannon | 2022-01-20 | 1 | -20/+36 | |
| | | | | | | | | | | | | * Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes. * Trim frame and generator by word each. * Minor refactor of frame.c * Update test.test_sys to account for smaller frames. * Treat generator functions as normal functions when evaluating and specializing. | |||||
* | bpo-46161: Fix bug in starunpack_helper in compile.c (GH-30235) | zq1997 | 2022-01-17 | 1 | -1/+4 | |
| | ||||||
* | bpo-46344: Fix trace bug in else of try and try-star blocks (GH-30544) | Irit Katriel | 2022-01-13 | 1 | -2/+0 | |
| | ||||||
* | bpo-46331: Do not set line number of instruction storing doc-string. (GH-30518) | Mark Shannon | 2022-01-11 | 1 | -0/+1 | |
| | ||||||
* | bpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513) | Mark Shannon | 2022-01-10 | 1 | -144/+142 | |
| | ||||||
* | bpo-46286: use the new POP_JUMP_IF_NOT_NONE opcode to simplify except* ↵ | Irit Katriel | 2022-01-06 | 1 | -6/+2 | |
| | | | | | (GH-30439) Automerge-Triggered-By: GH:iritkatriel | |||||
* | bpo-45923: Handle call events in bytecode (GH-30364) | Mark Shannon | 2022-01-06 | 1 | -27/+43 | |
| | | | | * Add a RESUME instruction to handle "call" events. | |||||
* | bpo-46031: add POP_JUMP_IF_NOT_NONE and POP_JUMP_IF_NONE (GH-30019) | penguin_wwy | 2022-01-06 | 1 | -0/+27 | |
| | ||||||
* | bpo-46009: Remove GEN_START (GH-30367) | Brandt Bucher | 2022-01-04 | 1 | -17/+4 | |
| | ||||||
* | bpo-46202: Remove opcode POP_EXCEPT_AND_RERAISE (GH-30302) | Irit Katriel | 2022-01-04 | 1 | -11/+26 | |
| | | | | | | * bpo-46202: remove opcode POP_EXCEPT_AND_RERAISE * do not assume that an exception group is truthy | |||||
* | bpo-46219, 46221: simplify except* implementation following exc_info ↵ | Irit Katriel | 2022-01-02 | 1 | -9/+16 | |
| | | | | changes. Move helpers to exceptions.c. Do not assume that exception groups are truthy. (GH-30289) | |||||
* | bpo-45711: Remove type and traceback from exc_info (GH-30122) | Irit Katriel | 2021-12-17 | 1 | -92/+64 | |
| | | | | | | | | * Do not PUSH/POP traceback or type to the stack as part of exc_info * Remove exc_traceback and exc_type from _PyErr_StackItem * Add to what's new, because this change breaks things like Cython | |||||
* | bpo-46039: Split yield from in two (GH-30035) | Mark Shannon | 2021-12-15 | 1 | -16/+39 | |
| | | | | | | * Split YIELD_FROM opcode into SEND and JUMP_ABSOLUTE. * Remove YIELD_FROM opcode. | |||||
* | bpo-44525: Split calls into PRECALL and CALL (GH-30011) | Mark Shannon | 2021-12-14 | 1 | -15/+16 | |
| | | | | | | | | | | * Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW. * Update specialization to handle new CALL opcodes. * Specialize call to method descriptors. * Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW. | |||||
* | bpo-45292: [PEP-654] add except* (GH-29581) | Irit Katriel | 2021-12-14 | 1 | -1/+338 | |
| | ||||||
* | bpo-37971: fix the position of decorator application (GH-30027) | Carl Friedrich Bolz-Tereick | 2021-12-10 | 1 | -8/+25 | |
| | | | | | | | The line numbers of actually calling the decorator functions of functions and classes was wrong (as opposed to loading them, were they have been correct previously too). Co-authored-by: Łukasz Langa <lukasz@langa.pl> | |||||
* | Delete orphaned comment (#29917) | Guido van Rossum | 2021-12-05 | 1 | -5/+0 | |
| | | | (The function this described was deleted by PR #23743, the comment was accidentally retained.) | |||||
* | bpo-44525: Copy free variables in bytecode to allow calls to inner functions ↵ | Mark Shannon | 2021-11-23 | 1 | -2/+19 | |
| | | | | | | | | | | | to be specialized (GH-29595) * Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead. * Add reference to function to frame, borrow references to builtins and globals. * Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions. | |||||
* | Fix link to exception handling notes (GH-29617) | Irit Katriel | 2021-11-19 | 1 | -1/+1 | |
| | ||||||
* | bpo-45773: Stop "optimizing" certain jump patterns (GH-29505) | Brandt Bucher | 2021-11-11 | 1 | -76/+41 | |
| | ||||||
* | bpo-45636: Merge all numeric operators (GH-29482) | Brandt Bucher | 2021-11-11 | 1 | -106/+59 | |
| | ||||||
* | bpo-45711: remove unnecessary DUP_TOP and POP in exception handling (GH-29495) | Irit Katriel | 2021-11-10 | 1 | -6/+4 | |
| | ||||||
* | bpo-44511: Improve the bytecode for class and mapping patterns (GH-26922) | Brandt Bucher | 2021-10-27 | 1 | -29/+44 | |
| | | | | | | | * Refactor mapping patterns and speed up class patterns. * Simplify MATCH_KEYS and MATCH_CLASS. * Add COPY opcode. | |||||
* | Fix typos in the Python directory (GH-28767) | Christian Clauss | 2021-10-06 | 1 | -2/+2 | |
| | ||||||
* | Normalize jumps in compiler. All forward jumps to use JUMP_FORWARD. (GH-28755) | Mark Shannon | 2021-10-06 | 1 | -0/+23 | |
| | ||||||
* | bpo-45355: More use of sizeof(_Py_CODEUNIT) (GH-28720) | Serhiy Storchaka | 2021-10-04 | 1 | -1/+1 | |
| | ||||||
* | bpo-45152: Add HAS_CONST macro and get_const_value() function and use… ↵ | Irit Katriel | 2021-09-14 | 1 | -7/+39 | |
| | | | | (#28262) | |||||
* | bpo-45056: Remove trailing unused constants from co_consts (GH-28109) | Inada Naoki | 2021-09-02 | 1 | -0/+33 | |
| | ||||||
* | bpo-45039: Consistently use ADDOP_LOAD_CONST in compiler rather than ↵ | Irit Katriel | 2021-08-31 | 1 | -2/+4 | |
| | | | | ADDOP_O(c, LOAD_CONST,...) (GH-28015) | |||||
* | bpo-45000: Raise SyntaxError when try to delete __debug__ (GH-27947) | Dong-hee Na | 2021-08-25 | 1 | -0/+4 | |
| | | | Automerge-Triggered-By: GH:pablogsal | |||||
* | Remove unused variable. (GH-27677) | Mark Shannon | 2021-08-09 | 1 | -3/+0 | |
| | ||||||
* | bpo-44840: Compiler: Move duplication of exit blocks with no line numbers to ↵ | Mark Shannon | 2021-08-09 | 1 | -16/+25 | |
| | | | | after CFG optimization. (GH-27656) | |||||
* | bpo-44600: Fix line numbers for pattern matching cleanup code (GH-27346) | Charles Burkland | 2021-07-25 | 1 | -4/+12 | |
| | ||||||
* | bpo-44626: Merge basic blocks earlier to enable better handling of exit ↵ | Mark Shannon | 2021-07-15 | 1 | -16/+48 | |
| | | | | blocks without line numbers (GH-27138) | |||||
* | bpo-44622: Set line number of END_ASYNC_FOR to match that of iterator. ↵ | Mark Shannon | 2021-07-15 | 1 | -1/+3 | |
| | | | | (GH-27160) | |||||
* | bpo-44589: raise a SyntaxError when mapping patterns have duplicate literal ↵ | Jack DeVries | 2021-07-15 | 1 | -4/+41 | |
| | | | | keys (GH-27131) | |||||
* | bpo-44616: Mark all clean up instructions at end of named exception block as ↵ | Mark Shannon | 2021-07-14 | 1 | -3/+2 | |
| | | | | artificial (GH-27109) | |||||
* | bpo-33346: Allow async comprehensions inside implicit async comprehensions ↵ | Serhiy Storchaka | 2021-07-13 | 1 | -6/+8 | |
| | | | | | (GH-6766) Co-authored-by: Pablo Galindo <pablogsal@gmail.com> | |||||
* | bpo-44530: Add co_qualname field to PyCodeObject (GH-26941) | Gabriele N. Tornetta | 2021-07-07 | 1 | -4/+2 | |
| | ||||||
* | bpo-43950: optimize column table assembling with pre-sizing object (GH-26997) | Batuhan Taskaya | 2021-07-02 | 1 | -6/+13 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | The new resizing system works like this; ``` $ cat t.py a + a + a + b + c + a + a + a + b + c + a + a + a + b + c + a + a + a + b + c [repeated 99 more times] $ ./python t.py RESIZE: prev len = 32, new len = 66 FINAL SIZE: 56 ----------------------------------------------------- RESIZE: prev len = 32, new len = 66 RESIZE: prev len = 66, new len = 134 RESIZE: prev len = 134, new len = 270 RESIZE: prev len = 270, new len = 542 RESIZE: prev len = 542, new len = 1086 RESIZE: prev len = 1086, new len = 2174 RESIZE: prev len = 2174, new len = 4350 RESIZE: prev len = 4350, new len = 8702 FINAL SIZE: 8004 ``` So now we do considerably lower number of `_PyBytes_Resize` calls. Automerge-Triggered-By: GH:isidentical | |||||
* | bpo-43950: Add code.co_positions (PEP 657) (GH-26955) | Pablo Galindo | 2021-07-02 | 1 | -63/+208 | |
| | | | | | | | | | | | | | | | This PR is part of PEP 657 and augments the compiler to emit ending line numbers as well as starting and ending columns from the AST into compiled code objects. This allows bytecodes to be correlated to the exact source code ranges that generated them. This information is made available through the following public APIs: * The `co_positions` method on code objects. * The C API function `PyCode_Addr2Location`. Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> Co-authored-by: Ammar Askar <ammar@ammaraskar.com> | |||||
* | bpo-44313: generate LOAD_ATTR/CALL_FUNCTION for top-level imported objects ↵ | Batuhan Taskaya | 2021-06-30 | 1 | -0/+23 | |
| | | | | (GH-26677) | |||||
* | Make sure that line number is set correctly for call to __exit__ when ↵ | Mark Shannon | 2021-06-24 | 1 | -2/+1 | |
| | | | | handling exception in body of a with statement. (GH-26890) | |||||
* | bpo-43693: Turn localspluskinds into an object (GH-26749) | Guido van Rossum | 2021-06-21 | 1 | -12/+8 | |
| | | | Managing it as a bare pointer to malloc'ed bytes is just too awkward in a few places. | |||||
* | bpo-44297: Fix missing line number in generator expressions (GH-26801) | Mark Shannon | 2021-06-21 | 1 | -0/+1 | |
| | | | * Make sure that line number is set when entering comprehension scope in compiler. | |||||
* | bpo-43693: Eliminate unused "fast locals". (gh-26587) | Eric Snow | 2021-06-15 | 1 | -41/+144 | |
| | | | | | Currently, if an arg value escapes (into the closure for an inner function) we end up allocating two indices in the fast locals even though only one gets used. Additionally, using the lower index would be better in some cases, such as with no-arg `super()`. To address this, we update the compiler to fix the offsets so each variable only gets one "fast local". As a consequence, now some cell offsets are interspersed with the locals (only when an arg escapes to an inner function). https://bugs.python.org/issue43693 | |||||
* | bpo-43693: Un-revert commit f3fa63e. (#26609) | Eric Snow | 2021-06-08 | 1 | -19/+53 | |
| | | | | | | | | | This was reverted in GH-26596 (commit 6d518bb) due to some bad memory accesses. * Add the MAKE_CELL opcode. (gh-26396) The memory accesses have been fixed. https://bugs.python.org/issue43693 | |||||
* | Revert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals ↵ | Pablo Galindo | 2021-06-08 | 1 | -53/+19 | |
| | | | | | offsets. (gh-26396)" (GH-26597) This reverts commit 631f9938b1604d4f893417ec339b9e0fa9196fb1. | |||||
* | Fix compiler errors for unused variables (GH-26601) | Pablo Galindo | 2021-06-08 | 1 | -0/+1 | |
| |