summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove CALL_PROFILE special buildVictor Stinner2016-11-281-91/+0
| | | | | | | | | | | Issue #28799: * Remove the PyEval_GetCallStats() function. * Deprecate the untested and undocumented sys.callstats() function. * Remove the CALL_PROFILE special build Use the sys.setprofile() function, cProfile or profile module to profile function calls.
* Merge 3.6Victor Stinner2016-11-241-0/+1
|\
| * Fix _PyGen_yf()Victor Stinner2016-11-241-0/+1
| | | | | | | | | | | | | | | | Issue #28782: Fix a bug in the implementation ``yield from`` when checking if the next instruction is YIELD_FROM. Regression introduced by WORDCODE (issue #26647). Reviewed by Serhiy Storchaka and Yury Selivanov.
* | mergeRaymond Hettinger2016-11-221-1/+3
|\ \ | |/
| * Issue #27100: Fix ref leakRaymond Hettinger2016-11-221-1/+3
| |
* | mergeRaymond Hettinger2016-11-221-4/+4
|\ \ | |/
| * Issue #27100: With statement reports missing __enter__ before __exit__. ↵Raymond Hettinger2016-11-221-4/+4
| | | | | | | | (Contributed by Jonathan Ellington.)
* | Added the const qualifier to char* variables that refer to readonly internalSerhiy Storchaka2016-11-201-5/+5
| | | | | | | | UTF-8 represenatation of Unicode objects.
* | Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-2/+2
|\ \ | |/ | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
| * Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-2/+2
| | | | | | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
| * Issue #28665: Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF giving a ↵Raymond Hettinger2016-11-111-2/+3
| | | | | | | | 40% speedup.
* | Issue #28665: Use macro form of PyCell_GET/SETRaymond Hettinger2016-11-121-4/+8
| |
* | mergeRaymond Hettinger2016-11-111-2/+3
| |
* | Issue #28618: Make hot functions using __attribute__((hot))Victor Stinner2016-11-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Python is not compiled with PGO, the performance of Python on call_simple and call_method microbenchmarks depend highly on the code placement. In the worst case, the performance slowdown can be up to 70%. The GCC __attribute__((hot)) attribute helps to keep hot code close to reduce the risk of such major slowdown. This attribute is ignored when Python is compiled with PGO. The following functions are considered as hot according to statistics collected by perf record/perf report: * _PyEval_EvalFrameDefault() * call_function() * _PyFunction_FastCall() * PyFrame_New() * frame_dealloc() * PyErr_Occurred()
* | Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.Serhiy Storchaka2016-11-081-2/+2
|\ \ | |/ | | | | Every opcode should end with DISPATCH() or goto error.
| * Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.Serhiy Storchaka2016-11-081-2/+2
| |\ | | | | | | | | | Every opcode should end with DISPATCH() or goto error.
| | * Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.Serhiy Storchaka2016-11-081-1/+1
| | | | | | | | | | | | Every opcode should end with DISPATCH() or goto error.
| | * Issue #28257: Improved error message when pass a non-mapping as a var-keywordSerhiy Storchaka2016-10-071-4/+17
| | | | | | | | | | | | argument.
| | * Silence GCC warning.Serhiy Storchaka2016-09-221-2/+2
| | | | | | | | | | | | The code was correct, but GCC is not enough clever.
| | * Issue #26020: Fix evaluation order for set literalsRaymond Hettinger2016-09-081-2/+4
| | |
* | | Merge 3.6 (issue #27243)Yury Selivanov2016-11-081-1/+1
|\ \ \ | |/ /
| * | Issue #27243: Change PendingDeprecationWarning -> DeprecationWarning.Yury Selivanov2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | As it was agreed in the issue, __aiter__ returning an awaitable should result in PendingDeprecationWarning in 3.5 and in DeprecationWarning in 3.6.
* | | Issue #21955: Please don't try to optimize int+intVictor Stinner2016-10-201-0/+6
| | |
* | | Minor fix-up to apply the stack adjustment macros consistent with the other ↵Raymond Hettinger2016-10-161-2/+2
| | | | | | | | | | | | opcodes
* | | Issue #27358: Merge from 3.6Berker Peksag2016-10-021-1/+1
|\ \ \ | |/ /
| * | Issue #27358: Fix typo in error messageBerker Peksag2016-10-021-1/+1
| | |
* | | Issue #27358: Optimized merging var-keyword arguments and improved errorSerhiy Storchaka2016-10-021-44/+54
|\ \ \ | |/ / | | | | | | message when pass a non-mapping as a var-keyword argument.
| * | Issue #27358: Optimized merging var-keyword arguments and improved errorSerhiy Storchaka2016-10-021-44/+54
| | | | | | | | | | | | message when pass a non-mapping as a var-keyword argument.
* | | Issue #28257: Improved error message when pass a non-iterable asSerhiy Storchaka2016-10-021-1/+12
|\ \ \ | |/ / | | | | | | a var-positional argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
| * | Issue #28257: Improved error message when pass a non-iterable asSerhiy Storchaka2016-10-021-1/+12
| | | | | | | | | | | | a var-positional argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
* | | Issue #27703: Got rid of unnecessary NULL checks in do_raise() in release mode.Serhiy Storchaka2016-09-271-2/+5
|/ / | | | | | | Patch by Xiang Zhang.
* | Issue #28086: Single var-positional argument of tuple subtype was passedSerhiy Storchaka2016-09-221-2/+2
| | | | | | | | unscathed to the C-defined function. Now it is converted to exact tuple.
* | Document kwnames in _PyObject_FastCallKeywords() and _PyStack_AsDict()Victor Stinner2016-09-121-0/+5
| | | | | | | | Issue #27213.
* | Issue #27213: Fix reference leaksVictor Stinner2016-09-121-0/+2
| |
* | Issue #27213: Fixed different issues with reworked CALL_FUNCTION* opcodes.Serhiy Storchaka2016-09-111-84/+57
| | | | | | | | | | | | | | | | | | | | | | * 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 #27129: Replaced wordcode related magic constants with macros.Serhiy Storchaka2016-09-111-27/+21
| |
* | DTrace support: function calls, GC activity, line executionŁukasz Langa2016-09-101-2/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested on macOS 10.11 dtrace, Ubuntu 16.04 SystemTap, and libbcc. Largely based by an initial patch by Jesús Cea Avión, with some influence from Dave Malcolm's SystemTap patch and Nikhil Benesch's unification patch. Things deliberately left out for simplicity: - ustack helpers, I have no way of testing them at this point since they are Solaris-specific - PyFrameObject * in function__entry/function__return, this is SystemTap-specific - SPARC support - dynamic tracing - sys module dtrace facility introspection All of those might be added later.
* | remove more READ_TIMESTAMPBenjamin Peterson2016-09-091-12/+0
| |
* | remove READ_TIMESTAMP macroBenjamin Peterson2016-09-091-3/+0
| |
* | remove ceval timestamp supportBenjamin Peterson2016-09-091-153/+1
| |
* | Issue #27810: Add _PyCFunction_FastCallKeywords()Victor Stinner2016-09-091-136/+28
| | | | | | | | | | Use _PyCFunction_FastCallKeywords() in ceval.c: it allows to remove a lot of code from ceval.c which was only used to call C functions.
* | Add _PyObject_FastCallKeywords()Victor Stinner2016-09-091-53/+36
| | | | | | | | | | | | | | | | | | | | Issue #27830: Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments. Other changes: * Cleanup call_function() and fast_function() (ex: rename nk to nkwargs) * Remove now useless do_call(), replaced with _PyObject_FastCallKeywords()
* | Rework CALL_FUNCTION* opcodesVictor Stinner2016-09-091-287/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | ceval: tighten the code of STORE_ANNOTATIONYury Selivanov2016-09-091-2/+1
| |
* | Issue #28003: Implement PEP 525 -- Asynchronous Generators.Yury Selivanov2016-09-091-29/+83
| |
* | Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations.Yury Selivanov2016-09-091-0/+112
| | | | | | | | Patch by Ivan Levkivskyi.
* | MergeRaymond Hettinger2016-09-081-2/+4
| |
* | Add the co_extra field and accompanying APIs to code objects.Brett Cannon2016-09-071-0/+14
| | | | | | | | This completes PEP 523.
* | Issue #27078: Added BUILD_STRING opcode. Optimized f-strings evaluation.Serhiy Storchaka2016-09-061-0/+18
| |
* | Implement the frame evaluation API aspect of PEP 523.Brett Cannon2016-09-051-0/+7
| |