chriscz / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

SS can't compile resursion algorithm #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Simple test case in attach.

make run                                                [22:58]
g++  -O3 -pipe -fomit-frame-pointer  -I. -I./lib ./lib/builtin.cpp sort.cpp
-lgc  -o sort
sort.cpp: In function ‘__shedskin__::list<void*>*
__sort__::quicksort(__shedskin__::list<int>*)’:
sort.cpp:64: error: no matching function for call to
‘__shedskin__::list<void*>::__add__(__shedskin__::list<int>*)’
./lib/builtin.hpp:1478: note: candidates are: __shedskin__::list<T>*
__shedskin__::list<T>::__add__(__shedskin__::list<T>*) [with T = void*]
make: *** [sort] Ошибка 1

Original issue reported on code.google.com by pavel.vi...@gtempaccount.com on 17 Feb 2008 at 6:57

Attachments:

GoogleCodeExporter commented 9 years ago
http://www.uselesspython.com/download.php?script_id=267

Original comment by pavel.vi...@gtempaccount.com on 17 Feb 2008 at 6:57

GoogleCodeExporter commented 9 years ago
hi pavel,

thanks! this is a nasty one to fix, even if it may look like a simple problem. 
it
will probably have to wait until I work on type inference again. well, I know 
how to
fix it, but not without breaking some other things..

Original comment by mark.duf...@gmail.com on 17 Feb 2008 at 9:57

GoogleCodeExporter commented 9 years ago

Original comment by mark.duf...@gmail.com on 18 Feb 2008 at 2:09

GoogleCodeExporter commented 9 years ago
same problem here:

http://hbfs.wordpress.com/2009/11/10/is-python-slow/#comment-553

note that this is an easy workaround in this case, just help the TI a bit:

if False:
    solve(1, 1, [1], [1], [1])

Original comment by mark.duf...@gmail.com on 12 Nov 2009 at 7:47

GoogleCodeExporter commented 9 years ago
yay, apparently the problem was easy to fix after the TI modifications for 0.2. 
both
examples now work with shedskin SVN. thanks pavel and james for sending me 
these! I
added the quicksort example to the test set in unit.py.

Original comment by mark.duf...@gmail.com on 14 Nov 2009 at 11:48