summaryrefslogtreecommitdiff
path: root/Cython/Compiler/Nodes.py
Commit message (Collapse)AuthorAgeFilesLines
* Update implementation of PEP 3118 getbuffer special methoddalcinl/fix-getbufferLisandro Dalcin2017-11-011-20/+52
| | | | | * Rework check for `view==NULL` required for legacy Python 3 releases. * Handle redefined `struct Py_buffer` in user code (e.g. mpi4py).
* Implement line tracing for generators and coroutines.Stefan Behnel2017-10-311-2/+9
| | | | Closes #1949.
* Merge branch '0.27.x'Stefan Behnel2017-10-291-3/+3
|\
| * Minor changes to try/finally code generation [should silence Coverity Scan]dalcinl/fix-try-finallyLisandro Dalcin2017-10-291-3/+3
| |
| * Mark unused vars with `(void)x;` [should silence Coverity Scan]Lisandro Dalcin2017-10-281-1/+2
| |
* | Merge pull request #1952 from cython/dalcinl/mark-unused-varsLisandro Dalcin2017-10-281-1/+2
|\ \ | | | | | | Mark unused vars with `(void)x;` [should silence Coverity Scan]
| * | Mark unused vars with `(void)x;` [should silence Coverity Scan]dalcinl/mark-unused-varsLisandro Dalcin2017-10-281-1/+2
| |/
* | Trivial typo fixesUnknown2017-10-171-2/+2
| | | | | | | | | | Most are non-user facing. Found using: `codespell -d -q 3`
* | Better errors for unknown type arguments.Robert Bradshaw2017-10-141-1/+1
| |
* | Speed up some dict lookups in Py3.5+ by calling the faster ↵Stefan Behnel2017-10-081-3/+3
| | | | | | | | "_PyDict_GetItem_KnownHash()" instead of "PyDict_GetItem()".
* | Clean up code.Stefan Behnel2017-10-081-3/+4
| |
* | Discard loop variable resetting in ForFromStatNode for Python loop variables ↵Stefan Behnel2017-10-081-2/+2
| | | | | | | | also after the range() optimisation (was previously implied).
* | Add a warning about range(enum) iteration since it's really not a good idea ↵Stefan Behnel2017-10-081-0/+3
| | | | | | | | usually, so requiring an explicit cast to say "I know what I'm doing" seems best.
* | Enable for-in-range() optimisation also for small integer loops with a ↵Stefan Behnel2017-10-081-19/+22
| | | | | | | | Python loop variable. We cannot always infer the loop variable as safe integer type, but dropping the loop itself into C is always faster than calling range().
* | Automatic late includes.Jeroen Demeyer2017-09-281-3/+13
|/
* Remove dead code.Stefan Behnel2017-09-281-3/+0
|
* Allow arbitrary annotations again with "annotation_typing=False", not only ↵Stefan Behnel2017-09-271-1/+1
| | | | valid types.
* Include error helper function only at need and do not inline it.Stefan Behnel2017-09-121-4/+4
|
* Attempt to use a faster exception value for return type annotations that ↵Stefan Behnel2017-09-091-17/+30
| | | | | | | | | | | | | | check for exceptions. Inside of a module, it is safe to convert a function declared cdef int func() except *: ... into cdef int func() except? -1 because a) we need an exception return value anyway and b) there will always be an explicit exception check afterwards. Thus, changing the function implementation itself is safe. We must exclude functions that are only declared but not implemented since we do not control their signature and it is not safe to assume a specific exception return value if it is not declared.
* Implement @cython.exceptval() decorator to make the "except x" signature ↵Stefan Behnel2017-09-031-7/+8
| | | | | | declaration available in pure Python mode. Closes #1653.
* Need to delay annotation typing after the "as_cfunction()" conversion in ↵Stefan Behnel2017-09-031-2/+2
| | | | AdjustDefByDirectives transform as we do not have an 'env' yet.
* Work around compiler crash due to missing 'env' (before declaration ↵Stefan Behnel2017-09-021-1/+2
| | | | analysis) when combining @ccall with argument annotations.
* Add comment.Stefan Behnel2017-09-021-0/+1
|
* Allow arbitrary type references in annotations, rather than just valid ↵Stefan Behnel2017-09-021-2/+9
| | | | executable Python expressions.
* Change annotation typing directive to cover all type annotations and modify ↵Stefan Behnel2017-09-021-4/+13
| | | | | | annotation parsing to be more PEP 484 compatible. Only "cython.*" types are interpreted as C types from now on, everything else is considered Python types for maximum compatibility with Python type hints.
* Fix compiler crash in some error cases where ExprStatNode accidentally ↵Stefan Behnel2017-09-021-1/+1
| | | | contains a StatNode.
* Implement PEP 526: syntax for variable annotations.Stefan Behnel2017-09-021-4/+13
| | | | | Also parses variable annotations as type declarations. Closes #1850.
* Allow for-in-range loop targets to be arbitrary expressions, not just plain ↵Stefan Behnel2017-09-021-8/+15
| | | | | | names. Closes #1831.
* Remove debugging change.Robert Bradshaw2017-09-011-1/+1
|
* More complete test and fix for template specialization issues.Robert Bradshaw2017-08-311-1/+1
| | | | Partial workaround for Github Issue #1852.
* Minor code cleanups.Stefan Behnel2017-08-241-2/+3
|
* Pass current thread state into generator body instead of requesting it twice.Stefan Behnel2017-08-241-3/+2
|
* Move exception state cleanup into generator body code to allow a distinction ↵Stefan Behnel2017-08-241-11/+15
| | | | between normal yields and yields in except blocks. They require different handling according to what CPython does.
* Repair "range(enum)" iteration in C++ which (rightfully) disallows arbitrary ↵Stefan Behnel2017-08-171-4/+9
| | | | assignments between enum+int.
* Merge pull request #1802 from scoder/_pep525_async_genscoder2017-08-091-39/+70
|\ | | | | PEP 525: asynchronous generators
| * disambiguate attribute name ("is_async_gen" it too close to an existing ↵Stefan Behnel2017-08-081-5/+5
| | | | | | | | "is_asyncgen")
| * remove support for the pre-Py3.5.2 aiter protocol that slows down the ↵Stefan Behnel2017-08-081-3/+2
| | | | | | | | overall implementation
| * repair scoped comprehensions inside of generators and async functions by ↵Stefan Behnel2017-08-071-2/+2
| | | | | | | | allowing their loop variables to be added to closures when necessary
| * in generators/coroutines, save away the current exception in the 'return' ↵Stefan Behnel2017-07-301-22/+41
| | | | | | | | case of finally clauses as 'return' actually raises an (Async)StopIteration exception
| * remove accidental left-overStefan Behnel2017-07-291-1/+1
| |
| * solve most of the issues with failing async-gen tests, some asyncio tests ↵Stefan Behnel2017-07-291-8/+14
| | | | | | | | are still failing
| * allow yield in async def functions (which turns them into async generators)Stefan Behnel2017-07-271-4/+11
| |
* | Fix "declaration after code" issue.Stefan Behnel2017-07-311-1/+1
|/ | | | Closes #1801
* remove useless semicolons from Python codeStefan Behnel2017-07-131-2/+2
|
* Fix #1767Robert Bradshaw2017-07-101-3/+5
|
* Add semicolon for fallthrough statements.0.26b2Robert Bradshaw2017-07-101-3/+3
| | | | Resolves note at #1765.
* First attempt at explicit fallthrough annotation.Robert Bradshaw2017-07-081-0/+4
|
* Suppress (verbose) may-be-used-uninitialized errors.Robert Bradshaw2017-07-061-0/+4
|
* Merge branch 'master' into feature/pythranscoder2017-06-251-1/+3
|\
| * Merge pull request #1724 from jdemeyer/cyfunction_decoratorsscoder2017-06-251-1/+3
| |\ | | | | | | Do not apply decorators twice