Stefan Behnel [Tue, 10 Dec 2013 19:52:02 +0000 (20:52 +0100)]
rewrite constant folding for PrimaryCmpNode to properly support (and fix) cascaded comparisons
Stefan Behnel [Mon, 9 Dec 2013 07:38:53 +0000 (08:38 +0100)]
remove outdated comment
Stefan Behnel [Sun, 8 Dec 2013 14:16:49 +0000 (15:16 +0100)]
fix test after making constant folding remove unused constants
Stefan Behnel [Sun, 8 Dec 2013 14:12:55 +0000 (15:12 +0100)]
fix compiler crash
Stefan Behnel [Sun, 8 Dec 2013 13:51:43 +0000 (14:51 +0100)]
discard lots of useless code and overhead from try-finally statements that don't need to handle Python exceptions (including C-only with-blocks)
Stefan Behnel [Sun, 8 Dec 2013 11:49:46 +0000 (12:49 +0100)]
add test for empty try-finally
Stefan Behnel [Sun, 8 Dec 2013 11:25:50 +0000 (12:25 +0100)]
fix Py2.4 C compilation problem
Stefan Behnel [Sun, 8 Dec 2013 11:22:44 +0000 (12:22 +0100)]
fix problematic constant folding condition in cascaded comparisons (even though it likely doesn't work anyway)
Stefan Behnel [Sun, 8 Dec 2013 11:13:35 +0000 (12:13 +0100)]
prevent compile time constant folding of non-portable string comparisons (e.g. between bytes and str)
Stefan Behnel [Sun, 8 Dec 2013 10:17:00 +0000 (11:17 +0100)]
remove unused code
Stefan Behnel [Sun, 8 Dec 2013 10:15:59 +0000 (11:15 +0100)]
discard ExprStatNodes with constant expressions
Stefan Behnel [Sun, 8 Dec 2013 08:12:44 +0000 (09:12 +0100)]
add some safety checks to the shared common types import
Stefan Behnel [Sun, 8 Dec 2013 07:56:27 +0000 (08:56 +0100)]
avoid risk of stale pointers by looking up Cython types module on each request (shouldn't hurt much to do it a couple of times during module initialisation)
Stefan Behnel [Sun, 8 Dec 2013 07:34:37 +0000 (08:34 +0100)]
simplify common type sharing code and fix ref-count inconsistency
Stefan Behnel [Sat, 7 Dec 2013 20:47:57 +0000 (21:47 +0100)]
disable docstring check in pylint
Stefan Behnel [Sat, 7 Dec 2013 14:52:10 +0000 (15:52 +0100)]
fix crash during C++ class type inference
Stefan Behnel [Sat, 7 Dec 2013 14:44:15 +0000 (15:44 +0100)]
fix bytes.join() in Py<=2.5
Stefan Behnel [Sat, 7 Dec 2013 13:15:13 +0000 (14:15 +0100)]
fix return type of repr(): CPython guarantees to return str
Stefan Behnel [Sat, 7 Dec 2013 13:08:03 +0000 (14:08 +0100)]
also optimise basestring.join() since we now infer this type in a couple of places
Stefan Behnel [Sat, 7 Dec 2013 12:30:03 +0000 (13:30 +0100)]
optimise str/bytes.join() and infer the result type; improve type inference for called builtins
Stefan Behnel [Sat, 7 Dec 2013 09:31:57 +0000 (10:31 +0100)]
refactor duplicated code
Stefan Behnel [Sat, 7 Dec 2013 07:24:56 +0000 (08:24 +0100)]
discard useless (PyObject*) casts from values of builtin types which are PyObject* internally anyway (saves lots of C code)
Stefan Behnel [Sat, 7 Dec 2013 07:04:15 +0000 (08:04 +0100)]
set another string length field in exception message format
Stefan Behnel [Sat, 7 Dec 2013 07:01:35 +0000 (08:01 +0100)]
set another string length field in exception message format
Stefan Behnel [Sat, 7 Dec 2013 06:54:17 +0000 (07:54 +0100)]
avoid useless signedness checks in overflow handling when we know the type is signed
Stefan Behnel [Sat, 7 Dec 2013 06:17:58 +0000 (07:17 +0100)]
undo condition change in struct conversion - was required in case of utility code creation
Robert Bradshaw [Sat, 7 Dec 2013 05:37:09 +0000 (21:37 -0800)]
Fix compiler crash in isinstance optimization.
Stefan Behnel [Fri, 6 Dec 2013 22:44:08 +0000 (23:44 +0100)]
reformat some code
Stefan Behnel [Fri, 6 Dec 2013 22:35:05 +0000 (23:35 +0100)]
fix condition to make struct conversion generate struct field conversion helpers at need
--HG--
extra : amend_source :
240f49031159777036e1e6a139b6d736f59de337
Stefan Behnel [Fri, 6 Dec 2013 22:15:59 +0000 (23:15 +0100)]
clean up lots of places where exceptions are being raised to reduce the message building overhead
Stefan Behnel [Fri, 6 Dec 2013 21:25:19 +0000 (22:25 +0100)]
fix C compiler warning when checking int overflow for division by enum values on 32 bit systems (in case anyone cares...)
Stefan Behnel [Fri, 6 Dec 2013 20:57:32 +0000 (21:57 +0100)]
minor improvements in __Pyx_ArgTypeTest() and prevent it from raising C compiler warnings by inlining it
Stefan Behnel [Fri, 6 Dec 2013 18:07:18 +0000 (19:07 +0100)]
fix for-in loop variable inference after enabling list/tuple item type inference
Stefan Behnel [Fri, 6 Dec 2013 17:58:01 +0000 (18:58 +0100)]
extend test
Stefan Behnel [Fri, 6 Dec 2013 17:18:37 +0000 (18:18 +0100)]
infer type of items in tuple/list constants on indexing (especially where all items have the same type)
--HG--
extra : amend_source :
1e8bf2d512c244f48654f43e37283d800e5d961a
Stefan Behnel [Fri, 6 Dec 2013 14:22:52 +0000 (15:22 +0100)]
improve type inference for string %/+/* operations and use more direct C-API calls for these unicode operations
Stefan Behnel [Thu, 5 Dec 2013 18:46:52 +0000 (19:46 +0100)]
minor fix
Stefan Behnel [Sun, 1 Dec 2013 19:02:47 +0000 (20:02 +0100)]
constant fold in-tests against empty containers
--HG--
extra : amend_source :
6fe9294d38a26b208899453b4a12739dcc496c16
Stefan Behnel [Sun, 1 Dec 2013 18:43:44 +0000 (19:43 +0100)]
minor code cleanups
Stefan Behnel [Sun, 1 Dec 2013 17:09:04 +0000 (18:09 +0100)]
allow visitor dispatch methods in pylint
Stefan Behnel [Sun, 1 Dec 2013 17:04:46 +0000 (18:04 +0100)]
simplify some code
Stefan Behnel [Sun, 1 Dec 2013 16:58:58 +0000 (17:58 +0100)]
strip multiplication factor when recursively folding empty sequences
Stefan Behnel [Sun, 1 Dec 2013 16:51:48 +0000 (17:51 +0100)]
fix glitch in constant folding of slices
Stefan Behnel [Sun, 1 Dec 2013 15:31:55 +0000 (16:31 +0100)]
constant fold some more special cases for list/tuple multiplication
Stefan Behnel [Sun, 1 Dec 2013 15:10:01 +0000 (16:10 +0100)]
strip mult-factor from empty list literals
Stefan Behnel [Sun, 1 Dec 2013 15:02:57 +0000 (16:02 +0100)]
pre-calculate constant loop length when iterating over literal tuples/lists
Stefan Behnel [Sun, 1 Dec 2013 14:37:05 +0000 (15:37 +0100)]
discard constant True condition in while loops
Stefan Behnel [Sun, 1 Dec 2013 08:19:03 +0000 (09:19 +0100)]
get rid of 'yellow last line' problem by assigning the function exit error handling and default value return code to the signature line instead of the last code line
Stefan Behnel [Sun, 1 Dec 2013 07:59:47 +0000 (08:59 +0100)]
fix annotation for generated Python function wrapper
Stefan Behnel [Sun, 1 Dec 2013 07:56:06 +0000 (08:56 +0100)]
fix annotation score calculation
Stefan Behnel [Sat, 30 Nov 2013 20:07:38 +0000 (21:07 +0100)]
fix copy&past bug
Stefan Behnel [Sat, 30 Nov 2013 19:58:35 +0000 (20:58 +0100)]
clean up some code
Stefan Behnel [Sat, 30 Nov 2013 19:22:57 +0000 (20:22 +0100)]
parse and annotate the C code in one pass instead of repeated parse+replace operations
Stefan Behnel [Sat, 30 Nov 2013 14:47:31 +0000 (15:47 +0100)]
minor code cleanup
Stefan Behnel [Sat, 30 Nov 2013 14:41:21 +0000 (15:41 +0100)]
fix annotation of modules that do not generate any C code for user sources
Stefan Behnel [Fri, 29 Nov 2013 15:40:04 +0000 (16:40 +0100)]
fix embedsignatures test in Py3.4
Stefan Behnel [Fri, 29 Nov 2013 15:17:24 +0000 (16:17 +0100)]
fix doctest in Py3.4
Stefan Behnel [Fri, 29 Nov 2013 15:14:22 +0000 (16:14 +0100)]
fix doctest in Py3.4
Stefan Behnel [Fri, 29 Nov 2013 12:58:40 +0000 (13:58 +0100)]
disable autotestdict when testing under Py3.4 and adapt autotestdict tests to make up for its smarter docstring lookup
Stefan Behnel [Mon, 25 Nov 2013 18:48:46 +0000 (19:48 +0100)]
fix caching of e+nnn format floats
Stefan Behnel [Sun, 24 Nov 2013 15:54:43 +0000 (16:54 +0100)]
minor safety fixes in constant folding
Stefan Behnel [Sun, 24 Nov 2013 15:41:23 +0000 (16:41 +0100)]
changelog
Stefan Behnel [Sun, 24 Nov 2013 15:29:40 +0000 (16:29 +0100)]
minor code cleanup
Stefan Behnel [Sun, 24 Nov 2013 15:20:39 +0000 (16:20 +0100)]
fix compiler crash on unitialised result_code and fix coercion of float/bool back to C values
Stefan Behnel [Sun, 24 Nov 2013 15:06:46 +0000 (16:06 +0100)]
use plain constants for Python bool values instead of coerced C ints
Stefan Behnel [Sun, 24 Nov 2013 14:42:39 +0000 (15:42 +0100)]
extend test
Stefan Behnel [Sun, 24 Nov 2013 13:32:45 +0000 (14:32 +0100)]
cache Python float constants
--HG--
extra : amend_source :
a382ac055ce79771e0457bed2e3b8d253581a54f
Stefan Behnel [Sun, 24 Nov 2013 12:18:12 +0000 (13:18 +0100)]
streamline iteration termination a bit
Stefan Behnel [Sat, 23 Nov 2013 20:59:15 +0000 (21:59 +0100)]
let += and -= inplace operators use pointer arithmetic when used on C strings (instead of currently failing attempt at string concatenation)
Stefan Behnel [Sat, 23 Nov 2013 20:44:31 +0000 (21:44 +0100)]
minor code cleanup
Stefan Behnel [Sat, 23 Nov 2013 20:37:41 +0000 (21:37 +0100)]
remove outdated test
Stefan Behnel [Sat, 23 Nov 2013 20:34:34 +0000 (21:34 +0100)]
make some tests from 'broken' directory usable
--HG--
rename : tests/broken/inplace_lhs.pyx => tests/compile/inplace_lhs.pyx
rename : tests/broken/inplace_ops.pyx => tests/compile/inplace_ops.pyx
Stefan Behnel [Sat, 23 Nov 2013 20:26:19 +0000 (21:26 +0100)]
make an old test from 'broken' directory usable
--HG--
rename : tests/broken/voidstarcast.pyx => tests/run/voidstarcast.pyx
Stefan Behnel [Sat, 23 Nov 2013 20:22:15 +0000 (21:22 +0100)]
make an old test from 'broken' directory usable
Stefan Behnel [Sat, 23 Nov 2013 20:21:44 +0000 (21:21 +0100)]
make an old test from 'broken' directory usable
--HG--
rename : tests/broken/typeofexttype.pyx => tests/run/typeofexttype.pyx
Stefan Behnel [Sat, 23 Nov 2013 20:15:13 +0000 (21:15 +0100)]
make an old test from 'broken' directory usable
Stefan Behnel [Sat, 23 Nov 2013 20:09:53 +0000 (21:09 +0100)]
remove some useless tests from 'broken' directory
Stefan Behnel [Sat, 23 Nov 2013 20:09:24 +0000 (21:09 +0100)]
make an old test from 'broken' directory usable
--HG--
rename : tests/broken/onelinesuite.pyx => tests/run/onelinesuite.py
Stefan Behnel [Sat, 23 Nov 2013 20:01:21 +0000 (21:01 +0100)]
extend test
Stefan Behnel [Sat, 23 Nov 2013 19:58:10 +0000 (20:58 +0100)]
unpack redundantly coerced int/float literals during optimisation cleanup
Stefan Behnel [Sat, 23 Nov 2013 19:45:54 +0000 (20:45 +0100)]
extend test
Stefan Behnel [Sat, 23 Nov 2013 19:42:33 +0000 (20:42 +0100)]
minor code cleanup
Stefan Behnel [Sat, 23 Nov 2013 19:25:08 +0000 (20:25 +0100)]
fix no-args int() call
Stefan Behnel [Sat, 23 Nov 2013 16:28:44 +0000 (17:28 +0100)]
call PyNumber_Int() for builtin int() function
Stefan Behnel [Sat, 23 Nov 2013 14:39:17 +0000 (15:39 +0100)]
extend test
Stefan Behnel [Sat, 23 Nov 2013 13:14:45 +0000 (14:14 +0100)]
merge 0.19.x branch into master
Stefan Behnel [Sat, 23 Nov 2013 13:13:29 +0000 (14:13 +0100)]
fix 'raise type, instance' in Py3 by preventing it from trying to re-instantiate the instance
Stefan Behnel [Sat, 23 Nov 2013 11:48:20 +0000 (12:48 +0100)]
extend test
Stefan Behnel [Sat, 23 Nov 2013 10:30:19 +0000 (11:30 +0100)]
back out the last two exception raising changes
Stefan Behnel [Sat, 23 Nov 2013 10:21:23 +0000 (11:21 +0100)]
merge 0.19.x branch into master
Stefan Behnel [Sat, 23 Nov 2013 10:21:00 +0000 (11:21 +0100)]
fix refcounting in __Pyx_Raise() because PyErr_NormalizeException() increfs its return values
Stefan Behnel [Sat, 23 Nov 2013 07:59:47 +0000 (08:59 +0100)]
avoid executing Python doctest that doesn't work in Py2.x
--HG--
rename : tests/run/pyclass_special_methods.py => tests/run/pyclass_special_methods.pyx
Stefan Behnel [Sat, 23 Nov 2013 07:50:43 +0000 (08:50 +0100)]
merge 0.19.x branch into master
Stefan Behnel [Sat, 23 Nov 2013 07:50:14 +0000 (08:50 +0100)]
let CPython do the exception instantiation on 'raise' in Py3 to make sure we handle all special cases correctly
Stefan Behnel [Fri, 22 Nov 2013 18:48:18 +0000 (19:48 +0100)]
use more CPython-like (and potentially faster) _PyType_Lookup() for internal special method lookups instead of generic attribute lookup
Stefan Behnel [Fri, 22 Nov 2013 06:48:00 +0000 (07:48 +0100)]
always wrap for-iterator node in NextNode after analysing it (might have been replaced)
Stefan Behnel [Fri, 22 Nov 2013 06:45:25 +0000 (07:45 +0100)]
revert incomplete fix for ticket #600: not enough for more complex scoping and evaluation time issues
Stefan Behnel [Fri, 22 Nov 2013 06:39:11 +0000 (07:39 +0100)]
make sure foreign entries are reused
Stefan Behnel [Fri, 22 Nov 2013 06:38:25 +0000 (07:38 +0100)]
extend test
Stefan Behnel [Fri, 22 Nov 2013 05:31:49 +0000 (06:31 +0100)]
always wrap for-iterator node in NextNode after analysing it (might have been replaced)