shadown / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Restore all builtin functions #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The builtins module, src/lib/__bi.py, had some of its functions commented-out 
in order to not consume to much memory.  

Release 10 will target devices with greater resources.  So for release 10, 
the comments can be removed.

Original issue reported on code.google.com by dwhall...@gmail.com on 16 Apr 2009 at 4:57

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 16 Apr 2009 at 5:06

GoogleCodeExporter commented 9 years ago
Switched abs() to use python code, not native.  It uses less flash and ram in 
AVR and 
ARM7 platforms.  Also, the following ternary-like code uses less memory than 
the 
if/else form.

def abs(n): 
    return (-n, n)[n >= 0]

Original comment by dwhall...@gmail.com on 9 May 2009 at 9:59

GoogleCodeExporter commented 9 years ago
Switched pos() to use python code, not native.  Uses less memory and already 
handles 
HAVE_FLOAT case (no need to add new native code to handle floats!)

def pow(x,y):
    return x ** y

Original comment by dwhall...@gmail.com on 9 May 2009 at 10:13

GoogleCodeExporter commented 9 years ago
Reinstated system tests t026, t094 and t149.  System tests pass.

Also enabled HAVE_FLOAT for desktop by default.

Mainlined directly, see r363

Original comment by dwhall...@gmail.com on 9 May 2009 at 10:21

GoogleCodeExporter commented 9 years ago
Changing Milestone-r10 to Milestone-r09

Original comment by dwhall...@gmail.com on 7 Mar 2010 at 6:26

GoogleCodeExporter commented 9 years ago
Changed r09 to R09

Original comment by dwhall...@gmail.com on 12 Mar 2010 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 13 Mar 2010 at 1:30