cython.git
15 years ago[Cython] PATCH: population of builtin types for 'isinstance' optimization
"Lisandro Dalcin" [Tue, 30 Sep 2008 18:14:06 +0000 (11:14 -0700)]
[Cython] PATCH: population of builtin types for 'isinstance' optimization

15 years agotype cleanup
Robert Bradshaw [Tue, 30 Sep 2008 07:26:31 +0000 (00:26 -0700)]
type cleanup

15 years agoExtract last of type list dependance from parser.
Robert Bradshaw [Tue, 30 Sep 2008 07:20:41 +0000 (00:20 -0700)]
Extract last of type list dependance from parser.

15 years agoRefactoring of type parsing
Robert Bradshaw [Tue, 30 Sep 2008 02:08:45 +0000 (19:08 -0700)]
Refactoring of type parsing

This paves the way for "cimport *" cimporting types, as well as other simplifications.

15 years agoImplement locals()
Robert Bradshaw [Sat, 27 Sep 2008 21:35:03 +0000 (14:35 -0700)]
Implement locals()

15 years agoImplement mod for floats.
Robert Bradshaw [Sat, 27 Sep 2008 20:52:44 +0000 (13:52 -0700)]
Implement mod for floats.

15 years agomerge
Dag Sverre Seljebotn [Thu, 25 Sep 2008 21:33:31 +0000 (23:33 +0200)]
merge

15 years agoImprovements to TempsBlockNode interface
Dag Sverre Seljebotn [Thu, 25 Sep 2008 21:33:10 +0000 (23:33 +0200)]
Improvements to TempsBlockNode interface

15 years agononecheck directive for buffer accesses
Dag Sverre Seljebotn [Thu, 25 Sep 2008 16:33:27 +0000 (18:33 +0200)]
nonecheck directive for buffer accesses

15 years agoRename TempsBlockNode.get_ref_node -> new_ref_node
Dag Sverre Seljebotn [Wed, 24 Sep 2008 22:03:14 +0000 (00:03 +0200)]
Rename TempsBlockNode.get_ref_node -> new_ref_node

15 years agoIntroduce TempsBlockNode utility, improve TreeFragment-generated temps
Dag Sverre Seljebotn [Wed, 24 Sep 2008 21:54:56 +0000 (23:54 +0200)]
Introduce TempsBlockNode utility, improve TreeFragment-generated temps

15 years agomerge
Robert Bradshaw [Tue, 23 Sep 2008 20:55:49 +0000 (13:55 -0700)]
merge

15 years agoRemove unneeded code now that result code is deferred.
Robert Bradshaw [Tue, 23 Sep 2008 20:54:16 +0000 (13:54 -0700)]
Remove unneeded code now that result code is deferred.

15 years agoUse method to get result code, deferred to code generation time.
Robert Bradshaw [Tue, 23 Sep 2008 20:48:06 +0000 (13:48 -0700)]
Use method to get result code, deferred to code generation time.

