summaryrefslogtreecommitdiff
path: root/Cython/Compiler/Nodes.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 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
| | * Do not apply decorators twiceJeroen Demeyer2017-06-021-1/+3
| | | | | | | | | | | | This fixes https://github.com/cython/cython/issues/1679
* | | Add a Pythran backend for Numpy operationAdrien Guinet2017-06-171-1/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | When the user asked for it (thanks to the --np-pythran flag), use Pythran's Numpy implementation as a backend for numpy operation. This flag forces the C++ mode, as the Pythran implementation is written in C++. Distutils integration through the 'np_pythran' flag of the cythonize API is also provided. This commit also adds a Pythran mode for the tests, that can enable the pythran mode for the C++ tests, and allows the reuse of Cython tests to test for the Pythran integration.
* | Make "break" outside of loops a syntax error also inside of try-except blocks.Stefan Behnel2017-06-041-2/+3
|/ | | | Closes #1726.
* Explicit error on declaring a reference type.Robert Bradshaw2017-05-201-0/+2
| | | | This is better than generating invalid code; see #1695.
* Correctly look up module of superclass.Robert Bradshaw2017-05-111-1/+4
|
* Merge pull request #1669 from shalabhc/generator-profiling-fixscoder2017-05-101-15/+35
|\ | | | | Fix profiling for generators and generator expressions
| * Fix profiling for generators and generator expressionsShalabh Chaturvedi2017-04-101-15/+35
| | | | | | | | | | Fixes #1668. The profile hook is now called with 'call' and 'return' each time the generator resumes/yields.
* | cast invalid pointer initialisation values also for OpenMP temps and not ↵Stefan Behnel2017-05-061-1/+1
| | | | | | | | | | | | just normal variables Closes #1664
* | include missing utility code when raising StopAsyncIterationStefan Behnel2017-05-061-0/+2
| | | | | | | | Closes #1692
* | Generate subexpression code for deletion of C++ classes.Robert Bradshaw2017-04-291-1/+2
|/
* Remove duplicated file path handling code when generating file path tables.Stefan Behnel2017-02-121-20/+2
|
* Detect function template parameters through pointers and references.Robert Bradshaw2016-12-041-0/+6
| | | | Fixes #1541
* Suppress self-assignment warning.Robert Bradshaw2016-11-151-2/+1
|