summaryrefslogtreecommitdiff
path: root/Cython/Compiler/Builtin.py
Commit message (Collapse)AuthorAgeFilesLines
* Inline fast special cases for "abs(PyLong)" when the argument is ↵Stefan Behnel2018-03-251-1/+2
| | | | non-negative or small.
* Fix exttype inheritance from builtin bytearray type.Stefan Behnel2018-02-161-0/+2
| | | | Closes #2106.
* Issue #2042: add optimized versions of set.remove() and set.discard()Antoine Pitrou2017-12-161-1/+4
|
* Remove dead comment.Stefan Behnel2017-09-121-1/+0
|
* Return a signed value for abs(int).Robert Bradshaw2017-08-241-6/+15
| | | | | | | | | | | This means abs(MIN_INT) has the "overflow" behavior of returning MIN_INT as in C, but avoids surprising unsigned arithmetic for all other values. To preserve Python compatibility, abs(x) dissallows integer inference for x just like the other potentially overflowing arithmetic operators. This fixes Github Issue #1837
* Raise TypeError for non-string hasattr.Robert Bradshaw2017-05-181-2/+3
| | | | This fixes #1702.
* Merge pull request #1648 from da-woods/cmplx_absscoder2017-05-061-17/+17
|\ | | | | Now uses specialised functions for complex abs
| * Reduced duplication of code in builtin integer functionsda-woods2017-04-091-21/+10
| |
| * Reduced duplication in complex abs builtin callsda-woods2017-04-091-16/+9
| |
| * Now uses specialised functions for complex absda-woods2017-03-281-3/+21
| | | | | | | | | | | | | | | | | | Also doesn't require gil for int and long abs. Notes: * I don't think the correct utility code is loaded for complex abs (but it should be loaded by the complex data types hopefully) * Would probably be worth making double and float abs not require gil
* | include missing utility code when raising StopAsyncIterationStefan Behnel2017-05-061-5/+4
|/ | | | Closes #1692
* Disable set.update() optimization due to Python incompatibility.Robert Bradshaw2017-03-271-2/+3
| | | | set.update() is actually variadic. Fixes #1645.
* Declare Exception as a builtin type.Robert Bradshaw2016-09-301-0/+3
| | | | This allows extending from it with a cdef class. Closes #724.
* Test fixes.Robert Bradshaw2016-07-281-1/+1
|
* Allow old_style_globals to be set via a directive.Robert Bradshaw2016-07-271-4/+4
|
* implement 'async for' loop statement (PEP 492)Stefan Behnel2015-05-251-0/+7
|
* optimise set.update()Stefan Behnel2015-05-211-0/+2
|
* reimplement ord() to make its (C long) return value and input argument type ↵Stefan Behnel2015-03-291-1/+20
| | | | (bytes/unicode/char/unichar) available to the type analysis and avoid redundant round-trips into Python space
* add some more builtin namesStefan Behnel2014-12-171-0/+5
|
* use explicit relative imports everywhere and enable absolute imports by defaultStefan Behnel2014-06-171-5/+7
|
* Remove obsolete utility code.Robert Bradshaw2014-02-221-12/+4
|
* move set compatibility helpers into Builtins.cStefan Behnel2014-01-101-46/+1
|
* optimise dict.has_key()Stefan Behnel2013-12-311-0/+1
|
* disable redundant exception checks for optimised builtinsStefan Behnel2013-12-281-0/+1
|
* handle Py2 compatibility case bytearray.append(pychar)Stefan Behnel2013-12-271-2/+0
| | | | | --HG-- extra : amend_source : f3b7f004f905c791e6ced2a5b27fffa21f9ceb08
* inline bytearray.append()Stefan Behnel2013-12-241-1/+4
|
* let SliceNode know it returns a slice instanceStefan Behnel2013-12-161-1/+2
|
* fix return type of repr(): CPython guarantees to return strStefan Behnel2013-12-071-1/+1
|
* also optimise basestring.join() since we now infer this type in a couple of ↵Stefan Behnel2013-12-071-1/+4
| | | | places
* optimise str/bytes.join() and infer the result type; improve type inference ↵Stefan Behnel2013-12-071-5/+15
| | | | for called builtins
* refactor duplicated codeStefan Behnel2013-12-071-11/+14
|
* support 'bytearray' in the same way as 'bytes', starting with Py2.6Stefan Behnel2013-11-021-1/+3
|
* extend semantics of 'basestring' typed variables to represent exactly ↵Stefan Behnel2013-10-061-1/+2
| | | | bytes/str/unicode but no subtypes
* mark bytearray() and complex() as returning an instance of their typeStefan Behnel2013-08-301-2/+3
|
* optimize __debug__ flagStefan Behnel2013-08-291-0/+3
|
* minor cleanup, use set for efficient name lookupStefan Behnel2013-07-271-2/+3
|
* move getattr() utility code from Builtins.c to ObjectHandling.c as it deals ↵Stefan Behnel2013-07-261-1/+1
| | | | with object protocols and is not a required replacement
* optimise list.extend()Stefan Behnel2013-07-261-0/+2
|
* inline normal case of getattr(o,n)Stefan Behnel2013-04-111-3/+5
| | | | | --HG-- extra : rebase_source : 9a5bbb4f08a0eb5be71afd48d9ad5566d8a39efc
* optimise isinstance(obj, basestring) and map basestring to unicode in Py3Stefan Behnel2013-03-021-0/+1
|
* automatically replace calls to builtin.__contains__() with the corresponding ↵Stefan Behnel2013-02-221-7/+14
| | | | C-API function and enable optimisation of unbound builtin methods for subtypes
* automatically convert dict.iter*() and dict.view*() methods to ↵Stefan Behnel2013-02-201-0/+12
| | | | .keys/values/items() in Py3 for typed dicts
* move dict.*() method implementations from Optimize.c to Builtin.cStefan Behnel2013-02-201-3/+3
|
* fix long-standing bug that dict.items() etc. returned lists also in Py3Stefan Behnel2013-02-151-6/+9
|
* inline PyList_Append() a bit moreStefan Behnel2013-02-151-1/+2
|
* fix buildStefan Behnel2013-02-091-5/+6
|
* externalise some utility code functionsStefan Behnel2013-02-091-49/+4
|
* externalise some utility code functionsStefan Behnel2013-02-091-46/+5
|
* disable incorrect optimisation for set.discard()Stefan Behnel2013-02-041-2/+3
|
* optimise abs(long long)Stefan Behnel2013-01-211-0/+28
|