15 years agoBuffers: cast option (#76)
Dag Sverre Seljebotn [Tue, 23 Sep 2008 20:02:34 +0000 (22:02 +0200)]
Buffers: cast option (#76)

Yet more really low-hanging fruit...

15 years agoBuffers: negative_indices option
Dag Sverre Seljebotn [Tue, 23 Sep 2008 18:59:51 +0000 (20:59 +0200)]
Buffers: negative_indices option

15 years agoUpdate license file.
Robert Bradshaw [Tue, 23 Sep 2008 18:53:34 +0000 (11:53 -0700)]
Update license file.

15 years agoFix isinstance bug discovered by Lisandro Dalcin
Robert Bradshaw [Tue, 23 Sep 2008 17:38:51 +0000 (10:38 -0700)]
Fix isinstance bug discovered by Lisandro Dalcin

15 years agoisinstance uses PyObject_TypeCheck when second argument is a type
Robert Bradshaw [Tue, 23 Sep 2008 06:45:08 +0000 (23:45 -0700)]
isinstance uses PyObject_TypeCheck when second argument is a type

15 years agoVisitor dispatch optimization
Robert Bradshaw [Tue, 23 Sep 2008 05:08:56 +0000 (22:08 -0700)]
Visitor dispatch optimization

15 years agoMoving known bad testcaste to tests/broken
Dag Sverre Seljebotn [Mon, 22 Sep 2008 20:36:55 +0000 (22:36 +0200)]
Moving known bad testcaste to tests/broken

--HG--
rename : tests/errors/e_switch.pyx => tests/broken/e_switch.pyx

15 years agoMerge (++, see details)
Dag Sverre Seljebotn [Mon, 22 Sep 2008 20:26:49 +0000 (22:26 +0200)]
Merge (++, see details)

Also fixed a bug that the merge revealed.
Also added CythonTransform.current_directives.

15 years agoInitial implementation of nonecheck directive; some directive design changes
Dag Sverre Seljebotn [Mon, 22 Sep 2008 19:51:34 +0000 (21:51 +0200)]
Initial implementation of nonecheck directive; some directive design changes

--HG--
rename : tests/run/noneattributeacc.pyx => tests/run/nonecheck.pyx

15 years agoSignature embedding: Proper display of native types (#2).
LisandroDalcin [Sat, 20 Sep 2008 11:34:03 +0000 (13:34 +0200)]
Signature embedding: Proper display of native types (#2).

15 years agoCython optimizations regarding embedding signatures
Dag Sverre Seljebotn [Fri, 19 Sep 2008 14:38:34 +0000 (16:38 +0200)]
Cython optimizations regarding embedding signatures

15 years agoAutomatic embedding of signatures in docstring (#2)
LisandroDalcin [Fri, 19 Sep 2008 14:28:36 +0000 (16:28 +0200)]
embedding of signatures in docstring (#2)

15 years agoTest case for #48.
Dag Sverre Seljebotn [Thu, 18 Sep 2008 09:45:16 +0000 (11:45 +0200)]
Test case for #48.

15 years agoBetter error for casts (#48)
Dag Sverre Seljebotn [Thu, 18 Sep 2008 09:43:41 +0000 (11:43 +0200)]
Better error for casts (#48)

15 years agoBuffers: Added C and Fortran contiguous modes
Dag Sverre Seljebotn [Wed, 17 Sep 2008 09:56:30 +0000 (11:56 +0200)]
Buffers: Added C and Fortran contiguous modes

15 years agoBuilding tags with ctags [1] helps navigating source code. So I usually build tags...
KirillSmelkov [Sun, 14 Sep 2008 03:36:29 +0000 (20:36 -0700)]
Building tags with ctags [1] helps navigating source code. So I usually build tags, and would like it to be please included in .hgignore .

15 years agoUnsigned arithmatic, ticket #54
Robert Bradshaw [Sun, 14 Sep 2008 03:29:53 +0000 (20:29 -0700)]
Unsigned arithmatic, ticket #54

15 years agoFix cpdef cross-module dispatching bug, greatly simplify (also simplify optional...
Robert Bradshaw [Sat, 13 Sep 2008 22:10:38 +0000 (15:10 -0700)]
Fix cpdef cross-module dispatching bug, greatly simplify (also simplify optional args)

15 years agostupid merge
Robert Bradshaw [Sat, 13 Sep 2008 21:51:42 +0000 (14:51 -0700)]
stupid merge

15 years agoOption to emit #line directives, ticket #53
Robert Bradshaw [Sat, 13 Sep 2008 19:48:45 +0000 (12:48 -0700)]
Option to emit #line directives, ticket #53

15 years agomissing decref in __Pyx_ImportType()
Stefan Behnel [Wed, 10 Sep 2008 16:10:16 +0000 (18:10 +0200)]
missing decref in __Pyx_ImportType()

15 years agocleanup of __Pyx_ImportType() to allow constifying the imported class name string
Stefan Behnel [Wed, 10 Sep 2008 14:39:36 +0000 (16:39 +0200)]
cleanup of __Pyx_ImportType() to allow constifying the imported class name string

15 years agosignature constification to remove C++ compiler warnings (by Ondrej)
Stefan Behnel [Wed, 10 Sep 2008 14:25:06 +0000 (16:25 +0200)]
signature constification to remove C++ compiler warnings (by Ondrej)

15 years agoenable the switch transform also for long 'or' expressions in a single 'if' statement
Stefan Behnel [Sun, 7 Sep 2008 18:57:19 +0000 (20:57 +0200)]
enable the switch transform also for long 'or' expressions in a single 'if' statement

15 years agoconst parameter fix by Ondrej
Stefan Behnel [Sat, 6 Sep 2008 08:26:00 +0000 (10:26 +0200)]
const parameter fix by Ondrej

15 years agoenable source annotations in test runner by default
Stefan Behnel [Fri, 5 Sep 2008 10:08:45 +0000 (12:08 +0200)]
enable source annotations in test runner by default

15 years agofix for #59: compiler crash when special signatures where declared with cdef
Stefan Behnel [Fri, 5 Sep 2008 10:08:42 +0000 (12:08 +0200)]
fix for #59: compiler crash when special signatures where declared with cdef

15 years agounused test case for #5
Stefan Behnel [Fri, 5 Sep 2008 10:08:39 +0000 (12:08 +0200)]
unused test case for #5

15 years agoBuffers: Format string parsing change (ticket 66)
Dag Sverre Seljebotn [Thu, 4 Sep 2008 11:47:08 +0000 (13:47 +0200)]
Buffers: Format string parsing change (ticket 66)

15 years agoBuffers: Better Py2.6 support (ticket 62)
Dag Sverre Seljebotn [Thu, 4 Sep 2008 11:25:09 +0000 (13:25 +0200)]
Buffers: Better Py2.6 support (ticket 62)

15 years agomerge
Dag Sverre Seljebotn [Thu, 4 Sep 2008 11:04:22 +0000 (13:04 +0200)]
merge

15 years agofixed utility code integration for try-except
Stefan Behnel [Thu, 4 Sep 2008 07:02:19 +0000 (09:02 +0200)]
fixed utility code integration for try-except

15 years agoMerge from stable
Dag Sverre Seljebotn [Wed, 3 Sep 2008 18:51:18 +0000 (20:51 +0200)]
Merge from stable

15 years agoExplicitly disallow assigning default values to struct/union members
Dag Sverre Seljebotn [Wed, 3 Sep 2008 16:24:45 +0000 (18:24 +0200)]
Explicitly disallow assigning default values to struct/union members

Earlier, the compiler would crash in this situation.

15 years agoBuffers: Fix a segfault (would only occur under exceptional circumstances)
Dag Sverre Seljebotn [Wed, 3 Sep 2008 14:51:34 +0000 (16:51 +0200)]
Buffers: Fix a segfault (would only occur under exceptional circumstances)

15 years agofixed error detection on misplaced default except: clause
Stefan Behnel [Wed, 3 Sep 2008 11:24:52 +0000 (13:24 +0200)]
fixed error detection on misplaced default except: clause

15 years agorun error test cases only for one target language
Stefan Behnel [Wed, 3 Sep 2008 11:24:41 +0000 (13:24 +0200)]
run error test cases only for one target language

15 years agosafety fix
Stefan Behnel [Tue, 2 Sep 2008 09:17:48 +0000 (11:17 +0200)]
safety fix

15 years agonew exception handling semantics
Stefan Behnel [Tue, 2 Sep 2008 08:14:30 +0000 (10:14 +0200)]
new exception handling semantics
- the original exception status will be saved when entering a try: block
- sys.exc_info() will be reset after a successful except: block

This mimics the behaviour of Py3 and prevents exceptions, tracebacks
and frames (i.e. deep function state) from staying alive
any longer than necessary to handle an exception.

The new semantics imply that a try: block is no longer free, but it is still very cheap.

15 years agomissing DECREF in WriteUnraisable
Stefan Behnel [Mon, 1 Sep 2008 11:30:13 +0000 (13:30 +0200)]
missing DECREF in WriteUnraisable

15 years agowork-around for C/C++ compiler warnings
Stefan Behnel [Mon, 1 Sep 2008 10:08:00 +0000 (12:08 +0200)]
work-around for C/C++ compiler warnings

15 years agofixes for C++ test runs
Stefan Behnel [Mon, 1 Sep 2008 10:04:37 +0000 (12:04 +0200)]
fixes for C++ test runs

15 years agofix for C++ declaration problem
Stefan Behnel [Mon, 1 Sep 2008 07:24:10 +0000 (09:24 +0200)]
fix for C++ declaration problem

15 years agoallow keeping .cpp files in test runner
Stefan Behnel [Mon, 1 Sep 2008 07:08:27 +0000 (09:08 +0200)]
allow keeping .cpp files in test runner

15 years agoconst fix by Lisandro
Stefan Behnel [Mon, 1 Sep 2008 05:36:09 +0000 (07:36 +0200)]
const fix by Lisandro

15 years agoPy3 compile fix
Stefan Behnel [Sun, 31 Aug 2008 11:43:01 +0000 (13:43 +0200)]
Py3 compile fix

15 years agofaster exception handling/try-finally/etc. by inlining exc fetch/restore code
Stefan Behnel [Sun, 31 Aug 2008 11:08:38 +0000 (13:08 +0200)]
faster exception handling/try-finally/etc. by inlining exc fetch/restore code

15 years agocompile all tests as C and C++
Stefan Behnel [Sun, 31 Aug 2008 09:25:11 +0000 (11:25 +0200)]
compile all tests as C and C++

15 years agomerge from stable
Dag Sverre Seljebotn [Fri, 29 Aug 2008 21:05:25 +0000 (23:05 +0200)]
merge from stable

15 years agoFixed gcc warning with list comprehensions
Dag Sverre Seljebotn [Fri, 29 Aug 2008 20:44:11 +0000 (22:44 +0200)]
Fixed gcc warning with list comprehensions

Ticket 65

15 years agotest runner fix
Stefan Behnel [Wed, 27 Aug 2008 07:12:51 +0000 (09:12 +0200)]
test runner fix

15 years agosome more testing and tweaking of common cases, follow more descriptive Py3 error...
Stefan Behnel [Wed, 27 Aug 2008 07:04:41 +0000 (09:04 +0200)]
some more testing and tweaking of common cases, follow more descriptive Py3 error messages

15 years agomore cleanup
Stefan Behnel [Tue, 26 Aug 2008 15:31:32 +0000 (17:31 +0200)]
more cleanup

15 years agocleanup of arg parsing code, faster string comparison in __Pyx_SplitKeywords(), some...
Stefan Behnel [Tue, 26 Aug 2008 11:54:57 +0000 (13:54 +0200)]
cleanup of arg parsing code, faster string comparison in __Pyx_SplitKeywords(), some minor exception fixes

15 years agocleanup, avoid allocating a Python string for the self argument
Stefan Behnel [Tue, 26 Aug 2008 08:17:30 +0000 (10:17 +0200)]
cleanup, avoid allocating a Python string for the self argument

15 years agolong long indexing failed when sizeof(long long) < sizeof(Py_ssize_t)
Robert Bradshaw [Tue, 26 Aug 2008 07:06:52 +0000 (00:06 -0700)]
long long indexing failed when sizeof(long long) < sizeof(Py_ssize_t)

15 years agomerge
Stefan Behnel [Mon, 25 Aug 2008 15:54:26 +0000 (17:54 +0200)]
merge

15 years agorefactoring: split huge code generation method into several smaller methods
Stefan Behnel [Mon, 25 Aug 2008 15:47:55 +0000 (17:47 +0200)]
refactoring: split huge code generation method into several smaller methods

15 years agoMore cleanup
Dag Sverre Seljebotn [Mon, 25 Aug 2008 14:15:49 +0000 (16:15 +0200)]
More cleanup

15 years agoCleanup
Dag Sverre Seljebotn [Mon, 25 Aug 2008 14:14:23 +0000 (16:14 +0200)]
Cleanup

15 years agoUpdated buffers to beta 3 of Py3
Dag Sverre Seljebotn [Mon, 25 Aug 2008 14:09:31 +0000 (16:09 +0200)]
Updated buffers to beta 3 of Py3

15 years agosome code cleanup and beautification, fix error message to match Python when passing...
Stefan Behnel [Mon, 25 Aug 2008 13:37:37 +0000 (15:37 +0200)]
some code cleanup and beautification, fix error message to match Python when passing too many positional arguments into a function with required keyword arguments

15 years agofix: passing all positional arguments as kw-args was broken
Stefan Behnel [Mon, 25 Aug 2008 07:34:01 +0000 (09:34 +0200)]
fix: passing all positional arguments as kw-args was broken

15 years agomore readable label name
Stefan Behnel [Mon, 25 Aug 2008 07:21:43 +0000 (09:21 +0200)]
more readable label name

15 years agocleanup: one place to generate arg-tuple related errors (generates more readable...
Stefan Behnel [Mon, 25 Aug 2008 06:59:00 +0000 (08:59 +0200)]
cleanup: one place to generate arg-tuple related errors (generates more readable code)

15 years agoinlined *args splitting code
Stefan Behnel [Mon, 25 Aug 2008 06:16:32 +0000 (08:16 +0200)]
inlined *args splitting code
removed some redundancy from arg parsing helper functions (and some of the helper functions)
general cleanup and performance improvements (now a lot faster for common kw passing casese)

15 years agoextended test case
Stefan Behnel [Mon, 25 Aug 2008 06:14:22 +0000 (08:14 +0200)]
extended test case

15 years agocomments
Stefan Behnel [Sat, 23 Aug 2008 19:27:27 +0000 (21:27 +0200)]
comments

15 years agocleanup
Stefan Behnel [Sat, 23 Aug 2008 15:39:06 +0000 (17:39 +0200)]
cleanup

15 years agorewrite of the argument unpacking code, now using fast C switch statements
Stefan Behnel [Sat, 23 Aug 2008 15:32:50 +0000 (17:32 +0200)]
rewrite of the argument unpacking code, now using fast C switch statements

15 years agocleanup
Stefan Behnel [Sat, 23 Aug 2008 12:15:05 +0000 (14:15 +0200)]
cleanup

15 years agooptimisation: store keyword argument names as Python strings to avoid string creation...
Stefan Behnel [Sat, 23 Aug 2008 10:12:29 +0000 (12:12 +0200)]
optimisation: store keyword argument names as Python strings to avoid string creation within PyDict_GetItemString()

15 years agoPy3k C-API usage fix
Stefan Behnel [Fri, 22 Aug 2008 21:21:27 +0000 (23:21 +0200)]
Py3k C-API usage fix

15 years agoPy3k test fix
Stefan Behnel [Fri, 22 Aug 2008 21:20:57 +0000 (23:20 +0200)]
Py3k test fix

15 years agosupport excluding tests via command line
Stefan Behnel [Fri, 22 Aug 2008 21:18:52 +0000 (23:18 +0200)]
support excluding tests via command line

15 years agomore test fixes
Stefan Behnel [Fri, 22 Aug 2008 19:09:02 +0000 (21:09 +0200)]
more test fixes

15 years agoremove compiler warning about unused helper function
Stefan Behnel [Fri, 22 Aug 2008 18:20:29 +0000 (20:20 +0200)]
remove compiler warning about unused helper function

15 years agomerge
Stefan Behnel [Fri, 22 Aug 2008 18:15:47 +0000 (20:15 +0200)]
merge

15 years agomore accurate exception messages when passing a wrong argument count (adapted to...
Stefan Behnel [Fri, 22 Aug 2008 18:15:16 +0000 (20:15 +0200)]
more accurate exception messages when passing a wrong argument count (adapted to Py3)

15 years agomore cleanup
Stefan Behnel [Fri, 22 Aug 2008 13:21:09 +0000 (15:21 +0200)]
more cleanup

15 years agofixed error handling for required keyword arguments
Stefan Behnel [Fri, 22 Aug 2008 13:13:16 +0000 (15:13 +0200)]
fixed error handling for required keyword arguments
cosolidate exception messages
cleanup of utility code

15 years agofixed handling of keyword-only arguments
Stefan Behnel [Fri, 22 Aug 2008 10:28:15 +0000 (12:28 +0200)]
fixed handling of keyword-only arguments
changed more exception messages to what Py3 raises
some cleanup

15 years agoalmost complete in-place implementation of Python's ParseTupleAndKeywords()
Stefan Behnel [Fri, 22 Aug 2008 07:12:17 +0000 (09:12 +0200)]
almost complete in-place implementation of Python's ParseTupleAndKeywords()
use argument exception messages from Python 2.6
TODO: handling of keyword-only arguments seems to require more work
TODO: clean up helper functions (currently somewhat redundant)

15 years agochanged Python C-API usage test case to test includes from Cython/Includes/, currentl...
Stefan Behnel [Fri, 22 Aug 2008 07:08:07 +0000 (09:08 +0200)]
changed Python C-API usage test case to test includes from Cython/Includes/, currently fails: are cimports in .pxd files not re-exported?

15 years agoadded .pxd for PyUnicode C-API to Cython/Includes/
Stefan Behnel [Fri, 22 Aug 2008 07:05:07 +0000 (09:05 +0200)]
added .pxd for PyUnicode C-API to Cython/Includes/

15 years agoallow keyword arguments after *args in a function call (as Py3 does)
Stefan Behnel [Fri, 22 Aug 2008 05:02:27 +0000 (07:02 +0200)]
allow keyword arguments after *args in a function call (as Py3 does)
some EncodedString name fixes for function names