platform/upstream/python-cython.git
11 years agominor cleanup
Stefan Behnel [Sat, 23 Feb 2013 21:19:27 +0000 (22:19 +0100)]
minor cleanup

11 years agosimplify code for directly calling module internal tp_new() slot function
Stefan Behnel [Sat, 23 Feb 2013 20:40:56 +0000 (21:40 +0100)]
simplify code for directly calling module internal tp_new() slot function

11 years agominor cleanup
Stefan Behnel [Sat, 23 Feb 2013 20:36:48 +0000 (21:36 +0100)]
minor cleanup

11 years agochangelog
Stefan Behnel [Sat, 23 Feb 2013 20:14:42 +0000 (21:14 +0100)]
changelog

11 years agooptimise tp_new() for module-internally defined types by calling the tp_new slot...
Stefan Behnel [Sat, 23 Feb 2013 17:20:53 +0000 (18:20 +0100)]
optimise tp_new() for module-internally defined types by calling the tp_new slot function directly

11 years agoimplement tp_new() optimisation with args/kwargs
Stefan Behnel [Sat, 23 Feb 2013 16:23:59 +0000 (17:23 +0100)]
implement tp_new() optimisation with args/kwargs

11 years agomake call signature of method dispatch usable for both simple and general call nodes
Stefan Behnel [Sat, 23 Feb 2013 16:20:12 +0000 (17:20 +0100)]
make call signature of method dispatch usable for both simple and general call nodes

11 years agomove tp_new() utility code into ObjectHandling.c
Stefan Behnel [Sat, 23 Feb 2013 15:47:55 +0000 (16:47 +0100)]
move tp_new() utility code into ObjectHandling.c

11 years agomove string related utility functions from Optimize.c and Optimize.py to StringTools.c
Stefan Behnel [Sat, 23 Feb 2013 15:44:16 +0000 (16:44 +0100)]
move string related utility functions from Optimize.c and Optimize.py to StringTools.c

11 years agoonly include CythonFunction utility code if it's really used, might be unused if...
Stefan Behnel [Sat, 23 Feb 2013 15:25:33 +0000 (16:25 +0100)]
only include CythonFunction utility code if it's really used, might be unused if .pxd overrides all def functions to cdef

11 years agorefactor constant string slicing and guard it against platform specific unicode strin...
Stefan Behnel [Sat, 23 Feb 2013 13:54:41 +0000 (14:54 +0100)]
refactor constant string slicing and guard it against platform specific unicode string length

11 years agoadd constant folding test for sliced unicode and bytes literals
Stefan Behnel [Sat, 23 Feb 2013 13:14:04 +0000 (14:14 +0100)]
add constant folding test for sliced unicode and bytes literals

11 years agofold sliced literal sequences (e.g. from DEFs) into constants
Stefan Behnel [Sat, 23 Feb 2013 13:09:44 +0000 (14:09 +0100)]
fold sliced literal sequences (e.g. from DEFs) into constants

11 years agofix expression node finding for bool and character values in constant folding
Stefan Behnel [Sat, 23 Feb 2013 12:02:40 +0000 (13:02 +0100)]
fix expression node finding for bool and character values in constant folding

11 years agodelete unused LongNode class
Stefan Behnel [Sat, 23 Feb 2013 10:39:14 +0000 (11:39 +0100)]
delete unused LongNode class

11 years agoadd constant folding tests for bool values
Stefan Behnel [Sat, 23 Feb 2013 10:36:26 +0000 (11:36 +0100)]
add constant folding tests for bool values

11 years agominor code cleanup
Stefan Behnel [Sat, 23 Feb 2013 10:35:53 +0000 (11:35 +0100)]
minor code cleanup

11 years agofix constant folding for repeated negation
Stefan Behnel [Sat, 23 Feb 2013 10:28:10 +0000 (11:28 +0100)]
fix constant folding for repeated negation

11 years agosupport Ellipsis as compile time constant
Stefan Behnel [Sat, 23 Feb 2013 09:55:55 +0000 (10:55 +0100)]
support Ellipsis as compile time constant

11 years agoremove duplicated code
Stefan Behnel [Sat, 23 Feb 2013 09:47:52 +0000 (10:47 +0100)]
remove duplicated code

11 years agoremove Py2.3 work-around
Stefan Behnel [Sat, 23 Feb 2013 09:47:10 +0000 (10:47 +0100)]
remove Py2.3 work-around

