shedskin:mainline.git
4 years agocheck bounds after wrapping.. (joerg stippa) master
Joerg Stippa [Sat, 6 Sep 2014 19:14:38 +0000 (21:14 +0200)]
check bounds after wrapping.. (joerg stippa)

5 years agoAdded a math.fsum implementation based on CPython's
Ernesto Ferro [Mon, 9 Sep 2013 01:29:37 +0000 (20:29 -0500)]
Added a math.fsum implementation based on CPython's

5 years agoResolving the issue 195 (https://code.google.com/p/shedskin/issues/detail?id=195)
Ernesto Ferro [Mon, 2 Sep 2013 19:13:48 +0000 (14:13 -0500)]
Resolving the issue 195 (https://code.google.com/p/shedskin/issues/detail?id=195)

Adding the following missing functions to the math module: isinf, isnan, acosh, asinh, atanh, copysign, erf, erfc, expm1, frexp, fsum, gamma, lgamma, log1p, trunc.
A new test (205) based on the pypy has been added.

5 years agowebserver example: public domain statement
Mark Dufour [Mon, 2 Sep 2013 18:26:21 +0000 (20:26 +0200)]
webserver example: public domain statement

5 years agonew example, a simple web server (Salvatore Ferro)
Mark Dufour [Sun, 1 Sep 2013 18:55:12 +0000 (20:55 +0200)]
new example, a simple web server (Salvatore Ferro)

5 years agofix for binary data in socket module (Salvatore Ferro)
Mark Dufour [Mon, 26 Aug 2013 10:36:54 +0000 (12:36 +0200)]
fix for binary data in socket module (Salvatore Ferro)

5 years agowin32 fix for 'select' module (Salvatore Ferro)
Mark Dufour [Fri, 23 Aug 2013 20:10:14 +0000 (22:10 +0200)]
win32 fix for 'select' module (Salvatore Ferro)

5 years agoquick hack to improve multiple inheritance support for single test case
Mark Dufour [Thu, 22 Aug 2013 20:47:05 +0000 (22:47 +0200)]
quick hack to improve multiple inheritance support for single test case

5 years agooutput 'pyobj *' for 'dynamic' types, so with 'if isinstance' we can still do something
Mark Dufour [Sun, 18 Aug 2013 19:50:18 +0000 (21:50 +0200)]
output 'pyobj *' for 'dynamic' types, so with 'if isinstance' we can still do something

5 years agomake that a separate test, 204.py
Mark Dufour [Sat, 17 Aug 2013 20:45:34 +0000 (22:45 +0200)]
make that a separate test, 204.py

5 years agoexperimental support for 'if isinstance()' guiding type inference
Mark Dufour [Sat, 17 Aug 2013 20:38:11 +0000 (22:38 +0200)]
experimental support for 'if isinstance()' guiding type inference

5 years agoFixed the issue 191 (http://code.google.com/p/shedskin/issues/detail?id=191) by addin...
Ernesto Ferro [Mon, 1 Jul 2013 19:16:09 +0000 (14:16 -0500)]
Fixed the issue 191 (code.google.com/p/shedskin/issues/detail?id=191) by adding the missing default_* variables in the C++ code of the "os" module.
Added the reproduction steps for the issue 191 as a test (203)

5 years agotraditionally forgot doc/shedskin.rst as well 0.9.4
Mark Dufour [Sun, 16 Jun 2013 08:03:23 +0000 (10:03 +0200)]
traditionally forgot doc/shedskin.rst as well

5 years agoI always forget to update setup.py
Mark Dufour [Sun, 16 Jun 2013 07:54:16 +0000 (09:54 +0200)]
I always forget to update setup.py

5 years agoavoid 2.6-only code for now
Mark Dufour [Sun, 16 Jun 2013 07:49:55 +0000 (09:49 +0200)]
avoid 2.6-only code for now

5 years agoThe libs folder relative to Shedskin has higher priority than the one installed in...
Ernesto Ferro [Sun, 16 Jun 2013 05:57:23 +0000 (00:57 -0500)]
The libs folder relative to Shedskin has higher priority than the one installed in the system. If none of those are found, an error message is shown.

5 years agohm, thought I already tested this under windows.. use os.sep instead of '/'
Mark Dufour [Thu, 13 Jun 2013 19:45:22 +0000 (21:45 +0200)]
hm, thought I already tested this under windows.. use os.sep instead of '/'

5 years agoimprove lookup_var to fix error test 41
Mark Dufour [Thu, 13 Jun 2013 19:25:30 +0000 (21:25 +0200)]
improve lookup_var to fix error test 41

5 years agoextmods: do not try to convert class pointers
Mark Dufour [Thu, 13 Jun 2013 17:33:25 +0000 (19:33 +0200)]
extmods: do not try to convert class pointers

5 years agotest most of the remaining warnings; test 41 seems to fail incorrectly
Mark Dufour [Thu, 13 Jun 2013 14:22:11 +0000 (16:22 +0200)]
test most of the remaining warnings; test 41 seems to fail incorrectly

5 years agotest several more graph.py errors; remove double warning
Mark Dufour [Thu, 13 Jun 2013 14:00:02 +0000 (16:00 +0200)]
test several more graph.py errors; remove double warning

5 years agoimageproc example: improvements from paul haeberli
Mark Dufour [Thu, 13 Jun 2013 11:21:27 +0000 (13:21 +0200)]
imageproc example: improvements from paul haeberli

5 years agomove last problem to next release
Mark Dufour [Wed, 12 Jun 2013 19:59:29 +0000 (21:59 +0200)]
move last problem to next release

5 years agonew test case: method name clashes with global variable name
Mark Dufour [Wed, 12 Jun 2013 18:51:28 +0000 (20:51 +0200)]
new test case: method name clashes with global variable name

5 years agoadd warning for improperly used staticmethod, instead of crashing, plus test
Mark Dufour [Wed, 12 Jun 2013 18:38:02 +0000 (20:38 +0200)]
add warning for improperly used staticmethod, instead of crashing, plus test

5 years agoupdate .gitignore
Mark Dufour [Wed, 12 Jun 2013 18:37:01 +0000 (20:37 +0200)]
update .gitignore

5 years agominilight example: rename
Mark Dufour [Wed, 12 Jun 2013 18:36:47 +0000 (20:36 +0200)]
minilight example: rename

5 years agowe only need one warning for 'isinstance'
Mark Dufour [Mon, 10 Jun 2013 17:51:19 +0000 (19:51 +0200)]
we only need one warning for 'isinstance'

5 years agoadd tests for warnings in cpp.py (warning=True)
Mark Dufour [Mon, 10 Jun 2013 17:46:47 +0000 (19:46 +0200)]
add tests for warnings in cpp.py (warning=True)

5 years agoadd tests for several important errors
Mark Dufour [Mon, 10 Jun 2013 17:11:57 +0000 (19:11 +0200)]
add tests for several important errors

5 years agoThe function error in the module named error has a new argument (gx) which wasn't...
Ernesto Ferro [Sun, 9 Jun 2013 04:42:04 +0000 (23:42 -0500)]
The function error in the module named error has a new argument (gx) which wasn't been sent. This commit fixes that.

5 years agoafter all the recent changes, I decided to manually check each example to see if...
Mark Dufour [Thu, 6 Jun 2013 18:56:41 +0000 (20:56 +0200)]
after all the recent changes, I decided to manually check each example to see if the output still looks okay. here's a description of the type of output of each example, which may be useful later if we decide to automatically compare outputs (I didn't really find any problems, so perhaps that would be overkill)

5 years agoREADME: fix minilight instructions
Mark Dufour [Thu, 6 Jun 2013 18:19:23 +0000 (20:19 +0200)]
README: fix minilight instructions

5 years agoexamples: improve instructions for neural1.py
Mark Dufour [Thu, 6 Jun 2013 17:57:41 +0000 (19:57 +0200)]
examples: improve instructions for neural1.py

5 years agoexamples: fix mastermind_main.py instructions
Mark Dufour [Thu, 6 Jun 2013 17:48:51 +0000 (19:48 +0200)]
examples: fix mastermind_main.py instructions

5 years agoREADME: update instructions for go.py
Mark Dufour [Thu, 6 Jun 2013 17:00:21 +0000 (19:00 +0200)]
README: update instructions for go.py

5 years agograph.py: merge globals-checking code, use it in more places (fixes added problem)
Mark Dufour [Thu, 6 Jun 2013 12:50:37 +0000 (14:50 +0200)]
graph.py: merge globals-checking code, use it in more places (fixes added problem)

5 years agoWhen sending integer (int or long in Python) from Python to C, the value will be...
Ernesto Ferro [Wed, 5 Jun 2013 04:16:41 +0000 (23:16 -0500)]
When sending integer (int or long in Python) from Python to C, the value will be converted to its type in C (long or long long) as long as there is no overflow. If there is overflow, an exception is raised.

5 years agotests: add test for problem reported by alex susu
Mark Dufour [Tue, 4 Jun 2013 19:52:11 +0000 (21:52 +0200)]
tests: add test for problem reported by alex susu

5 years agoMinor change to the Gh0stenstein example to make it follow PEP8
Ernesto Ferro [Sat, 1 Jun 2013 17:35:07 +0000 (12:35 -0500)]
Minor change to the Gh0stenstein example to make it follow PEP8

5 years agoMoved the functions used in struct_.py to the modules where they are used.
Mark Dufour [Sun, 2 Jun 2013 20:28:21 +0000 (22:28 +0200)]
Moved the functions used in struct_.py to the modules where they are used.

5 years agobump version number to 0.9.4
Mark Dufour [Sun, 2 Jun 2013 19:50:49 +0000 (21:50 +0200)]
bump version number to 0.9.4

5 years agoupdate README
Mark Dufour [Sun, 2 Jun 2013 19:47:52 +0000 (21:47 +0200)]
update README

5 years agonew example: C image processing (Paul Haeberli)
Mark Dufour [Sun, 2 Jun 2013 19:46:04 +0000 (21:46 +0200)]
new example: C image processing (Paul Haeberli)

5 years agoupdate example count as well.. sigh
Mark Dufour [Sun, 2 Jun 2013 19:20:55 +0000 (21:20 +0200)]
update example count as well.. sigh

5 years agonew example: 3D Convex hull
Mark Dufour [Sun, 2 Jun 2013 19:17:04 +0000 (21:17 +0200)]
new example: 3D Convex hull

also update README..

5 years agocomment in top gs_main.py
Mark Dufour [Sat, 1 Jun 2013 11:37:32 +0000 (13:37 +0200)]
comment in top gs_main.py

5 years agoplus fix
Mark Dufour [Sat, 1 Jun 2013 11:29:21 +0000 (13:29 +0200)]
plus fix

5 years agonew wolfenstein-like example: Gh0stenstein! (thanks to Ernesto Ferro)
Mark Dufour [Sat, 1 Jun 2013 11:28:13 +0000 (13:28 +0200)]
new wolfenstein-like example: Gh0stenstein! (thanks to Ernesto Ferro)

5 years agoforgot to remove graph import from cpp
Mark Dufour [Wed, 29 May 2013 21:01:18 +0000 (23:01 +0200)]
forgot to remove graph import from cpp

5 years agoremove final usage of getmv outside of graph module; so setmv in cpp.py can be remove...
Mark Dufour [Wed, 29 May 2013 20:48:11 +0000 (22:48 +0200)]
remove final usage of getmv outside of graph module; so setmv in cpp.py can be removed as well

5 years agofinally, we can remove getmv from typestr.py
Mark Dufour [Wed, 29 May 2013 19:44:03 +0000 (21:44 +0200)]
finally, we can remove getmv from typestr.py

5 years agoextmod.py: work towards removing getmv() from nodetypestr
Mark Dufour [Wed, 29 May 2013 19:24:33 +0000 (21:24 +0200)]
extmod.py: work towards removing getmv() from nodetypestr

5 years agoremove getmv usage from infer.default_var
Mark Dufour [Wed, 29 May 2013 19:14:32 +0000 (21:14 +0200)]
remove getmv usage from infer.default_var

5 years agoremove crazy setmv calls from infer.py
Mark Dufour [Tue, 28 May 2013 20:03:02 +0000 (22:03 +0200)]
remove crazy setmv calls from infer.py

5 years agoRemoved the global variable gx (GlobalInfo)
Ernesto Ferro [Sat, 25 May 2013 23:45:46 +0000 (18:45 -0500)]
Removed the global variable gx (GlobalInfo)

5 years agoPart of the logic in copy_ was only used in cpp.py and the rest was only used in...
Ernesto Ferro [Sat, 25 May 2013 20:02:19 +0000 (15:02 -0500)]
Part of the logic in copy_ was only used in cpp.py and the rest was only used in infer.py. I moved those functions to the files in which they are used

5 years agoadd sudo to the shedkin install line in README
elmasry [Fri, 24 May 2013 22:16:34 +0000 (00:16 +0200)]
add sudo to the shedkin install line in README

5 years agoremove graph import from extmod.py
Mark Dufour [Mon, 20 May 2013 20:23:15 +0000 (22:23 +0200)]
remove graph import from extmod.py

5 years agofinally, we can remove the graph import from python.py
Mark Dufour [Mon, 20 May 2013 20:16:11 +0000 (22:16 +0200)]
finally, we can remove the graph import from python.py

5 years agopython.py: avoid getmv in def_class
Mark Dufour [Mon, 20 May 2013 19:44:40 +0000 (21:44 +0200)]
python.py: avoid getmv in def_class

5 years agoannotate.py: improve things further so setmv is not necessary
Mark Dufour [Mon, 20 May 2013 19:16:40 +0000 (21:16 +0200)]
annotate.py: improve things further so setmv is not necessary

5 years agocpp.py, annotate.py: avoid about 100 usages of getmv()
Mark Dufour [Mon, 20 May 2013 18:45:11 +0000 (20:45 +0200)]
cpp.py, annotate.py: avoid about 100 usages of getmv()

5 years agostruct_.py: avoid graph import, by locally passing mv
Mark Dufour [Mon, 20 May 2013 17:10:31 +0000 (19:10 +0200)]
struct_.py: avoid graph import, by locally passing mv

5 years agopython.py: lessen dependency on graph.py import
Mark Dufour [Sat, 18 May 2013 14:42:11 +0000 (16:42 +0200)]
python.py: lessen dependency on graph.py import

5 years agoCPPnamer: merge some things
Mark Dufour [Sat, 18 May 2013 13:36:54 +0000 (15:36 +0200)]
CPPnamer: merge some things

5 years agoand one more
Mark Dufour [Sat, 18 May 2013 12:39:06 +0000 (14:39 +0200)]
and one more

5 years agofix next case
Mark Dufour [Sat, 18 May 2013 11:37:18 +0000 (13:37 +0200)]
fix next case

5 years agoavoid some use of CPPNamer.name_str
Mark Dufour [Sat, 18 May 2013 11:13:03 +0000 (13:13 +0200)]
avoid some use of CPPNamer.name_str

5 years agopython.py: merge lookup_var with def_var. separate out var creation.
Mark Dufour [Fri, 17 May 2013 20:03:15 +0000 (22:03 +0200)]
python.py: merge lookup_var with def_var. separate out var creation.

5 years agofinally, we can remove the infer import from python.py
Mark Dufour [Fri, 17 May 2013 19:16:19 +0000 (21:16 +0200)]
finally, we can remove the infer import from python.py

5 years agopython.py: split def_var into a lookup and 'infer' part. move the latter out of pytho...
Mark Dufour [Fri, 17 May 2013 18:56:23 +0000 (20:56 +0200)]
python.py: split def_var into a lookup and 'infer' part. move the latter out of python.py.

5 years agoCPPNamer: improve 'init'/'add' check, simplify name_str
Mark Dufour [Thu, 16 May 2013 19:41:27 +0000 (21:41 +0200)]
CPPNamer: improve 'init'/'add' check, simplify name_str

5 years agoadd test for 'init'/'add'+main_module.ident named variables in extmods
Mark Dufour [Thu, 16 May 2013 19:11:37 +0000 (21:11 +0200)]
add test for 'init'/'add'+main_module.ident named variables in extmods

5 years agoMoved all the cpp naming logic to its own class
Ernesto Ferro [Wed, 15 May 2013 23:19:00 +0000 (18:19 -0500)]
Moved all the cpp naming logic to its own class

5 years agoannotate.py: some minor cleanups
Mark Dufour [Wed, 15 May 2013 15:14:43 +0000 (17:14 +0200)]
annotate.py: some minor cleanups

5 years agofinally, rename 'hmcpa' to something sensible. also simplify it and move some stuff...
Mark Dufour [Tue, 14 May 2013 21:29:38 +0000 (23:29 +0200)]
finally, rename 'hmcpa' to something sensible. also simplify it and move some stuff around
 Please enter the commit message for your changes. Lines starting

5 years agoclass Bitpair in cpp.py looks crufty, remove it
Mark Dufour [Tue, 14 May 2013 19:15:49 +0000 (21:15 +0200)]
class Bitpair in cpp.py looks crufty, remove it

5 years agomove find_module and some smaller funcs to python.py
Mark Dufour [Tue, 14 May 2013 18:53:44 +0000 (20:53 +0200)]
move find_module and some smaller funcs to python.py

5 years agomove function that has nothing to do with python to cpp.py, so we can remove the...
Mark Dufour [Sun, 12 May 2013 19:02:12 +0000 (21:02 +0200)]
move function that has nothing to do with python to cpp.py, so we can remove the ugly typestr import

5 years agoStaticClass: remove some unused attributes
Mark Dufour [Sun, 12 May 2013 18:40:15 +0000 (20:40 +0200)]
StaticClass: remove some unused attributes

5 years agopython.py: finally, rename class_ to Class
Mark Dufour [Sun, 12 May 2013 11:51:11 +0000 (13:51 +0200)]
python.py: finally, rename class_ to Class

5 years agoimport Class as ClassNode also in cpp.py
Mark Dufour [Sun, 12 May 2013 11:29:51 +0000 (13:29 +0200)]
import Class as ClassNode also in cpp.py

5 years agograph.py: import Class as ClassNode, in preparation of renaming class_ to Class
Mark Dufour [Sun, 12 May 2013 09:38:41 +0000 (11:38 +0200)]
graph.py: import Class as ClassNode, in preparation of renaming class_ to Class

5 years agoMassive reorganization of the functions and class in shared.py different modules.
Ernesto Ferro [Sat, 11 May 2013 07:29:44 +0000 (02:29 -0500)]
Massive reorganization of the functions and class in shared.py different modules.

This is rather big commit because it wasn't possible to break it down into smaller pieces due to their interrelations (circular dependencies)

Also, the order of the functions and classes within some modules has changed in order to group similar functions/classes.

This are the modules where the functions/classes have been moved:
    python.py:
        Variable
        Function
        Module
        Class
        StaticClass
        default_var
        def_var
        register_temp_var
        def_class
        lookup_var
        lookup_variable
        lookup_module
        lookup_class
        lookup_func
        lookup_class_module
        lookup_implementor
        subclass
        is_method
        is_enum
        is_zip2
        is_fastfor
        is_literal
        is_property_setter
        assign_rec
        aug_msg

    infer.py:
        CNode
        add_to_worklist
        in_out
        add_constraint
        inode
        merged
        analyze_callfunc
        callfunc_targets
        connect_actual_formal
        analyze_args
        parent_func
        is_anon_callable
        get_types
        hmcpa
        nrargs

    types.py:
        lowest_common_parents
        polymorphic_cl
        polymorphic_t
        singletype
        singletype2
        unboxable
        types_classes
        types_var_types

    cpp.py:
        nokeywords
        namespaceclass

5 years agoMoved the following functions/classes from shared.py to graph.ph FakeGetattr FakeGeta...
Ernesto Ferro [Fri, 10 May 2013 23:48:34 +0000 (18:48 -0500)]
Moved the following functions/classes from shared.py to graph.ph FakeGetattr FakeGetattr2 FakeGetattr3 getmv setmv

5 years agoMoved the following functions/classes from shared.py to error.py error format_error...
Ernesto Ferro [Fri, 10 May 2013 23:38:49 +0000 (18:38 -0500)]
Moved the following functions/classes from shared.py to error.py error format_error print_errors

5 years agoprevious patch forgot to add config.py
Mark Dufour [Sun, 12 May 2013 07:49:11 +0000 (09:49 +0200)]
previous patch forgot to add config.py

5 years agoMoved the following functions/classes from shared.py to config.py GlobalInfo newgx...
Ernesto Ferro [Fri, 10 May 2013 23:07:06 +0000 (18:07 -0500)]
Moved the following functions/classes from shared.py to config.py GlobalInfo newgx getgx setgx

5 years agoRenamed the following functions: from fastfor to is_fastfor from const_literal to...
Ernesto Ferro [Fri, 10 May 2013 22:56:10 +0000 (17:56 -0500)]
Renamed the following functions: from fastfor to is_fastfor from const_literal to is_literal from property_setter to is_property_setter

5 years agoshared.py: is_listcomp unused
Ernesto Ferro [Fri, 10 May 2013 07:51:26 +0000 (09:51 +0200)]
shared.py: is_listcomp unused

5 years agofix corner case, removing the last element of a list while changing the list (reporte...
Mark Dufour [Sun, 5 May 2013 15:30:58 +0000 (17:30 +0200)]
fix corner case, removing the last element of a list while changing the list (reported by akatopaz)

5 years agodon't warn about incorrect argument count for builtins for now, as this is a bit...
Mark Dufour [Sat, 4 May 2013 17:53:59 +0000 (19:53 +0200)]
don't warn about incorrect argument count for builtins for now, as this is a bit trickier

5 years agofix problem with default args and inheritance (reported by paul haeberli)
Mark Dufour [Sat, 4 May 2013 17:42:11 +0000 (19:42 +0200)]
fix problem with default args and inheritance (reported by paul haeberli)

5 years agodon't warn about None being mix with functions
Mark Dufour [Mon, 29 Apr 2013 15:26:48 +0000 (17:26 +0200)]
don't warn about None being mix with functions

5 years agonot sure why this check disappeared; add test this time
Mark Dufour [Mon, 29 Apr 2013 13:55:54 +0000 (15:55 +0200)]
not sure why this check disappeared; add test this time

5 years agoinclude function references in dynamic typing warnings
Mark Dufour [Mon, 29 Apr 2013 12:53:18 +0000 (14:53 +0200)]
include function references in dynamic typing warnings

5 years agofix warning/error tests (python run.py -x)
Mark Dufour [Mon, 29 Apr 2013 11:31:31 +0000 (13:31 +0200)]
fix warning/error tests (python run.py -x)

5 years agotype inference: improve wholesale splitting by merging creating sites on the same...
Mark Dufour [Sun, 28 Apr 2013 20:52:25 +0000 (22:52 +0200)]
type inference: improve wholesale splitting by merging creating sites on the same path

5 years agotests: type inference bug uncovered by C64 SVN
Mark Dufour [Sun, 28 Apr 2013 17:27:22 +0000 (19:27 +0200)]
tests: type inference bug uncovered by C64 SVN