kucukkose / python-on-a-chip Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/python-on-a-chip
License: Other
Automatically exported from code.google.com/p/python-on-a-chip
License: Other
Currently, ipm can't handle exceptions and requires the user to quit/reset.
After exceptions are implemented, ipm should be changed to catch exceptions,
print any traceback, but continue.
Depends on issue #6
Original issue reported on code.google.com by [email protected]
on 19 Apr 2009 at 2:57
Now that generators are available, a generator-based xrange() function would
be helpful to have.
Original issue reported on code.google.com by [email protected]
on 17 May 2009 at 9:45
What steps will reproduce the problem?
1. make check
2. edit a file in src/vm/
3. make
What is the expected output? What do you see instead?
cc -o main.out main.o plat.o main_nat.o main_img.o
../../vm/libpmvm_desktop.a
Undefined symbols:
"_float_negative", referenced from:
_interpret in libpmvm_desktop.a(interp.o)
"_float_op", referenced from:
_interpret in libpmvm_desktop.a(interp.o)
"_float_compare", referenced from:
_interpret in libpmvm_desktop.a(interp.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Since make check used its own pmfeatures.h (with float disabled) and then
make for desktop tried to build with float enabled, a build error resulted.
Things could be cleaner by making src/tests/unit and src/tests/system re-
use the platform files from src/platform/desktop.
Original issue reported on code.google.com by [email protected]
on 20 May 2009 at 7:25
From Tyler Wilson:
For SCons to work on Windows, the SConstruct file in src/platform/desktop
should not include a suffix in the output name. If it is put there, it
fails with the following error in a command prompt using the default
Windows Python:
scons: *** An executable should have exactly one target with the suffix:
.exe
File "C:\Projects\ThirdParty\pymite\src\platform\desktop\SConscript", line
23, in <module>
Note that without the suffix, under cygwin a main.exe will be generated and
under *unix a 'main' program will be generated. So (again), the PMVM_EXE
value will have to change from main.out to "main" or "main.exe" depending
on the platform.
Note I am still working on the SCons under Windows issues - I need to
recreate one in my windows platform project, since the desktop plat.c
cannot be built on Windows due to a lack of SIGALRM support.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 11:14
What steps will reproduce the problem?
ipm> a = "bob"
ipm> b = "\0tim"
ipm> s = a+b
ipm> len(s)
3
What is the expected output? What do you see instead?
Expected s == "bob\0tim"
The error is that string_create() only accepts chars up to the first null.
Original issue reported on code.google.com by [email protected]
on 3 Sep 2009 at 8:13
Now that classes are available, update the mbed plat.py to use classes,
instances, etc.
Could also add support for float arguments.
Original issue reported on code.google.com by [email protected]
on 29 Apr 2009 at 3:57
What steps will reproduce the problem?
1. Revision 369, system test t141
2. Change lines 28, 35 from:
r = map(chr, range(start, start+36))
to
r = map(chr, range(start, start+35))
3. Debug; enable heap_dump and set breakpoint.
4. Notice that GC occurs during interp.c:1192 (BUILD_LIST) where there is a
warning about list_new() followed by multiple calls to list_insert().
What is the expected output? What do you see instead?
I expect the test to run, but the heap gets corrupted.
Original issue reported on code.google.com by [email protected]
on 20 May 2009 at 10:50
Create release 08
Original issue reported on code.google.com by [email protected]
on 20 Apr 2009 at 7:17
Recent CPython includes bytecodes that PyMite doesn't have yet. Need to
implement *_TRUE_DIVIDE bytecodes.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 4:52
From Tyler Wilson:
I was playing with the SCons build version (under cygwin, since the Windows
version does not work yet). It should be noted that the SCons works as
expected from the root of the pymite tree, but if you 'cd
src/platform/desktop' and type scons, it will not work. The magic incantation
if you are working in a sub-folder is 'scons -u' to tell scons to search up
the tree for other SConstruct files. Perhaps this should be noted in the
BuildSystem.txt and/or local README file(s)?
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 11:11
What steps will reproduce the problem?
ipm> def foo():
i = 0
while True:
yield i
i += 1
What is the expected output? What do you see instead?
Expect: code to work
Got:
AssertionError:Unsupported code identified by co_flags (0x63).
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 5:41
What steps will reproduce the problem?
1. assert 0 == 1
What is the expected output? What do you see instead?
Expect AssertionError (0xE4). Got TypeError (0xED).
Since Exceptions were rolled into real classes, their type is no longer
OBJ_TYPE_EXN (0x0E). They are now of type OBJ_TYPE_CLI (0x09) and inherit
from the Exception class.
Original issue reported on code.google.com by [email protected]
on 25 Sep 2009 at 2:47
Create an objsize module to print out the sizes of the common object types.
This will help show differences in platforms and gives an idea of the cost of
heap use.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 7:06
The mbed platform has the LocalFileSystem class in the API that allows access
to a file system on the device. This file system is also accessible as a USB
mass storage device. It would be very useful to be able to access pre-built
code images stored in files.
Steps:
1. Design file-system abstraction layer
2. Implement LocalFileSystem layer for mbed platform
3. Adjust mbed build system so that pmImgCreator can create files from user
.py files.
Original issue reported on code.google.com by [email protected]
on 23 Sep 2009 at 4:34
This issue is a customer request; and a good one at that.
Some objects can be declared outside of the heap to a new memory space to
reduce the time spent during GC. Would need to create a second memory space
for one-time static allocations, create an allocator for the new space,
adjust the GC to skip static objects and find a suitable set of objects to
declare as static.
The first guesses at objects to put in the static memory space are: globals,
builtins and the customer's API module.
Original issue reported on code.google.com by [email protected]
on 8 Oct 2009 at 7:14
src/tools/pmDist.py should be updated to use the new repository.
Also update HowToReleasePyMite.txt to remove the redundant step of tagging
the release branch; pmDist.py takes care of that.
Original issue reported on code.google.com by [email protected]
on 21 Apr 2009 at 2:52
PyMite fails to build from source on 64-bit machines.
This issue was started on the previous issue-tracking system; it was numbered
#186. A branch was created in the repository: issue_0186_dwhall_64bit_build.
Work is partway done.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 10:13
Heap memory could be saved by creating a cache for integer objects. This
would also affect the case where "6 is 4+2" returns False.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 7:03
What steps will reproduce the problem?
Example 1: In string case, should use TOS not pobj1.
Example 2:
ipm> t1 = (1,2,3)
ipm> t2 = t1[:]
ipm> assert id(t1) != id(t2)
What is the expected output? What do you see instead?
Example 1: I can't find a way to make it error, but visual inspection shows
it is wrong.
Example 2: t1 and t2 should have different addresses.
Original issue reported on code.google.com by [email protected]
on 18 May 2009 at 10:25
Jan Wedel discovered this issue while porting the PyMite VM to Java ME.
Here is the problem description in his words:
in the LOAD_ATTR section of “interp.c” , there is the following part (~line
1312ff):
/* If obj is an instance and attr is a func, create method
*/
if ((OBJ_GET_TYPE(TOS) == OBJ_TYPE_CLI) &&
(OBJ_GET_TYPE(pobj3) == OBJ_TYPE_FXN))
{
pobj2 = pobj3;
>>> retval = class_method(pobj1, TOS, pobj2, &pobj3);
PM_BREAK_IF_ERROR(retval);
}
At the state where “class_method” is called, obj1 is a DICT, obj2 is
INSTANCE and obj4 is FUNC. Shouldn’t use the “cli_class” of the instance
in
obj2 to access the class object? Or am I mistaken something? I was just
wondering because I got a class cast exception in Java which lead me to
this issue.
Original issue reported on code.google.com by [email protected]
on 9 Oct 2009 at 10:43
From Tyler Wilson:
Since the ipm.py may be used in a desktop-only environment, the
pyserial package is not strictly needed. (In addition, under sygwin,
there is no pyserial package available in the setup, so it must be
installed from source, which is a bit more work than perhaps most want
to deal with). So in the ipm.py, instead of a direct import serial, it
may make sense to do something like:
try:
import serial
except:
print("No serial package available. Will default to desktop
mode.")
I tested this locally, and it worked fine for me.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 11:08
Add support for Python 3.0 bytecodes
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 7:28
The vm should support classes and instances.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 4:50
What steps will reproduce the problem?
ipm> try:
a=4/0
except Exception, e:
print "in exception"
finally:
print "in finally"
What is the expected output? What do you see instead?
Expected:
in exception
in finally
Got:
NotImplementedError:Illegal bytecode (122/0x7a/SETUP_FINALLY) comes at
offset 0 in file <ipm>.
Solution depends on classes in order to create the Exception class.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 5:31
Currently, the root object uses the builtin _clo() to create the root class
object.
Check to see if this can be changed to the code "class object(): pass". The
first error that pops up is that the code above tried to do a LOAD_NAME of
"__name__" and when it is not found in the module, it searches PM_BUILTINS
which is still null at this point in execution.
So, if modules are given their __name__ attribute, the lookup won't fail and
the code might work. But you should also check that doing it this way is
smaller or faster. Don't give all modules __name__ attrs just for this (it
would be a waste of memory since a reasonable workaround is already in
place).
Original issue reported on code.google.com by [email protected]
on 29 Apr 2009 at 3:07
What steps will reproduce the problem?
1. Assume local PC does not have arm-elf-gcc.
2. $ cd src/platform/mbed; make zip
What is the expected output? What do you see instead?
Want a zip file, but the the ARM compiler is invoked.
Would like to get the zip file without needing an ARM compiler installed.
Original issue reported on code.google.com by [email protected]
on 22 May 2009 at 2:51
Ask webfaction for a dump of the current PyMite repository. Import the dump
into this google code repository. These instructions look like they should
work: http://code.google.com/support/bin/answer.py?answer=56673&topic=10386
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 2:20
From Tyler Wilson:
There are a number of places that refer to Ctrl+D as an EOF shortcut
- in ipm.py, in particular. On Windows, note that the EOF shortcut is
Ctrl+Z. Likely want to check the platform in ipm.py and print the
right one. For example, in my local ipm.py, I added this below the
last import:
if sys.platform == "win32":
EOF_KEY = "Ctrl+Z"
else:
EOF_KEY = "Ctrl+D"
And then changed:
self.stdout.write("Connection write error, type Ctrl+D to quit.
\n")
to:
self.stdout.write("Connection write error, type " + EOF_KEY + " to
quit.\n")
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 11:09
What steps will reproduce the problem?
ipm> print 'a' * 20
aaaaaaaaaaaaaaaaaaaa
ipm> print 'a' * 21
What is the expected output? What do you see instead?
aaaaaaaaaaaaaaaaaaaaa
Original issue reported on code.google.com by [email protected]
on 3 May 2009 at 8:55
From Tyler Wilson:
I think there should be a plat_uninit function to balance the plat_init
function. On some platforms, in order to support timers, callbacks, etc. we
ought to be 'good citizens' and kill any timers, etc. that were created in
the plat_init call. The most logical place would be a plat_uninit that is
called just before exiting the application. Perhaps a pm_uninit which is
called after the pm_run returns?
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 11:19
What steps will reproduce the problem?
In one .py file, define two distinct classes. In each class define a method
having the same name, such as __init__.
What is the expected output? What do you see instead?
The C compiler complains that the augmented C function names are identical:
nat_plat___init__.
Original issue reported on code.google.com by [email protected]
on 2 May 2009 at 7:10
What steps will reproduce the problem?
ipm> print 3.14
-490.564453
ipm> print 1.0
0.000000
What is the expected output? What do you see instead?
3.140000
1.000000
Original issue reported on code.google.com by [email protected]
on 7 Sep 2009 at 3:51
Add support for Python 2.6 bytecodes.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 7:27
What steps will reproduce the problem?
ipm> a="test"
ipm> b="thing"
ipm> a+b
Error: 0xED
Release: 0x08
FileId: 0x09
LineNum: 407
Traceback (top first):
<ipm>()
ipm()
main()
<module>.
What is the expected output? What do you see instead?
"testthing"
Original issue reported on code.google.com by [email protected]
on 31 Aug 2009 at 2:55
What steps will reproduce the problem?
ipm> [] == [1,2,3]
True
What is the expected output? What do you see instead?
False
True
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 16 May 2009 at 6:43
docs/src/HowToReleasePyMite.txt should be updated for the new project site.
Original issue reported on code.google.com by [email protected]
on 20 Apr 2009 at 7:22
Add support for the keyword exec ONLY if it provides utility more than eval.
This might work differently than Python's exec(). It might use the output
from __bi.Co().
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 7:35
What steps will reproduce the problem?
ipm> x = 4
ipm> filename = "A:/log" + `x` + ".log"
What is the expected output?
filename = "A:/log4.log"
What do you see instead?
NotImplementedError:Illegal bytecode (13/0xd/UNARY_CONVERT) comes at offset
6 in file <ipm>.
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 7 Sep 2009 at 1:53
What steps will reproduce the problem?
ipm> a = 42
ipm> print "the answer is %d" % a
What is the expected output? What do you see instead?
Expect: "the answer is 42"
Got:
Error: 0xED
Release: 0x07
FileId: 0x00
LineNum: 0
Traceback (top first):
<ipm>()
ipm()
main()
<module>.
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 5:16
Building the mbed platform fails with the new mbed.org library and compiler
because of the library's new API that uses PinName enum in the class
constructors.
The mbed platform libraries and mbed.py need to be updated to work with these
changes.
Original issue reported on code.google.com by [email protected]
on 8 Sep 2009 at 2:22
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 [email protected]
on 16 Apr 2009 at 4:57
The platform ports and cross-platform libraries should use LGPL so Dean can
avoid copyright issues with people who contribute ports and libs.
Add the LGPL text to src/platform/LICENSE and src/lib/LICENSE.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 7:00
What steps will reproduce the problem?
1. The following ipm session:
ipm> def fib():
a,b = 0,1
while True:
yield a
a,b = b,a+b
if a > 900:
break
ipm> for f in fib():
print f
ipm> print "hello"
Connection read error, type Ctrl+D to quit.
What is the expected output? What do you see instead?
When a generator returns (via break stmt) it raises an exception and
attempts to handle it immediately. It looks like the handling code is at
fault.
Original issue reported on code.google.com by [email protected]
on 22 May 2009 at 3:35
Currently, exceptions are implemented as C types: OBJ_TYPE_EXN and created by
the builtin function _exn().
The root object can be created by: class object(): pass
and exceptions can be declared as classes.
This allows the _exn() and _clo() builtin functions to be removed and makes
for a more cleaner implementation.
Original issue reported on code.google.com by [email protected]
on 20 May 2009 at 6:57
The desktop platform does not have a plat.py module. This should be created
for purposes of demonstration and utility.
Original issue reported on code.google.com by [email protected]
on 2 May 2009 at 6:19
Running interactive PyMite (ipm) reveals defects with classes/instances:
ipm> class Foo():
def __init__(self, v):
self.v = v
ipm> f = Foo(42)
Error: 0xE5
Release: 0x08
FileId: 0x09
LineNum: 928
Traceback (top first):
__init__()
<ipm>()
ipm()
main()
<module>.
Original issue reported on code.google.com by [email protected]
on 2 May 2009 at 5:30
Floats work for the desktop, but are byte-reversed on the mbed platform.
Wikipedia says floats have no defined endianness
(http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness).
James says that the ARM EABI defines an endianness.
Make an env var for the build systems, define them as little or big for all
the platforms and update the Makefile additions in HowToPortPyMite.txt
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 7:26
The HowToPortPyMite.txt doc lacks a useful line to add to makefiles to enable
ipm.
Original issue reported on code.google.com by [email protected]
on 16 Apr 2009 at 7:01
platform/mbed should be made to build locally. Try using the arm-eabi-gcc
toolchain. If it works, fix the Makefile and create a SConscript.
Original issue reported on code.google.com by [email protected]
on 18 Apr 2009 at 11:42
/doc/src/DevelopmentProcess.txt was written for the old Subversion/Trac
system. It needs to be updated for the new Subversion/Google Code project.
Original issue reported on code.google.com by [email protected]
on 19 Apr 2009 at 11:35
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.