11 years agosimplify evaluation of --cython-only option in test runner
Stefan Behnel [Sat, 23 Feb 2013 09:20:45 +0000 (10:20 +0100)]
simplify evaluation of --cython-only option in test runner

11 years agohonour --cython-only option in compiled unit tests and pyregr tests
Stefan Behnel [Sat, 23 Feb 2013 09:14:21 +0000 (10:14 +0100)]
honour --cython-only option in compiled unit tests and pyregr tests

11 years agoautomatically replace calls to builtin.__contains__() with the corresponding C-API...
Stefan Behnel [Fri, 22 Feb 2013 19:07:09 +0000 (20:07 +0100)]
automatically replace calls to builtin.__contains__() with the corresponding C-API function and enable optimisation of unbound builtin methods for subtypes

11 years agofix the last fix
Stefan Behnel [Fri, 22 Feb 2013 17:29:48 +0000 (18:29 +0100)]
fix the last fix

11 years agoadd safety fix for method dispatch visitor
Stefan Behnel [Fri, 22 Feb 2013 17:02:07 +0000 (18:02 +0100)]
add safety fix for method dispatch visitor

11 years agorefactor __class__ replacement hack, argument coercion and self-arg checking in Attri...
Stefan Behnel [Fri, 22 Feb 2013 13:54:13 +0000 (14:54 +0100)]
refactor __class__ replacement hack, argument coercion and self-arg checking in AttributeNode

