Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-17611. Move unwinding of stack for "pseudo exceptions" from interpreter ↵ | Serhiy Storchaka | 2018-02-22 | 1 | -165/+244 |
| | | | | | | | | | to compiler. (GH-5006) Co-authored-by: Mark Shannon <mark@hotpy.org> Co-authored-by: Antoine Pitrou <antoine@python.org> | ||||
* | bpo-32550. Remove the STORE_ANNOTATION bytecode. (GH-5181) | Mark Shannon | 2018-01-30 | 1 | -6/+10 |
| | |||||
* | String annotations [PEP 563] (#4390) | Guido van Rossum | 2018-01-26 | 1 | -2/+24 |
| | | | | | | | | * Document `from __future__ import annotations` * Provide plumbing and tests for `from __future__ import annotations` * Implement unparsing the AST back to string form This is required for PEP 563 and as such only implements a part of the unparsing process that covers expressions. | ||||
* | bpo-31113: Get rid of recursion in the compiler for normal control flow. (#3015) | Serhiy Storchaka | 2018-01-11 | 1 | -78/+104 |
| | |||||
* | bpo-24340: Fix estimation of the code stack size. (#5076) | Serhiy Storchaka | 2018-01-09 | 1 | -37/+90 |
| | |||||
* | bpo-32439: Clean up the code for compiling comparison expressions. (#5029) | Serhiy Storchaka | 2017-12-30 | 1 | -23/+20 |
| | |||||
* | bpo-32372: Move __debug__ optimization to the AST level. (#4925) | Serhiy Storchaka | 2017-12-25 | 1 | -18/+8 |
| | |||||
* | bpo-32365: Fix a reference leak when compile __debug__. (#4916) | Serhiy Storchaka | 2017-12-18 | 1 | -4/+4 |
| | | | It was introduced in bpo-27169. | ||||
* | bpo-27169: The __debug__ constant is now optimized out at compile time. (#4880) | Serhiy Storchaka | 2017-12-15 | 1 | -30/+15 |
| | | | This fixes also bpo-22091. | ||||
* | bpo-29469: Move constant folding to AST optimizer (GH-2858) | INADA Naoki | 2017-12-14 | 1 | -0/+4 |
| | |||||
* | bpo-32176: Set CO_NOFREE in the code object constructor (GH-4675) | Nick Coghlan | 2017-12-03 | 1 | -5/+0 |
| | | | | | | | | Previously, CO_NOFREE was set in the compiler, which meant it could end up being set incorrectly when code objects were created directly. Setting it in the constructor based on freevars and cellvars ensures it is always accurate, regardless of how the code object is defined. | ||||
* | Add the const qualifier to "char *" variables that refer to literal strings. ↵ | Serhiy Storchaka | 2017-11-11 | 1 | -1/+1 |
| | | | | (#4370) | ||||
* | bpo-31708: Allow async generator expressions in synchronous functions (#3905) | Yury Selivanov | 2017-10-06 | 1 | -1/+1 |
| | |||||
* | bpo-31709: Drop support for asynchronous __aiter__. (#3903) | Yury Selivanov | 2017-10-06 | 1 | -6/+0 |
| | |||||
* | bpo-31338 (#3374) | Barry Warsaw | 2017-09-15 | 1 | -2/+1 |
| | | | | | | | * Add Py_UNREACHABLE() as an alias to abort(). * Use Py_UNREACHABLE() instead of assert(0) * Convert more unreachable code to use Py_UNREACHABLE() * Document Py_UNREACHABLE() and a few other macros. | ||||
* | bpo-31286, bpo-30024: Fixed stack usage in absolute imports with (#3217) | Serhiy Storchaka | 2017-08-29 | 1 | -10/+16 |
| | | | binding a submodule to a name. | ||||
* | bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. ↵ | Stefan Krah | 2017-08-21 | 1 | -2/+3 |
| | | | | (#3157) | ||||
* | bpo-30501: Make the compiler producing optimized code for condition ↵ | Serhiy Storchaka | 2017-06-11 | 1 | -41/+137 |
| | | | | expressions. (#1851) | ||||
* | bpo-30024: Circular imports involving absolute imports with binding (#1264) | Serhiy Storchaka | 2017-05-09 | 1 | -2/+2 |
| | | | a submodule to a name are now supported. | ||||
* | bpo-29878: Add global instances of int for 0 and 1. (#852) | Serhiy Storchaka | 2017-03-30 | 1 | -16/+3 |
| | |||||
* | bpo-29463: Add docstring field to some AST nodes. (#46) | INADA Naoki | 2017-02-22 | 1 | -48/+16 |
| | | | | | | | | | | | * bpo-29463: Add docstring field to some AST nodes. ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring field for now. It was first statement of there body. * fix document. thanks travis! * doc fixes | ||||
* | bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX (#202) | Matthieu Dartiailh | 2017-02-21 | 1 | -1/+1 |
| | |||||
* | Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of ↵ | Serhiy Storchaka | 2016-12-16 | 1 | -17/+9 |
| | | | | dict. | ||||
* | Issue #26110: Add LOAD_METHOD/CALL_METHOD opcodes. | Yury Selivanov | 2016-12-14 | 1 | -0/+37 |
| | | | | | | | Special thanks to INADA Naoki for pushing the patch through the last mile, Serhiy Storchaka for reviewing the code, and to Victor Stinner for suggesting the idea (originally implemented in the PyPy project). | ||||
* | Issue #28739: f-string expressions no longer accepted as docstrings and | Serhiy Storchaka | 2016-12-11 | 1 | -1/+2 |
|\ | | | | | | | by ast.literal_eval() even if they do not include subexpressions. | ||||
| * | Issue #28739: f-string expressions no longer accepted as docstrings and | Serhiy Storchaka | 2016-12-11 | 1 | -1/+2 |
| | | | | | | | | by ast.literal_eval() even if they do not include subexpressions. | ||||
* | | Merge #23722 from 3.6 | Nick Coghlan | 2016-12-05 | 1 | -2/+6 |
|\ \ | |/ | |||||
| * | Issue #23722: improve __classcell__ compatibility | Nick Coghlan | 2016-12-05 | 1 | -2/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling zero-argument super() in __init_subclass__ and __set_name__ involved moving __class__ initialisation to type.__new__. This requires cooperation from custom metaclasses to ensure that the new __classcell__ entry is passed along appropriately. The initial implementation of that change resulted in abruptly broken zero-argument super() support in metaclasses that didn't adhere to the new requirements (such as Django's metaclass for Model definitions). The updated approach adopted here instead emits a deprecation warning for those cases, and makes them work the same way they did in Python 3.5. This patch also improves the related class machinery documentation to cover these details and to include more reader-friendly cross-references and index entries. | ||||
* | | Issue #28823: Simplified compiling with opcode BUILD_MAP_UNPACK. | Serhiy Storchaka | 2016-11-28 | 1 | -5/+2 |
| | | |||||
* | | Added the const qualifier to char* variables that refer to readonly internal | Serhiy Storchaka | 2016-11-20 | 1 | -1/+1 |
|/ | | | | UTF-8 represenatation of Unicode objects. | ||||
* | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵ | Serhiy Storchaka | 2016-11-16 | 1 | -5/+5 |
|\ | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions. | ||||
| * | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵ | Serhiy Storchaka | 2016-11-16 | 1 | -5/+5 |
| | | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions. | ||||
* | | Issue #28257: Improved error message when pass a non-iterable as | Serhiy Storchaka | 2016-10-02 | 1 | -2/+2 |
| | | | | | | | | a var-positional argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL. | ||||
* | | Issue #27213: Fixed different issues with reworked CALL_FUNCTION* opcodes. | Serhiy Storchaka | 2016-09-11 | 1 | -5/+4 |
| | | | | | | | | | | | | | | | | | | | | | | * BUILD_TUPLE_UNPACK and BUILD_MAP_UNPACK_WITH_CALL no longer generated with single tuple or dict. * Restored more informative error messages for incorrect var-positional and var-keyword arguments. * Removed code duplications in _PyEval_EvalCodeWithName(). * Removed redundant runtime checks and parameters in _PyStack_AsDict(). * Added a workaround and enabled previously disabled test in test_traceback. * Removed dead code from the dis module. | ||||
* | | Issue #28076: Variable annotations should be mangled for private names. | Guido van Rossum | 2016-09-11 | 1 | -1/+7 |
| | | | | | | | | By Ivan Levkivskyi. | ||||
* | | Issue #27129: Replaced wordcode related magic constants with macros. | Serhiy Storchaka | 2016-09-11 | 1 | -6/+7 |
| | | |||||
* | | Issue #23722: Initialize __class__ from type.__new__() | Nick Coghlan | 2016-09-11 | 1 | -5/+10 |
| | | | | | | | | | | | | | | | | | | The __class__ cell used by zero-argument super() is now initialized from type.__new__ rather than __build_class__, so class methods relying on that will now work correctly when called from metaclass methods during class creation. Patch by Martin Teichmann. | ||||
* | | Rework CALL_FUNCTION* opcodes | Victor Stinner | 2016-09-09 | 1 | -89/+70 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #27213: Rework CALL_FUNCTION* opcodes to produce shorter and more efficient bytecode: * CALL_FUNCTION now only accepts position arguments * CALL_FUNCTION_KW accepts position arguments and keyword arguments, but keys of keyword arguments are packed into a constant tuple. * CALL_FUNCTION_EX is the most generic, it expects a tuple and a dict for positional and keyword arguments. CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW opcodes have been removed. 2 tests of test_traceback are currently broken: skip test, the issue #28050 was created to track the issue. Patch by Demur Rumed, design by Serhiy Storchaka, reviewed by Serhiy Storchaka and Victor Stinner. | ||||
* | | Issue #28008: Implement PEP 530 -- asynchronous comprehensions. | Yury Selivanov | 2016-09-09 | 1 | -16/+202 |
| | | |||||
* | | Issue #28003: Implement PEP 525 -- Asynchronous Generators. | Yury Selivanov | 2016-09-09 | 1 | -5/+8 |
| | | |||||
* | | Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations. | Yury Selivanov | 2016-09-09 | 1 | -1/+214 |
| | | | | | | | | Patch by Ivan Levkivskyi. | ||||
* | | replace PY_SIZE_MAX with SIZE_MAX | Benjamin Peterson | 2016-09-07 | 1 | -2/+2 |
| | | |||||
* | | replace Py_(u)intptr_t with the c99 standard types | Benjamin Peterson | 2016-09-06 | 1 | -3/+3 |
| | | |||||
* | | Issue #27078: Added BUILD_STRING opcode. Optimized f-strings evaluation. | Serhiy Storchaka | 2016-09-06 | 1 | -24/+2 |
| | | |||||
* | | Issue #27594: Prevent assertion error when running test_ast with coverage | Ned Deily | 2016-08-17 | 1 | -1/+1 |
| | | | | | | | | | | enabled: ensure code object has a valid first line number. Patch suggested by Ivan Levkivskyi. | ||||
* | | merge 3.5 (#27514) | Benjamin Peterson | 2016-07-15 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | make too many nested blocks be a SyntaxError instead of a SystemError ↵ | Benjamin Peterson | 2016-07-15 | 1 | -1/+1 |
| | | | | | | | | | | | | (closes #27514) Patch by Ammar Askar. | ||||
* | | Issue #27301: Fixed incorrect return codes for errors in compile.c. | Serhiy Storchaka | 2016-06-15 | 1 | -24/+38 |
|\ \ | |/ | |||||
| * | Issue #27301: Fixed incorrect return codes for errors in compile.c. | Serhiy Storchaka | 2016-06-15 | 1 | -16/+20 |
| | | |||||
* | | Issue #27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes. | Serhiy Storchaka | 2016-06-12 | 1 | -111/+136 |
| | | | | | | | | Patch by Demur Rumed. |