11 years agoremove method dispatch on CascadedCmpNode: currently fails to handle first (inherited...
Stefan Behnel [Fri, 22 Feb 2013 12:09:31 +0000 (13:09 +0100)]
remove method dispatch on CascadedCmpNode: currently fails to handle first (inherited) operand

11 years agooptimise 'x in unicode' a bit
Stefan Behnel [Fri, 22 Feb 2013 00:11:27 +0000 (01:11 +0100)]
optimise 'x in unicode' a bit

11 years agodeclare some internal transform methods final
Stefan Behnel [Thu, 21 Feb 2013 23:57:07 +0000 (00:57 +0100)]
declare some internal transform methods final

11 years agosupport special comparison methods in method dispatch transforms
Stefan Behnel [Thu, 21 Feb 2013 22:52:15 +0000 (23:52 +0100)]
support special comparison methods in method dispatch transforms

11 years agomake test functions a bit more readable and add some additional tests
Stefan Behnel [Thu, 21 Feb 2013 21:39:35 +0000 (22:39 +0100)]
make test functions a bit more readable and add some additional tests

11 years agoremove a __class__ replacement hack from memoryview code in SliceIndexNode class
Stefan Behnel [Thu, 21 Feb 2013 21:19:28 +0000 (22:19 +0100)]
remove a __class__ replacement hack from memoryview code in SliceIndexNode class

11 years agoadd tests for non-loop usage of dict.iter*() methods
Stefan Behnel [Thu, 21 Feb 2013 20:56:53 +0000 (21:56 +0100)]
add tests for non-loop usage of dict.iter*() methods

11 years agofix utility code name
Stefan Behnel [Thu, 21 Feb 2013 20:46:06 +0000 (21:46 +0100)]
fix utility code name

11 years agofix test in Py3.1
Stefan Behnel [Thu, 21 Feb 2013 10:03:01 +0000 (11:03 +0100)]
fix test in Py3.1

11 years agoremove test that no longer compiles after C-ifying dict.iterkeys()
Stefan Behnel [Wed, 20 Feb 2013 20:01:02 +0000 (21:01 +0100)]
remove test that no longer compiles after C-ifying dict.iterkeys()

11 years agoautomatically convert dict.iter*() and dict.view*() methods to .keys/values/items...
Stefan Behnel [Wed, 20 Feb 2013 19:13:04 +0000 (20:13 +0100)]
automatically convert dict.iter*() and dict.view*() methods to .keys/values/items() in Py3 for typed dicts

11 years agomove dict.*() method implementations from Optimize.c to Builtin.c
Stefan Behnel [Wed, 20 Feb 2013 18:49:03 +0000 (19:49 +0100)]
move dict.*() method implementations from Optimize.c to Builtin.c

11 years agochangelog
Stefan Behnel [Wed, 20 Feb 2013 18:00:07 +0000 (19:00 +0100)]
changelog

11 years agofix copy+paste bug
Stefan Behnel [Wed, 20 Feb 2013 16:41:51 +0000 (17:41 +0100)]
fix copy+paste bug

11 years agofix typo
Stefan Behnel [Wed, 20 Feb 2013 09:26:00 +0000 (10:26 +0100)]
fix typo

11 years agoclean up in unicode slicing utility function, fix 'self' reference in PyUnicode_READY...
Stefan Behnel [Wed, 20 Feb 2013 09:10:05 +0000 (10:10 +0100)]
clean up in unicode slicing utility function, fix 'self' reference in PyUnicode_READY() call

11 years agoMerge pull request #186 from intellimath/master
scoder [Wed, 20 Feb 2013 08:53:38 +0000 (00:53 -0800)]
Merge pull request #186 from intellimath/master

Add unicode slicing support

11 years agoAdd tests for negative indices in unicode_slicing and PyUnicode_READY in __Pyx_PyUnic...
zaur [Wed, 20 Feb 2013 09:33:37 +0000 (12:33 +0300)]
Add tests for negative indices in unicode_slicing and PyUnicode_READY in __Pyx_PyUnicode_Substring

11 years agoFix test unicode_slicing for compatibility between py2X/py3
zaur [Tue, 19 Feb 2013 13:37:44 +0000 (16:37 +0300)]
Fix test unicode_slicing for compatibility between py2X/py3

11 years agoMerge branch 'master' of https://github.com/intellimath/cython
zaur [Tue, 19 Feb 2013 10:16:12 +0000 (13:16 +0300)]
Merge branch 'master' of https://github.com/intellimath/cython

11 years agoAdd none check for unicode slicing, remove duplicate code, add test for non-ascii...
zaur [Tue, 19 Feb 2013 09:48:20 +0000 (12:48 +0300)]
Add none check for unicode slicing, remove duplicate code, add test for non-ascii unicode strings and None

11 years agoAdd unicode slicing support
zaur [Mon, 18 Feb 2013 19:04:26 +0000 (22:04 +0300)]
Add unicode slicing support

11 years agoAdd support for unicode slicing
zaur [Mon, 18 Feb 2013 18:46:13 +0000 (21:46 +0300)]
Add support for unicode slicing

11 years agoMerge branch 'master' of git://github.com/cython/cython
zaur [Tue, 19 Feb 2013 09:54:58 +0000 (12:54 +0300)]
Merge branch 'master' of git://github.com/cython/cython

11 years agoAdd none check for unicode slicing, remove duplicate code, add test for non-ascii...
zaur [Tue, 19 Feb 2013 09:48:20 +0000 (12:48 +0300)]
Add none check for unicode slicing, remove duplicate code, add test for non-ascii unicode strings and None

11 years agoMerge branch 'master' of https://github.com/intellimath/cython
zaur [Mon, 18 Feb 2013 19:09:56 +0000 (22:09 +0300)]
Merge branch 'master' of https://github.com/intellimath/cython

11 years agoAdd unicode slicing support
zaur [Mon, 18 Feb 2013 19:04:26 +0000 (22:04 +0300)]
Add unicode slicing support

11 years agoAdd support for unicode slicing
zaur [Mon, 18 Feb 2013 18:46:13 +0000 (21:46 +0300)]
Add support for unicode slicing

11 years agofix build
Stefan Behnel [Mon, 18 Feb 2013 09:02:34 +0000 (10:02 +0100)]
fix build

11 years agoadd tests for MethodDispatcherTransform
Stefan Behnel [Mon, 18 Feb 2013 08:40:04 +0000 (09:40 +0100)]
add tests for MethodDispatcherTransform

11 years agoenable MethodDispatcherTransform() to dispatch also on special method calls triggered...
Stefan Behnel [Sun, 17 Feb 2013 11:19:49 +0000 (12:19 +0100)]
enable MethodDispatcherTransform() to dispatch also on special method calls triggered by operators

11 years agomove __Pyx_GetName() into external utility file and make it use faster __Pyx_PyObject...
Stefan Behnel [Sat, 16 Feb 2013 21:30:40 +0000 (22:30 +0100)]
move __Pyx_GetName() into external utility file and make it use faster __Pyx_PyObject_GetAttrStr()

11 years agouse Py2/3 specific builtin checks in dict.setdefault() optimisation
Stefan Behnel [Sat, 16 Feb 2013 20:54:25 +0000 (21:54 +0100)]
use Py2/3 specific builtin checks in dict.setdefault() optimisation

11 years agofix test behaviour that varies depending on CPython version and py_debug setting
Stefan Behnel [Sat, 16 Feb 2013 20:53:29 +0000 (21:53 +0100)]
fix test behaviour that varies depending on CPython version and py_debug setting

11 years agofix accidental double wrap-around of negative indices in pop() optimisation
Stefan Behnel [Sat, 16 Feb 2013 19:58:52 +0000 (20:58 +0100)]
fix accidental double wrap-around of negative indices in pop() optimisation

11 years agosimplify pop() optimisation utility code
Stefan Behnel [Sat, 16 Feb 2013 19:46:12 +0000 (20:46 +0100)]
simplify pop() optimisation utility code

11 years agoreduce attribute lookup overhead a bit
Stefan Behnel [Sat, 16 Feb 2013 19:38:39 +0000 (20:38 +0100)]
reduce attribute lookup overhead a bit

11 years agofix test after changing internal method calling (test finally behaves as expected)
Stefan Behnel [Sat, 16 Feb 2013 18:24:00 +0000 (19:24 +0100)]
fix test after changing internal method calling (test finally behaves as expected)

11 years agoremove spurious semicolons from C macros
Stefan Behnel [Sat, 16 Feb 2013 18:18:37 +0000 (19:18 +0100)]
remove spurious semicolons from C macros

11 years agodisable dict.setdefault() test in Py2.4 which tests for a bug in that version
Stefan Behnel [Sat, 16 Feb 2013 17:46:34 +0000 (18:46 +0100)]
disable dict.setdefault() test in Py2.4 which tests for a bug in that version

11 years agostreamline fallback method calls in utility code
Stefan Behnel [Sat, 16 Feb 2013 17:45:07 +0000 (18:45 +0100)]
streamline fallback method calls in utility code

11 years agorewrite dict.setdefault() optimisation to fix double hashing in Py3
Stefan Behnel [Sat, 16 Feb 2013 17:09:54 +0000 (18:09 +0100)]
rewrite dict.setdefault() optimisation to fix double hashing in Py3

11 years agofix CPython compatibility problem on lookup failure in optimised PyDict_GetItem()
Stefan Behnel [Sat, 16 Feb 2013 16:18:32 +0000 (17:18 +0100)]
fix CPython compatibility problem on lookup failure in optimised PyDict_GetItem()

11 years agoit should be enough to restart tracking the object at the end of tp_dealloc() only...
Stefan Behnel [Sat, 16 Feb 2013 14:45:18 +0000 (15:45 +0100)]
it should be enough to restart tracking the object at the end of tp_dealloc() only if there really is a base type that might rely on it

--HG--
extra : rebase_source : 8a20a41f35f9b5d1aaa2a916b52403bd0cb145fc

11 years agoremove useless semicolons in Python code
Stefan Behnel [Fri, 15 Feb 2013 20:47:27 +0000 (21:47 +0100)]
remove useless semicolons in Python code

--HG--
extra : rebase_source : cf2a0d87f2f903179cc954ff092c79fef7b13a34

11 years agoDisable atomic refcounting on windows with GCC
Mark Florisson [Sat, 16 Feb 2013 00:21:36 +0000 (00:21 +0000)]
Disable atomic refcounting on windows with GCC

11 years agofix typo in gcc version test
Stefan Behnel [Fri, 15 Feb 2013 20:18:03 +0000 (21:18 +0100)]
fix typo in gcc version test

11 years agochangelog
Stefan Behnel [Fri, 15 Feb 2013 17:09:21 +0000 (18:09 +0100)]
changelog

11 years agolet type analysis know that globals() and locals() can never return None
Stefan Behnel [Fri, 15 Feb 2013 17:07:16 +0000 (18:07 +0100)]
let type analysis know that globals() and locals() can never return None

11 years agoavoid list building when in-testing against dir() result
Stefan Behnel [Fri, 15 Feb 2013 17:02:55 +0000 (18:02 +0100)]
avoid list building when in-testing against dir() result

11 years agomake SortedDictKeysNode look more like other pass-through nodes
Stefan Behnel [Fri, 15 Feb 2013 17:00:22 +0000 (18:00 +0100)]
make SortedDictKeysNode look more like other pass-through nodes

11 years agofix dir() implementation to always return a sorted list
Stefan Behnel [Fri, 15 Feb 2013 16:38:00 +0000 (17:38 +0100)]
fix dir() implementation to always return a sorted list

11 years agofix test after changing dict.keys() in Py3
Stefan Behnel [Fri, 15 Feb 2013 16:07:09 +0000 (17:07 +0100)]
fix test after changing dict.keys() in Py3

11 years agomake entries keep their utility code when inheriting them from cdef base classes
Stefan Behnel [Fri, 15 Feb 2013 15:57:52 +0000 (16:57 +0100)]
make entries keep their utility code when inheriting them from cdef base classes

11 years agochangelog
Stefan Behnel [Fri, 15 Feb 2013 13:49:55 +0000 (14:49 +0100)]
changelog

11 years agofix long-standing bug that dict.items() etc. returned lists also in Py3
Stefan Behnel [Fri, 15 Feb 2013 13:48:07 +0000 (14:48 +0100)]
fix long-standing bug that dict.items() etc. returned lists also in Py3

11 years agoextend test case
Stefan Behnel [Fri, 15 Feb 2013 13:03:57 +0000 (14:03 +0100)]
extend test case

11 years agominor formatting fixes
Stefan Behnel [Fri, 15 Feb 2013 12:06:21 +0000 (13:06 +0100)]
minor formatting fixes

11 years agoremove spurious Py_DECREF(None) from 'raise ... from None' code
Stefan Behnel [Fri, 15 Feb 2013 11:55:11 +0000 (12:55 +0100)]
remove spurious Py_DECREF(None) from 'raise ... from None' code

11 years agochangelog
Stefan Behnel [Fri, 15 Feb 2013 11:18:55 +0000 (12:18 +0100)]
changelog

11 years agoinline PyList_Append() a bit more
Stefan Behnel [Fri, 15 Feb 2013 11:17:10 +0000 (12:17 +0100)]
inline PyList_Append() a bit more

11 years agoreplace some more Python string constants in utility code
Stefan Behnel [Fri, 15 Feb 2013 08:48:39 +0000 (09:48 +0100)]
replace some more Python string constants in utility code

11 years agoreduce code overhead in some utility functions
Stefan Behnel [Fri, 15 Feb 2013 08:42:17 +0000 (09:42 +0100)]
reduce code overhead in some utility functions

11 years agoreport unused variables also across closures
Stefan Behnel [Thu, 14 Feb 2013 18:10:33 +0000 (19:10 +0100)]
report unused variables also across closures

11 years agoprevent unused '_' variables from appearing in C code
Stefan Behnel [Thu, 14 Feb 2013 17:47:28 +0000 (18:47 +0100)]
prevent unused '_' variables from appearing in C code

11 years agoUse wraparound and boundscheck directives for memory view slices.
Robert Bradshaw [Thu, 14 Feb 2013 06:24:43 +0000 (22:24 -0800)]
Use wraparound and boundscheck directives for memory view slices.

11 years agoRemove archaic disable_function_redefinition option.
Robert Bradshaw [Thu, 14 Feb 2013 05:32:32 +0000 (21:32 -0800)]
Remove archaic disable_function_redefinition option.

11 years agoSpeccial case the unused '_' in warnings.
Robert Bradshaw [Thu, 14 Feb 2013 05:08:19 +0000 (21:08 -0800)]
Speccial case the unused '_' in warnings.

11 years agoFix buffer pure mode regression.
Robert Bradshaw [Wed, 13 Feb 2013 07:40:04 +0000 (23:40 -0800)]
Fix buffer pure mode regression.

11 years agosupport None as compile time constant expression
Stefan Behnel [Wed, 13 Feb 2013 19:00:46 +0000 (20:00 +0100)]
support None as compile time constant expression

11 years agoextend compile time constants error test case
Stefan Behnel [Wed, 13 Feb 2013 18:57:52 +0000 (19:57 +0100)]
extend compile time constants error test case

11 years agofix Py3 test issue
Stefan Behnel [Wed, 13 Feb 2013 18:57:00 +0000 (19:57 +0100)]
fix Py3 test issue

11 years agoextend switch statement test to include compile time tuple
Stefan Behnel [Wed, 13 Feb 2013 18:16:47 +0000 (19:16 +0100)]
extend switch statement test to include compile time tuple